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.
%I A045965 #27 May 18 2020 03:02:31 %S A045965 2,3,5,9,7,15,11,27,25,21,13,45,17,33,35,81,19,75,23,63,55,39,29,135, %T A045965 49,51,125,99,31,105,37,243,65,57,77,225,41,69,85,189,43,165,47,117, %U A045965 175,87,53,405,121,147,95,153,59,375,91,297,115,93,61,315,67,111,275,729,119 %N A045965 a(1)=2; if n = Product p_i^e_i, n > 1, then a(n) = Product p_{i+1}^e_i. %D A045965 From a puzzle proposed by _Marc LeBrun_. %H A045965 Indranil Ghosh, <a href="/A045965/b045965.txt">Table of n, a(n) for n = 1, 10000</a> %p A045965 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; %t A045965 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 *) %o A045965 (Haskell) %o A045965 a045965 n = if n == 1 then 2 else a003961 n %o A045965 -- _Reinhard Zumkeller_, Jul 12 2012 %o A045965 (Python) %o A045965 from sympy import factorint, primepi, prime, prod %o A045965 def a(n): %o A045965 f=factorint(n) %o A045965 return 2 if n==1 else prod(prime(primepi(i) + 1)**f[i] for i in f) # _Indranil Ghosh_, May 15 2017 %o A045965 (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 %Y A045965 Cf. A048673. Essentially identical to A003961. %K A045965 easy,nonn,nice %O A045965 1,1 %A A045965 _N. J. A. Sloane_ %E A045965 More terms from _David W. Wilson_