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 A115318 #11 Nov 15 2021 09:02:01 %S A115318 1,2,5,3,8,4,11,6,7,9,14,10,17,12,13,15,20,16,23,18,19,21,26,22,24,25, %T A115318 27,28,29,30,32,31,33,34,36,37,35,39,40,42,38,43,41,45,46,48,44,49,51, %U A115318 52,54,55,47,57,58,60,61,63,50,64,53,66,67,69,70,72,56,73,75,76,59,78 %N A115318 Inverse of A115316. %H A115318 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A115318 a(a(n)) = A115319(n). %F A115318 a(n) = A115316(A115319(n)) = A115319(A115316(n)). %t A115318 nmax = 72; %t A115318 nn = nmax + 10; (* estimated length of A115316 - should be increased in case of message "NotFound" in the output *) %t A115318 np = Ceiling[nn/3] + 1; %t A115318 nc = Ceiling[(2/3) nn]; %t A115318 pp = Prime[Range[np]]; %t A115318 cc = Partition[Select[Range[FindRoot[n == nc + PrimePi[n] + 1, {n, nc, 2nc}][[1, 2]] // Floor], CompositeQ], 2]; %t A115318 A115316 = Join[{1}, Riffle[pp, cc] // Flatten][[1 ;; nn]]; %t A115318 a[n_] := FirstPosition[A115316, n][[1]]; %t A115318 Table[a[n], {n, 1, nmax}] (* _Jean-François Alcover_, Nov 15 2021 *) %Y A115318 Cf. A115316, A115319. %K A115318 nonn %O A115318 1,2 %A A115318 _Reinhard Zumkeller_, Jan 20 2006