OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
Numbers of the form 2^k*p^h where k > 0, h >= 0 p is an odd prime.
a(n) = 2 * A070776(n-1) for n > 1. - Alois P. Heinz, Nov 20 2018
EXAMPLE
18 = 2 * 3^2 is in the sequence because it has 1 odd prime factor (3 counts only once).
16 = 2^4 is in the sequence because it has no odd prime factors.
70 = 2 * 5 * 7 is not in the sequence because it has 2 odd prime factors.
MATHEMATICA
n = 0; Table[n = n + 2;
While[Length[FactorInteger[n]] > 2, n = n + 2]; n, {k, 1, 76}]
PROG
(PARI) is(n) = n%2==0 && omega(n) <= 2 \\ Felix Fröhlich, Nov 01 2018
(PARI) is(n)=my(o=valuation(n, 2)); o && isprimepower(n>>o) \\ Charles R Greathouse IV, Dec 13 2021
(PARI) list(lim)=my(v=List()); for(k=1, logint(lim\=1, 2), listput(v, 1<<k)); for(k=1, logint(lim\9, 2), my(L=lim>>k); for(e=2, logint(L, 3), forprime(p=3, sqrtnint(L, e), listput(v, p^e<<k)))); for(k=1, logint(lim\3, 2), forprime(p=3, lim>>k, listput(v, p<<k))); Set(v) \\ Charles R Greathouse IV, Dec 13 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Oct 29 2018
STATUS
approved