NICESEQ  NICE SEQUENCES
A nice sequence is a sequence of digits in which a digit d is placed at any index iff d is 0 or any divisor of d(except 1) has been placed already. First digit can be anything from 1 to 9.
Find the number of nice sequences of length n.
A nice sequence is a sequence of digits in which a digit d is placed at any index iff d is 0 or any divisor of d(except 1) has been placed already. First digit can be anything from 1 to 9.
Find the number of nice sequences of length n.
Input
Input consists of number of test cases t
Following t lines have a single line containing n as described in the problem statement.
Output
Print the number of nice sequences of length n modulo 1000000007 in a seperate line .
Example
Input:
2
1
2
Output
9
23
Explaination :
For n=2 nice sequences are :
10,20,22,24,26,28,30,33,36,39,40,44,48 and so on !
Constraints:
1<=n<=1000
hide comments
mahmud2690:
20180712 10:44:23
for n = 3, result = 71. 

prakash1108:
20180706 17:57:18
what will be the answer for n=3? 

shubham_001:
20180629 07:11:44
atleast explain the question and testcases properly 

i_am_ipsita:
20180626 17:20:04
Nice question ! ;) Last edit: 20180626 17:20:28 

raunak96:
20180626 12:05:18
good question a2j sirjee :) 

aayushsinha44:
20180626 07:33:40
Nice Question. 

shuvam_kedia:
20180625 22:26:03
Nice question a2j ! 

amit_redoc:
20180625 21:22:58
nice question a2j ;) 

ayush926:
20180625 20:35:46
Nice question.

Added by:  a2j 
Date:  20180625 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 
Resource:  Own Problem 