OFFSET
1,2
COMMENTS
If the smallest prime divisor of n is > 7 then the n-th digit is 1.
a(65) if it exists is > 10^50. - Andrew Howroyd, Sep 20 2024
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..64
EXAMPLE
8649 is a member in which the fourth digit is 8 a multiple of 4, the third one is 6 a multiple of 3, the second one is 4 a multiple of 2 and the least significant digit is 9.
PROG
(PARI) isok(k)={my(d=digits(k)); for(i=1, #d, my(t=d[#d+1-i]); if(!t || (t%i && i%t), return(0))); 1}
for(k=1, 10000, my(x=k^2); if(isok(x), print1(x, ", "))) \\ Andrew Howroyd, Sep 19 2024
(PARI) \\ faster program
B(k)={
local(L=List());
my(v=vector(k, i, select(t->t%i==0||i%t==0, [1..9])));
my(chk(d)=for(i=1, #d, if(!vecsearch(v[i], d[#d+1-i]), return(0))); 1);
my(s=k\2, b=10^s);
my(recurse(i, m)=if(i==s,
for(j=sqrtint(m*b+b\10-1)+1, sqrtint(m*b+b-1), my(t=j^2); if(chk(digits(t%b)), listput(L, t))),
m*=10; foreach(v[i], t, self()(i-1, m+t))
));
recurse(k, 0);
Vec(L);
}
concat(vector(12, k, B(k))) \\ Andrew Howroyd, Sep 19 2024
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Mar 22 2002
EXTENSIONS
More terms from Sascha Kurz, Mar 23 2002
Offset changed by Andrew Howroyd, Sep 19 2024
STATUS
approved