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.

A034964 Sums of five consecutive primes.

This page as a plain text file.
%I A034964 #48 Sep 08 2022 08:44:52
%S A034964 28,39,53,67,83,101,119,139,161,181,199,221,243,263,287,311,331,351,
%T A034964 373,395,421,449,473,497,517,533,559,587,617,647,683,707,733,759,787,
%U A034964 811,839,863,891,917,941,961,991,1023,1057,1089,1123,1151,1169,1193
%N A034964 Sums of five consecutive primes.
%C A034964 Except for the first term, all terms are odd. - _Alonso del Arte_, Dec 30 2011
%D A034964 Owen O'Shea and Underwood Dudley, The Magic Numbers of the Professor, Mathematical Association of America (2007), p. 62
%H A034964 David A. Corneth, <a href="/A034964/b034964.txt">Table of n, a(n) for n = 1..10000</a>
%F A034964 a(n) = Sum_{i=n..n+4} prime(i). - _Wesley Ivan Hurt_, Sep 14 2014
%e A034964 a(1) = prime(1+0) + prime(1+1) + prime(1+2) + prime(1+3) + prime(1+4) = 2 + 3 + 5 + 7 + 11 = 28.
%e A034964 a(2) = prime(2+0) + prime(2+1) + prime(2+2) + prime(2+3) + prime(2+4) = 3 + 5 + 7 + 11 + 13 = 39.
%p A034964 A034964:=n->add(ithprime(i), i=n..n+4): seq(A034964(n), n=1..50); # _Wesley Ivan Hurt_, Sep 14 2014
%t A034964 Plus@@@Partition[Prime[Range[100]],5,1] (* _Vladimir Joseph Stephan Orlovsky_, Feb 18 2010 *)
%o A034964 (Sage)
%o A034964 BB = primes_first_n(60)
%o A034964 L = []
%o A034964 for i in range(55):
%o A034964     L.append(BB[i]+BB[i+1]+BB[i+2]+BB[i+3]+BB[i+4])
%o A034964 L # _Zerinvary Lajos_, May 14 2007
%o A034964 (Magma) [&+[ NthPrime(n+k): k in [0..4] ]: n in [1..100] ]; // _Vincenzo Librandi_, Apr 03 2011
%o A034964 (PARI) a(n) = sum(k=n, n+4, prime(k)); \\ _Michel Marcus_, Sep 03 2016
%o A034964 (PARI) first(n) = {my(psum = 28, pr = List([2,3,5,7,11]), res = List([28])); for(i=2,n, psum -= pr[1]; listpop(pr, 1); listput(pr, nextprime(pr[4] + 1)); psum += pr[5]; listput(res, psum)); res} \\ _David A. Corneth_, Oct 14 2017
%Y A034964 Cf. A000040, A001043, A011974, A034707.
%Y A034964 Cf. A131686 (sums of five consecutive squares of primes).
%K A034964 nonn,easy
%O A034964 1,1
%A A034964 _Patrick De Geest_, Oct 15 1998
%E A034964 Offset changed to 1 by _Joerg Arndt_, Sep 04 2016