

A045965


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


11



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


REFERENCES

From a puzzle proposed by Marc LeBrun.


LINKS

Indranil Ghosh, Table of n, a(n) for n = 1, 10000


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}] (* JeanFrançois Alcover, Jul 18 2013 *)


PROG

(Haskell)
a045965 n = if n == 1 then 2 else a003961 n
 Reinhard Zumkeller, Jul 12 2012
(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
(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


CROSSREFS

Cf. A048673. Essentially identical to A003961.
Sequence in context: A011026 A069805 A123923 * A323390 A324886 A277332
Adjacent sequences: A045962 A045963 A045964 * A045966 A045967 A045968


KEYWORD

easy,nonn,nice


AUTHOR

N. J. A. Sloane


EXTENSIONS

More terms from David W. Wilson


STATUS

approved



