OFFSET
1,2
COMMENTS
Inverse integer permutation of A115317.
LINKS
MATHEMATICA
nmax = 72;
nn = nmax + 15; (* estimated length of A115316 - should be increased in case of message "NotFound" in the output *)
np = Ceiling[nn/3] + 1;
nc = Ceiling[(2/3) nn];
pp = Prime[Range[np]];
cc = Partition[Select[Range[FindRoot[n == nc + PrimePi[n] + 1, {n, nc, 2nc}][[1, 2]] // Floor], CompositeQ], 2];
A115316 = Join[{1}, Riffle[pp, cc] // Flatten][[1 ;; nn]];
Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Nov 15 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 20 2006
STATUS
approved