A036666 Numbers k such that 5*k + 1 is a square.
0, 3, 7, 16, 24, 39, 51, 72, 88, 115, 135, 168, 192, 231, 259, 304, 336, 387, 423, 480, 520, 583, 627, 696, 744, 819, 871, 952, 1008, 1095, 1155, 1248, 1312, 1411, 1479, 1584, 1656, 1767, 1843, 1960, 2040, 2163, 2247, 2376, 2464, 2599, 2691
Offset: 1
Links
- Jason Kimberley, Table of n, a(n) for n = 1..2000
- S. Cooper and M. D. Hirschhorn, Results of Hurwitz type for three squares. Discrete Math., Vol. 274, No. 1-3 (2004), pp. 9-24. See D(q).
- Ralf Stephan, On the solutions to 'px+1 is square'.
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Programs
-
GAP
List([1..50],n->(10*n*(n-1)+(2*n-1)*(-1)^n+1)/8); # Muniru A Asiru, Nov 28 2018
-
Magma
[(n-1)^2+(n-1)+Ceiling((n-1)/2)^2 : n in [1..50]]; // Wesley Ivan Hurt, Jun 05 2014
-
Maple
seq(n^2+n+ceil(n/2)^2, n=0..46); # Gary Detlefs, Feb 23 2010
-
Mathematica
(Select[ Range[121], Mod[ #, 5] == 1 || Mod[ #, 5] == 4 &]^2 - 1)/5 (* Robert G. Wilson v, Jun 23 2004 *) Flatten[Position[5*Range[0,3000]+1,?(IntegerQ[Sqrt[#]]&)]]-1 (* or *) LinearRecurrence[{1,2,-2,-1,1},{0,3,7,16,24},50] (* _Harvey P. Dale, Feb 13 2018 *) Accumulate[Table[n + LCM[n, 2], {n, 0, 121}]] (* Jon Maiga, Nov 28 2018 *)
-
PARI
a(n)=n^2+n+ceil(n/2)^2
Formula
G.f.: x*(3 + 4*x + 3*x^2) / ((1 - x)*(1 - x^2)).
a(n) has the form ((5*m + 1)^2 - 1)/5 if n is odd; a(n) has the form ((5*m + 4)^2 - 1)/5 if n is even.
a(2*k) = k*(5*k + 2), a(2*k + 1) = 5*k^2 + 8*k + 3. - Mohamed Bouhamida, Nov 06 2007
a(n+1) = n^2 + n + ceiling(n/2)^2. - Gary Detlefs, Feb 23 2010
From Bruno Berselli, Nov 27 2010: (Start)
a(n) = (10*n*(n - 1)+(2*n - 1)*(-1)^n + 1)/8.
5*a(n) + 1 = A047209(n)^2. (End)
E.g.f.: (exp(x)*(1 + 10*x^2) - exp(-x)*(1 + 2*x))/8. - Franck Maminirina Ramaharo, Nov 29 2018
From Amiram Eldar, Mar 15 2022: (Start)
Sum_{n>=2} 1/a(n) = 5/4 - sqrt(1-2/sqrt(5))*Pi/2.
Sum_{n>=2} (-1)^n/a(n) = 5*(log(5)-1)/4 - sqrt(5)*log(phi)/2, where phi is the golden ratio (A001622). (End)
Extensions
Better description and additional formula from Santi Spadaro, Jul 12 2001
Comments