OFFSET
1,1
PROG
(PARI) nsamedr(n) = { local(j); for(j=2, n, if(!isprime(j)&!issamedr(j), print1(j", ")) ) } issamedr(n) = { local(f, a, ln, x); f=0; a=ifactor(n); ln=length(a); for(x=1, ln-1, if(droot(a[x])<>droot(a[x+1]), f=1; break)); if(f==0&ln>1, return(1), return(0)) } droot(n) = \ the digital root of a number. { local(x); x= n%9; if(x>0, return(x), return(9)) }
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Cino Hilliard, Jan 02 2005
STATUS
approved