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 A098383 #17 Sep 24 2018 16:53:14 %S A098383 1,3,6,4,11,6,11,8,9,10,22,12,19,14,15,16,28,18,27,20,21,22,32,24,25, %T A098383 26,27,28,39,30,53,32,33,34,35,36,49,38,39,40,60,42,57,44,45,46,62,48, %U A098383 49,50,51,52,69,54,55,56,57,58,87,60,79,62,63,64,65,66,94,68,69,70,91,72 %N A098383 Define a function f on the positive integers by: if n is 1 or composite, stop; but if n = prime(k) then f(n) = k; a(n) = sum of terms in trajectory of n under repeated application of f. %C A098383 Sum of the terms in the prime index chain for n (cf. A049076). %H A098383 Alois P. Heinz, <a href="/A098383/b098383.txt">Table of n, a(n) for n = 1..1000</a> %H A098383 N. Fernandez, <a href="http://www.borve.org/primeness/FOP.html">An order of primeness, F(p)</a> %H A098383 N. Fernandez, <a href="/A006450/a006450.html">An order of primeness</a> [cached copy, included with permission of the author] %e A098383 a(2) = 3 because 2 is the first prime, therefore 2 + 1 = 3. a(3) = 6 because 3 is the second prime and two is the first prime, therefore 3 + 2 + 1 = 6. a(4) = 4 because 4 is composite. a(5) = 11 because five is the third prime, three is the second prime and two is the first prime, which gives us 5 + 3 + 2 + 1 = 11 and so on. %p A098383 a:= n-> n + `if`(isprime(n), a(numtheory[pi](n)), 0): %p A098383 seq (a(n), n=1..80); # _Alois P. Heinz_, Jul 16 2012 %t A098383 Table[s=n; p=n; While[PrimeQ[p], p=PrimePi[p]; s=s+p]; s, {n, 1000}] (T. D. Noe) %Y A098383 Cf. A007097, A057450, A057451, A049076. %K A098383 easy,nonn %O A098383 1,2 %A A098383 _Andrew S. Plewe_, Oct 26 2004 %E A098383 More terms from _Ray Chandler_, Nov 04 2004