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 A087316 #22 Jun 08 2025 03:35:44 %S A087316 4,17,84,545,7824,281771,51540600,3347558057,1146374959980, %T A087316 288113965730819,529172633067826888,283453407513524913023, %U A087316 4122282265785671687518812,1586581830624893452605127040309,412109111737176949907195758658736 %N A087316 a(n) = Sum_{k=1..n} prime(k)^prime(n-k+1). %H A087316 T. D. Noe, <a href="/A087316/b087316.txt">Table of n, a(n) for n=1..50</a> %e A087316 Examples from _Jonathan Vos Post_, Jan 06 2006: (Start) %e A087316 a(1) = 4 because prime(1)^prime(1) = 2^2 = 4. %e A087316 a(2) = 17 because prime(1)^prime(2) + prime(2)^prime(1) = 2^3 + 3^2 = 17. %e A087316 a(3) = 84 because 2^5 + 3^3 + 5^2 = 84. %e A087316 a(4) = 545 = 2^7 + 3^5 + 5^3 + 7^2. %e A087316 a(5) = 7824 = 2^11 + 3^7 + 5^5 + 7^3 + 11^2. %e A087316 a(6) = 281771 = 2^13 + 3^11 + 5^7 + 7^5 + 11^3 + 13^2. %e A087316 a(7) = 51540600 = 2^17 + 3^13 + 5^11 + 7^7 + 11^5 + 13^3 + 17^2. %e A087316 a(8) = 3347558057 = 2^19 + 3^17 + 5^13 + 7^11 + 11^7 + 13^5 + 17^3 + 19^2. %e A087316 a(9) = 1146374959980 = 2^23 + 3^19 + 5^17 + 7^13 + 11^11 + 13^7 + 17^5 + 19^3 + 23^2. (End) %p A087316 a:=n->sum(ithprime(k)^ithprime(n-k+1),k=1..n): seq(a(n),n=1..16); # _Emeric Deutsch_, Apr 13 2005 %t A087316 Table[Sum[Prime[k]^Prime[n - k + 1], {k, 1, n}], {n, 1, 15}] (* _Vaclav Kotesovec_, Jun 08 2025 *) %o A087316 (PARI) a(n) = sum(k=1, n, prime(k)^prime(n-k+1)); \\ _Michel Marcus_, Aug 20 2019 %o A087316 (Python) %o A087316 from sympy import prime %o A087316 def a(n): return sum(prime(k)**prime(n-k+1) for k in range(1, n+1)) %o A087316 print([a(n) for n in range(1, 16)]) # _Michael S. Branicky_, Apr 17 2021 %Y A087316 Cf. A000040, A005408, A087315, A113122, A113153, A113154. %K A087316 nonn %O A087316 1,1 %A A087316 _Amarnath Murthy_, Sep 03 2003 %E A087316 More terms from _Sam Alexander_, Oct 20 2003 %E A087316 Further terms from _Emeric Deutsch_, Apr 13 2005 %E A087316 Edited by _N. J. A. Sloane_, Aug 19 2008 at the suggestion of _R. J. Mathar_