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.

A038802 Factor 2n+1 = (2^m1)*(3^m2)*(5^m3)*...; a(n) = number of initial zero exponents.

Original entry on oeis.org

1, 2, 3, 1, 4, 5, 1, 6, 7, 1, 8, 2, 1, 9, 10, 1, 2, 11, 1, 12, 13, 1, 14, 3, 1, 15, 2, 1, 16, 17, 1, 2, 18, 1, 19, 20, 1, 3, 21, 1, 22, 2, 1, 23, 3, 1, 2, 24, 1, 25, 26, 1, 27, 28, 1, 29, 2, 1, 3, 4, 1, 2, 30, 1, 31, 3, 1, 32, 33, 1, 4, 2, 1, 34, 35, 1, 2, 36
Offset: 1

Views

Author

Keywords

Examples

			9 = (2^0)*(3^2), thus a(4) = 1.
		

Programs

  • Maple
    A038802 := proc(n) numtheory[factorset](2*n+1) ; min(%); numtheory[pi](%)-1 ; end proc: # R. J. Mathar, Mar 01 2011
  • Mathematica
    Table[f = FactorInteger[2 n + 1]; PrimePi[f[[1, 1]]] - 1, {n, 100}] (* T. D. Noe, Apr 23 2013 *)
  • PARI
    lpf(n)=factor(n)[1,1]
    a(n)=primepi(lpf(2*n+1))-1 \\ Charles R Greathouse IV, Jul 29 2016

Formula

a(n) = A049084(A020639(2n+1))-1. - R. J. Mathar, Mar 01 2011

Extensions

a(69) corrected by Rick G. Rosner, Apr 22 2013