login
A321193
Even numbers with no more than one odd prime factor, not counting multiplicity.
1
2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 32, 34, 36, 38, 40, 44, 46, 48, 50, 52, 54, 56, 58, 62, 64, 68, 72, 74, 76, 80, 82, 86, 88, 92, 94, 96, 98, 100, 104, 106, 108, 112, 116, 118, 122, 124, 128, 134, 136, 142, 144, 146, 148, 152, 158, 160, 162, 164, 166, 172, 176, 178, 184, 188, 192, 194, 196
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