OFFSET
1,1
EXAMPLE
We have a(2)=2 because 2 is the first prime ahead of 5,11,29,37,... each becoming a product of two distinct primes with an appended 1.
PROG
(PARI) {r(n, p, d)=local(q); if(d==0, if(n%10==1 && isprime(n\10) && n<m, m=n); return); q=nextprime(p+1); while(n*q^d<m, r(n*q, q, d-1); q=nextprime(q+1))}
{A105526(d) = M=2^16; while(1, m=M; r(1, 2, d); if(m!=M, return(m\10)); M*=2)} \\ Max Alekseyev, Apr 28 2005
CROSSREFS
KEYWORD
nonn,base,changed
AUTHOR
Lekraj Beedassy, Apr 11 2005
EXTENSIONS
a(5)-a(8) from Ray Chandler, Apr 16 2005
More terms from Max Alekseyev, Apr 28 2005
STATUS
approved