OFFSET
1,1
EXAMPLE
399=3*7*19. digital roots = 3,7,1 all different.
PROG
(PARI) nsamedr2(n) = { local(j); for(j=2, n, if(!isprime(j)&issamedr2(j), print1(j", ")) ) } issamedr2(n) = { local(f, a, ln, x, y, dr); f=0; a=ifactor(n); ln=length(a); for(x=1, ln-1, for(y=x+1, ln, if(droot(a[x])==droot(a[y]), return(0)); if(droot(a[x])<>droot(a[y]), f=1, f=0))); if(f==1&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)) } ifactor(n) = \The vector of integer factors of n with multiplicity { local(f, j, k, flist); flist=[]; f=Vec(factor(n)); for(j=1, length(f[1]), for(k = 1, f[2][j], flist = concat(flist, f[1][j]) ); ); return(flist) }
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Cino Hilliard, Jan 02 2005
STATUS
approved