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.

Showing 1-2 of 2 results.

A034964 Sums of five consecutive primes.

Original entry on oeis.org

28, 39, 53, 67, 83, 101, 119, 139, 161, 181, 199, 221, 243, 263, 287, 311, 331, 351, 373, 395, 421, 449, 473, 497, 517, 533, 559, 587, 617, 647, 683, 707, 733, 759, 787, 811, 839, 863, 891, 917, 941, 961, 991, 1023, 1057, 1089, 1123, 1151, 1169, 1193
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Comments

Except for the first term, all terms are odd. - Alonso del Arte, Dec 30 2011

Examples

			a(1) = prime(1+0) + prime(1+1) + prime(1+2) + prime(1+3) + prime(1+4) = 2 + 3 + 5 + 7 + 11 = 28.
a(2) = prime(2+0) + prime(2+1) + prime(2+2) + prime(2+3) + prime(2+4) = 3 + 5 + 7 + 11 + 13 = 39.
		

References

  • Owen O'Shea and Underwood Dudley, The Magic Numbers of the Professor, Mathematical Association of America (2007), p. 62

Crossrefs

Cf. A131686 (sums of five consecutive squares of primes).

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..4] ]: n in [1..100] ]; // Vincenzo Librandi, Apr 03 2011
    
  • Maple
    A034964:=n->add(ithprime(i), i=n..n+4): seq(A034964(n), n=1..50); # Wesley Ivan Hurt, Sep 14 2014
  • Mathematica
    Plus@@@Partition[Prime[Range[100]],5,1] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2010 *)
  • PARI
    a(n) = sum(k=n, n+4, prime(k)); \\ Michel Marcus, Sep 03 2016
    
  • 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
  • Sage
    BB = primes_first_n(60)
    L = []
    for i in range(55):
        L.append(BB[i]+BB[i+1]+BB[i+2]+BB[i+3]+BB[i+4])
    L # Zerinvary Lajos, May 14 2007
    

Formula

a(n) = Sum_{i=n..n+4} prime(i). - Wesley Ivan Hurt, Sep 14 2014

Extensions

Offset changed to 1 by Joerg Arndt, Sep 04 2016

A076815 Initial indices of five successive primes squared with integer average.

Original entry on oeis.org

79, 258, 397, 428, 429, 502, 503, 609, 787, 788, 925, 926, 927, 1026, 1027, 1028, 1105, 1312, 1334, 1335, 1343, 1348, 1349, 1378, 1422, 1524, 1572, 1601, 1602, 1790, 1791, 1813, 2015, 2081, 2082, 2125, 2126, 2131, 2141, 2142, 2147, 2292, 2448, 2765, 2766
Offset: 1

Views

Author

Zak Seidov, Oct 17 2002

Keywords

Comments

Or, numbers n such that sum of 5 consecutive primes squared, starting with p(n), ends with 5.
Unlike the average of two, three, four and six successive primes squared (with initial indices > 1,2,1,2, respectively), the average of five successive primes squared is rarely an integer.
Cases of sums ending with 5 are much less numerous than cases with 1, 3, 7 and 9.
E.g. for the first 20000, sums with final digits 1, 3, 5, 7 and 9 are 7238, 2380, 466, 2529 and 7386 (and 1 case with final 8, 208=A131686(1)). And for first 200000 sums the corresponding numbers are 71166, 25820, 5956, 26075, 70982.
The explanation of this "deficiency of final 5's" is simple: assuming that final digits {1,3,7,9} of primes are equally often, we get that probabilities for final digits {1,3,5,7,9} of sum of squares of five primes are {10/32,5/32,2/32,5/32,10/32}.

Examples

			sum(prime(i)^2,i=79..83)/5=(401^2+409^2+419^2+421^2+431^2)/5=866645/5=173329=A076814(1),
sum(prime(i)^2,i=258..262)/5=(1627^2+1637^2+1657^2+1663^2+1667^2)/5=13617005/5=2723401=A076814(2).
		

Crossrefs

Programs

  • Mathematica
    PrimePi[Sqrt[#]]&/@Select[Partition[Prime[Range[3000]]^2,5,1],IntegerQ[ Mean[ #]]&][[All,1]] (* Harvey P. Dale, Jul 15 2017 *)

Extensions

Edited and merged with A131359 by Zak Seidov, May 18 2008 at the suggestion of R. J. Mathar
Showing 1-2 of 2 results.