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.

A045965 a(1)=2; if n = Product p_i^e_i, n > 1, then a(n) = Product p_{i+1}^e_i.

Original entry on oeis.org

2, 3, 5, 9, 7, 15, 11, 27, 25, 21, 13, 45, 17, 33, 35, 81, 19, 75, 23, 63, 55, 39, 29, 135, 49, 51, 125, 99, 31, 105, 37, 243, 65, 57, 77, 225, 41, 69, 85, 189, 43, 165, 47, 117, 175, 87, 53, 405, 121, 147, 95, 153, 59, 375, 91, 297, 115, 93, 61, 315, 67, 111, 275, 729, 119
Offset: 1

Views

Author

Keywords

References

Crossrefs

Cf. A048673. Essentially identical to A003961.

Programs

  • Haskell
    a045965 n = if n == 1 then 2 else a003961 n
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Maple
    succfactorization := proc(n) local p,d; if(1 = n) then RETURN(2); fi; p := 1; for d in ifactors(n)[ 2 ] do p := p * (nextprime(d[ 1 ])^d[ 2 ]); od; RETURN(p); end;
  • Mathematica
    a[1] = 2; a[p_?PrimeQ] := a[p] = Prime[PrimePi[p] + 1]; a[n_] := a[n] = Times @@ (a[First[#]]^Last[#] &) /@ FactorInteger[n]; Table[ a[n], {n, 1, 65}] (* Jean-François Alcover, Jul 18 2013 *)
  • PARI
    a(n) = if (n==1, 2, my(f=factor(n)); for(i=1, #f~, f[i,1] = nextprime(f[i,1]+1)); factorback(f)); \\ Michel Marcus, May 18 2020
  • Python
    from sympy import factorint, primepi, prime, prod
    def a(n):
        f=factorint(n)
        return 2 if n==1 else prod(prime(primepi(i) + 1)**f[i] for i in f) # Indranil Ghosh, May 15 2017
    

Extensions

More terms from David W. Wilson