cp's OEIS Frontend

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.

A087316 a(n) = Sum_{k=1..n} prime(k)^prime(n-k+1).

Original entry on oeis.org

4, 17, 84, 545, 7824, 281771, 51540600, 3347558057, 1146374959980, 288113965730819, 529172633067826888, 283453407513524913023, 4122282265785671687518812, 1586581830624893452605127040309, 412109111737176949907195758658736
Offset: 1

Views

Author

Amarnath Murthy, Sep 03 2003

Keywords

Examples

			Examples from _Jonathan Vos Post_, Jan 06 2006: (Start)
a(1) = 4 because prime(1)^prime(1) = 2^2 = 4.
a(2) = 17 because prime(1)^prime(2) + prime(2)^prime(1) = 2^3 + 3^2 = 17.
a(3) = 84 because 2^5 + 3^3 + 5^2 = 84.
a(4) = 545 = 2^7 + 3^5 + 5^3 + 7^2.
a(5) = 7824 = 2^11 + 3^7 + 5^5 + 7^3 + 11^2.
a(6) = 281771 = 2^13 + 3^11 + 5^7 + 7^5 + 11^3 + 13^2.
a(7) = 51540600 = 2^17 + 3^13 + 5^11 + 7^7 + 11^5 + 13^3 + 17^2.
a(8) = 3347558057 = 2^19 + 3^17 + 5^13 + 7^11 + 11^7 + 13^5 + 17^3 + 19^2.
a(9) = 1146374959980 = 2^23 + 3^19 + 5^17 + 7^13 + 11^11 + 13^7 + 17^5 + 19^3 + 23^2. (End)
		

Crossrefs

Programs

  • Maple
    a:=n->sum(ithprime(k)^ithprime(n-k+1),k=1..n): seq(a(n),n=1..16); # Emeric Deutsch, Apr 13 2005
  • Mathematica
    Table[Sum[Prime[k]^Prime[n - k + 1], {k, 1, n}], {n, 1, 15}] (* Vaclav Kotesovec, Jun 08 2025 *)
  • PARI
    a(n) = sum(k=1, n, prime(k)^prime(n-k+1)); \\ Michel Marcus, Aug 20 2019
    
  • Python
    from sympy import prime
    def a(n): return sum(prime(k)**prime(n-k+1) for k in range(1, n+1))
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Apr 17 2021

Extensions

More terms from Sam Alexander, Oct 20 2003
Further terms from Emeric Deutsch, Apr 13 2005
Edited by N. J. A. Sloane, Aug 19 2008 at the suggestion of R. J. Mathar