OFFSET
1,1
COMMENTS
a(n) = n for n prime; a(n) = 0 for n > 3 and n == 0 (mod 3).
Conjecture: a(n) = 0 only if n == 0 (mod 3).
EXAMPLE
a(4) = 23 since f(4) = 4+4 = 8, f(8) = 8+8 = 16, f(16) = 16+1+6 = 23.
PROG
(PARI) f(n) = local(k, s, d); k=n; s=0; while(k>0, d=divrem(k, 10); k=d[1]; s=s+d[2]); s+n {m=76; for(n=1, m, if(n>3&&n%3==0, print1(0, ", "), k=n; z=1000*n; while(k<z&&!isprime(k), k=f(k)); print1(if(k<z, k, 0), ", ")))}
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Nov 09 2005
EXTENSIONS
Edited and extended by Klaus Brockhaus, Nov 10 2005
STATUS
approved