cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A321193 Even numbers with no more than one odd prime factor, not counting multiplicity.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Oct 29 2018

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    n = 0; Table[n = n + 2;
    While[Length[FactorInteger[n]] > 2, n = n + 2]; n, {k, 1, 76}]
  • 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(e=2,logint(L,3), forprime(p=3, sqrtnint(L,e), listput(v,p^e<>k, listput(v,p<Charles R Greathouse IV, Dec 13 2021

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