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).

This page as a plain text file.
%I A061789 #32 Apr 11 2025 01:07:23
%S A061789 4,31,3156,826699,285312497310,303160419089563,827240565046755853740,
%T A061789 1979246896225360344977719,20880469979094808259715377888286,
%U A061789 2567686153182091604540923022990731504371755
%N A061789 a(n) = Sum_{k=1..n} prime(k)^prime(k).
%C A061789 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
%H A061789 Harry J. Smith, <a href="/A061789/b061789.txt">Table of n, a(n) for n = 1..76</a>
%F A061789 Partial sums of A051674. - _R. J. Mathar_, Apr 26 2007
%e A061789 a(3) = 2^2 + 3^3 + 5^5 = 3156.
%p A061789 p:= 1: s:= 0: S:= NULL:
%p A061789 for k from 1 to 30 do
%p A061789 p:= nextprime(p);
%p A061789 s:= s + p^p;
%p A061789 S:= S,s
%p A061789 od:
%p A061789 S; # _Robert Israel_, Apr 11 2025
%t A061789 P3[n_] := Sum[Prime[i]^Prime[i], {i, 1, n}]; Table[P3[n], {n, 1, 10}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 29 2008 *)
%t A061789 Accumulate[#^#&/@Prime[Range[10]]] (* _Harvey P. Dale_, Apr 10 2015 *)
%o A061789 (PARI) a=n=0; forprime (p=2, 383, write("b061789.txt", n++, " ", a+=p^p)) \\ _Harry J. Smith_, Jul 28 2009
%o A061789 (Python)
%o A061789 from itertools import accumulate, count, islice
%o A061789 from sympy import prime
%o A061789 def A061789_gen(): # generator of terms
%o A061789     yield from accumulate(((p:=prime(k))**p for k in count(1)))
%o A061789 A061789_list = list(islice(A061789_gen(),20)) # _Chai Wah Wu_, Jun 17 2022
%Y A061789 Cf. A051674.
%K A061789 nonn,easy
%O A061789 1,1
%A A061789 _Amarnath Murthy_, May 25 2001
%E A061789 Corrected and extended by _Jason Earls_, May 26 2001