A076305 Numbers k such that prime(k) + prime(k+1) + prime(k+2) is a square.
6, 12, 59, 65, 112, 965, 1029, 1455, 1706, 1830, 1890, 2573, 3457, 4490, 4664, 5609, 7927, 9130, 10078, 10143, 12597, 18248, 19727, 20086, 20887, 21708, 22739, 25041, 26536, 28511, 29346, 29664, 29774, 33387, 39945, 40677, 46136, 49869, 58135
Offset: 1
Keywords
Examples
6 is a term because prime(6) + prime(7) + prime(8) = 13 + 17 + 19 = 49 = 7^2.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..600 from Harvey P. Dale)
Crossrefs
Programs
-
Magma
[k:k in [1..60000]| IsSquare(&+[NthPrime(k+m):m in [0,1,2]])]; // Marius A. Burtea, Jan 04 2020
-
Mathematica
Select[Range[60000], IntegerQ[Sqrt[Sum[Prime[k], {k, #, # + 2}]]] &] (* Ray Chandler, Sep 26 2006 *) Position[Partition[Prime[Range[60000]],3,1],?(IntegerQ[Sqrt[ Total[ #]]]&), 1,Heads->False]//Flatten (* _Harvey P. Dale, Sep 28 2018 *)
-
PARI
n=0; p=2; q=3; forprime(r=5, 1e9, n++; if(issquare(p+q+r), print1(n", ")); p=q; q=r) \\ Charles R Greathouse IV, Apr 07 2017
Formula
Extensions
Corrected by Ray Chandler, Sep 26 2006
Comments