OFFSET
1,2
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
a(10) = a(2*5) = a(prime(1)*prime(3)) = a(prime(1))*a(prime(3)) = comp(1)*comp(3) = 4 * 8 = 32.
MATHEMATICA
nmax = 100;
compos = Select[Range[FindRoot[n == nmax + PrimePi[n] + 1,
{n, nmax, 2 nmax}][[1, 2]] // Floor], CompositeQ];
a[n_] := If[n == 1, 1, Product[{p, e} = pe; compos[[PrimePi[p]]]^e,
{pe, FactorInteger[n]}]];
Array[a, nmax] (* Jean-François Alcover, Nov 21 2021 *)
PROG
(PARI) Composite(n) = local(k); k=n + primepi(n) + 1; while (k != n + primepi(k) + 1, k = n + primepi(k) + 1); return(k)
for (n=1, 1000, f=factor(n); a=1; for (i=1, matsize(f)[1], a*=Composite(primepi(f[i, 1]))^f[i, 2]); write("b066260.txt", n, " ", a) ) \\ Harry J. Smith, Feb 07 2010
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Reinhard Zumkeller, Dec 10 2001
STATUS
approved