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.

A061789 a(n) = Sum_{k=1..n} prime(k)^prime(k).

Original entry on oeis.org

4, 31, 3156, 826699, 285312497310, 303160419089563, 827240565046755853740, 1979246896225360344977719, 20880469979094808259715377888286, 2567686153182091604540923022990731504371755
Offset: 1

Views

Author

Amarnath Murthy, May 25 2001

Keywords

Comments

a(n) is prime for n = 2, 4, and 24, and no other n up to at least 600. - Zak Seidov and Robert Israel, Apr 11 2025

Examples

			a(3) = 2^2 + 3^3 + 5^5 = 3156.
		

Crossrefs

Cf. A051674.

Programs

  • Maple
    p:= 1: s:= 0: S:= NULL:
    for k from 1 to 30 do
    p:= nextprime(p);
    s:= s + p^p;
    S:= S,s
    od:
    S; # Robert Israel, Apr 11 2025
  • Mathematica
    P3[n_] := Sum[Prime[i]^Prime[i], {i, 1, n}]; Table[P3[n], {n, 1, 10}] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
    Accumulate[#^#&/@Prime[Range[10]]] (* Harvey P. Dale, Apr 10 2015 *)
  • PARI
    a=n=0; forprime (p=2, 383, write("b061789.txt", n++, " ", a+=p^p)) \\ Harry J. Smith, Jul 28 2009
    
  • Python
    from itertools import accumulate, count, islice
    from sympy import prime
    def A061789_gen(): # generator of terms
        yield from accumulate(((p:=prime(k))**p for k in count(1)))
    A061789_list = list(islice(A061789_gen(),20)) # Chai Wah Wu, Jun 17 2022

Formula

Partial sums of A051674. - R. J. Mathar, Apr 26 2007

Extensions

Corrected and extended by Jason Earls, May 26 2001