OFFSET
1,2
COMMENTS
See sequence A163574 for further discussion, in particular the proof that n must be odd, and that there is no further term with less than 13 digits. There are several options for representing the terms with 13 and more digits, e.g., continuing to write the number d[1]*10^(n-1)+...+d[n]*10^0, or concatenation of the "digits", written in base 10, even when they are larger than 9.
FORMULA
EXAMPLE
a(2) = 123 is in the sequence, because in base 4, 12[4]=6 is divisible by 2 and 123[4] = 27 = A235164(2) is divisible by 3. The same is the case for 321, where 32[4]=14 is even and 321[4] = 57 = A235164(3) is divisible by 3.
For the 9-digit term 381654729, the initial digits are to be interpreted in base 10: 38, 318, ..., 381654729 are divisible by 2, 3, ..., 9, respectively.
PROG
(PARI) for(n=1, 9, p=vector(n, i, (n+1)^(i-1))); for(k=0, n!-1, d=numtoperm(n, k); for(j=2, n, sum(i=1, j, d[i]*p[j-i+1])%j &&next(2)); print1(d*vector(n, i, 10^(n-i))~", ")))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Jan 03 2014
STATUS
approved