A162457 Numbers whose prime factors when sorted and stacked fill an equilateral triangle.
2, 3, 5, 7, 22, 26, 33, 34, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 194, 201, 203, 205, 213, 215, 217, 219, 235
Offset: 1
Examples
218 = 2*109. Stacking these, we have 2 (with 1 digit) and 109 (with 3 digits), but no prime factor with 2 digits, so 218 is not in the sequence. 7777 = 7*11*101. Stacking these, smallest to largest on top of each other, the digits form an equilateral triangle. So 7777 belongs to the sequence.
Programs
-
Maple
A055642 := proc(n) max(1, ilog10(n)+1) ; end: omega := proc(n) nops(numtheory[factorset](n)) ; end: isA162457 := proc(n) local plen,p,e,dlen,i ; if omega(n) = numtheory[bigomega](n) then plen := [seq(0,i=1..100)] ; for p in ifactors(n)[2] do e := op(2,p) ; if e > 1 then RETURN(false) ; fi; dlen := A055642( op(1,p)) ; if op(dlen,plen) > 0 then RETURN(false) ; fi; plen := subsop(dlen=1,plen) ; od: for i from 1 to nops(plen-1) do if op(i,plen) = 0 and op(i+1,plen) = 1 then RETURN(false); fi; od: true; else false ; fi; end: for n from 2 to 300 do if isA162457(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 16 2009
-
PARI
factortriangle(m,n) = { local(x,a,v,j,f,ln,lna,c); for(x=m,n, f=0; a = ifactor(x); lna=length(a); for(j=1,lna, if(length(Str(a[j]))!=j,f=1;break);); if(!f,print1(x",")); ); } ifactor(n) = \\ The vector of the prime 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) }
Extensions
Comment extended by R. J. Mathar, Sep 16 2009
Comments