login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A118591
Larger of two consecutive primes whose sum is a square.
1
19, 53, 73, 293, 883, 1153, 1931, 2593, 3529, 4051, 6053, 7207, 7451, 15139, 20809, 21647, 24203, 26921, 28807, 34849, 46819, 53147, 56453, 69193, 74507, 83233, 84053, 98573, 103067, 103969, 109517, 110459, 112339, 136247, 149059, 151253
OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..600 from Harvey P. Dale)
FORMULA
a(n) = A151800(A061275(n)). - Amiram Eldar, Jul 12 2024
EXAMPLE
17 and 19 are consecutive primes whose sum is 36, a square, so 19 is a term.
MATHEMATICA
Transpose[Select[Partition[Prime[Range[14000]], 2, 1], IntegerQ[ Sqrt[ Total[#]]]&]] [[2]] (* Harvey P. Dale, May 03 2012 *)
PROG
(PARI) g(n) = for(x=2, n, if(issquare(prime(x)+prime(x-1)), print1(prime(x)", ")))
(PARI) lista(pmax) = {my(p1 = 2); forprime(p2 = 3, pmax, if(issquare(p1 + p2), print1(p2, ", ")); p1 = p2); } \\ Amiram Eldar, Jul 12 2024
CROSSREFS
Sequence in context: A190267 A373008 A066775 * A031341 A165982 A194431
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, May 08 2006
STATUS
approved