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.

A253108 Numbers k such that (sum of k^2 through (k+2)^2) + (k+1)^2 is prime.

This page as a plain text file.
%I A253108 #32 Jun 22 2025 21:31:43
%S A253108 2,4,6,9,14,17,20,21,25,32,34,35,40,45,49,51,52,56,60,62,65,76,80,82,
%T A253108 86,87,89,94,95,96,100,104,105,107,112,114,115,116,117,124,126,135,
%U A253108 137,140,145,147,151,164,167,172,174,179,180,181,182,199,200,202,205,206,207
%N A253108 Numbers k such that (sum of k^2 through (k+2)^2) + (k+1)^2 is prime.
%C A253108 Sequence is related to the Legendre conjecture.
%C A253108 No terms == 3 mod 5 or == 1 mod 7 or 0 mod 11. - _Robert Israel_, Jun 24 2015
%H A253108 Robert Israel, <a href="/A253108/b253108.txt">Table of n, a(n) for n = 1..10000</a>
%e A253108 For n=2, n+1=3, n+2=4: we have
%e A253108 Sum(n^2,(n+1)^2)=Sum(2^2,3^2)=Sum(4,9)=Sum(4+5+6+7+8+9)=39,
%e A253108 Sum((n+1)^2,(n+2)^2)=Sum(3^2,4^2)=Sum(9,16)=Sum(9+10+11+12+13+14+15+16)=100,
%e A253108 39+100=139,
%e A253108 139 is prime; hence 2 is a term.
%p A253108 select(n -> isprime(4*n^3+14*n^2+20*n+11), [$1..1000]); # _Robert Israel_, Dec 28 2014
%t A253108 Select[Range[250],PrimeQ[Total[Range[#^2,(#+2)^2]]+(#+1)^2]&] (* _Harvey P. Dale_, Aug 04 2022 *)
%o A253108 (PARI) for (n=1,1000,if(isprime(4*n^3+14*n^2+20*n+11),print1(n",")))
%K A253108 nonn
%O A253108 1,1
%A A253108 _César Aguilera_, Dec 26 2014
%E A253108 a(47) corrected by _Robert Israel_, Jun 24 2015