login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A115317
a(n) = A115316(A115316(n)).
2
1, 2, 6, 8, 4, 5, 10, 3, 12, 14, 9, 11, 16, 7, 18, 20, 15, 17, 22, 13, 24, 25, 21, 26, 23, 19, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 35, 43, 41, 38, 42, 39, 40, 53, 47, 44, 61, 45, 46, 71, 48, 59, 57, 49, 50, 63, 51, 52, 89, 67, 54, 68, 55, 56, 74, 73, 58, 107, 60, 79, 113, 62
OFFSET
1,2
COMMENTS
Inverse integer permutation of A115319;
A115318(a(n)) = a(A115318(n)) = A115316(n).
MATHEMATICA
nmax = 72; (* length of this sequence *)
nn = nmax + 20 (* estimated length of A115316 - should be increased if insufficient *);
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]];
a[n_] := A115316[[A115316[[n]]]];
Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Nov 15 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 20 2006
STATUS
approved