A216686 Numbers n such that n appears in the partial sums of the m-almost primes, where m=bigomega(n).
1, 2, 4, 5, 8, 10, 16, 17, 20, 32, 40, 41, 58, 64, 80, 128, 160, 185, 197, 219, 254, 256, 281, 320, 377, 512, 589, 640, 843, 917, 964, 1024, 1247, 1280, 1652, 1707, 1804, 1825, 2048, 2074, 2157, 2519, 2560, 2637, 2642, 2727, 2771, 3614, 3755, 3786, 4046, 4096, 4227
Offset: 1
Examples
2 is in the sequence because 2 appears in A007504. 4 is in the sequence because 4 appears in A062198. 5 is in the sequence because 5 appears in A007504. 6 is not in the sequence because 6 is not in A062198. 8 is in the sequence because 8 appears in A086062, 10 is in the sequence because 10 appears in A062198.
Programs
-
Maple
alm := proc(n,m) # n-th m-almost prime option remember; if n =1 then 2^m ; else for a from procname(n-1,m)+1 do if numtheory[bigomega](a) = m then return a; end if; end do: end if; end proc: almP := proc(n,m) #n-th partial sum of the m-almost primes add(alm(i,m),i=1..n) ; end proc: isA216686 := proc(n) # is n in the sequence? local m ,k,ps; m := numtheory[bigomega](n) ; for k from 1 do ps := almP(k,m) ; if ps = n then return true; elif ps > n then return false; end if; end do: end proc: for n from 1 to 4300 do if isA216686(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Sep 14 2012
-
PARI
is_A216686(n)={ my(m=bigomega(n),t); while(n>0, while(bigomega(t++)!=m,); n-=t); !n} \\ - M. F. Hasler, Sep 23 2012
Extensions
Corrected by R. J. Mathar, Sep 14 2012
Comments