login
A100660
Composite numbers whose prime factors have different digital roots.
0
6, 10, 14, 15, 21, 26, 30, 33, 34, 35, 38, 39, 42, 46, 51, 55, 57, 62, 65, 69, 70, 74, 77, 78, 82, 85, 86, 87, 91, 93, 95, 102, 105, 106, 111, 114, 118, 119, 122, 123, 129, 130, 133, 134, 138, 141, 142, 143, 145, 146, 155, 158, 159, 161, 165, 170, 177, 178, 182, 183
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
Sequence in context: A338905 A093772 A046400 * A088709 A225706 A063078
KEYWORD
base,easy,nonn
AUTHOR
Cino Hilliard, Jan 02 2005
STATUS
approved