OFFSET
0,1
LINKS
FORMULA
MATHEMATICA
a[p_?PrimeQ] := a[p] = Prime[ PrimePi[p] + 1]; a[1] = 1; a[n_] := a[n] = Times @@ ( a[First[#]] ^ Last[#] & ) /@ FactorInteger[n]; (* after Jean-François Alcover, in A003961 *) A[n_]:= If[n<2, n + 1, If[EvenQ[n], a[A[n/2]], A[(n - 1)/2] A[(n + 1)/2]]] ; Table[A[n], {n, 0, 51}] (* sequence A260443 *) Table[LCM[A[n], A[n + 1]], {n, 0, 101}] (* Indranil Ghosh, Mar 22 2017 *)
PROG
(PARI)
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From Michel Marcus
(Scheme)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 22 2017
STATUS
approved