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 A071602 #29 Feb 18 2025 10:11:59 %S A071602 2,5,10,17,28,59,130,221,253,345,358,431,445,479,553,588,683,699,775, %T A071602 792,829,926,964,1062,1141,1242,1543,2244,3145,3456,4177,4308,5039, %U A071602 5970,6911,7062,7813,8174,8935,9306,10277,10458,10649,11040,11831 %N A071602 Sum of the reverses of the first n primes. %H A071602 Robert Israel, <a href="/A071602/b071602.txt">Table of n, a(n) for n = 1..10000</a> %H A071602 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_178.htm">Puzzle 178. Shallit Minimal Primes Set</a>, The Prime Puzzles & Problems Connection. %H A071602 Jeffrey Shallit, <a href="https://cs.uwaterloo.ca/~shallit/Papers/minimal5.pdf">Minimal Primes</a>, Journal of Recreational Mathematics, vol. 30.2 1999-2000 pp. 113-117, Baywood NY. %e A071602 a(6) = reverse(2) + reverse(3) + reverse(5) + reverse(7) + reverse(11) + reverse(13) = 2 + 3 + 5 + 7 + 11 + 31 = 59. %p A071602 rev:= proc(n) local L,i; %p A071602 L:= convert(n,base,10); %p A071602 add(L[-i]*10^(i-1),i=1..nops(L)) %p A071602 end proc: %p A071602 ListTools:-PartialSums(map(rev, [seq(ithprime(i),i=1..200)])); # _Robert Israel_, Feb 17 2025 %t A071602 f[n_] := Sum[ FromDigits[ Reverse[ IntegerDigits[Prime[i]]]], {i, 1, n}]; Table[ f[n], {n, 1, 50}] %t A071602 Accumulate[FromDigits[Reverse[IntegerDigits[ #]]] & /@ Prime[Range[ 50]]] (* _Harvey P. Dale_, Jan 27 2011 *) %t A071602 Accumulate[IntegerReverse[Prime[Range[50]]]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Oct 10 2020 *) %o A071602 (Python) %o A071602 from sympy import primerange %o A071602 from itertools import accumulate %o A071602 print(list(accumulate(int(str(p)[::-1]) for p in primerange(2, 198)))) # _Michael S. Branicky_, Jun 24 2022 %o A071602 (PARI) a(k) = my(v=primes(n)); sum(i=1, n, fromdigits(Vecrev(digits(v[i])))); \\ _Michel Marcus_, Feb 17 2025 %Y A071602 Cf. A007504, A114835. %Y A071602 Partial sums of A004087. %K A071602 base,easy,nonn %O A071602 1,1 %A A071602 _Joseph L. Pe_, Jun 02 2002 %E A071602 Edited by _Robert G. Wilson v_, Jun 07 2002