A271713 Numbers n such that 3*n - 5 is a square.
2, 3, 7, 10, 18, 23, 35, 42, 58, 67, 87, 98, 122, 135, 163, 178, 210, 227, 263, 282, 322, 343, 387, 410, 458, 483, 535, 562, 618, 647, 707, 738, 802, 835, 903, 938, 1010, 1047, 1123, 1162, 1242, 1283, 1367, 1410, 1498, 1543, 1635, 1682, 1778, 1827, 1927, 1978, 2082, 2135, 2243, 2298
Offset: 1
Examples
a(3) = 7 because 3*7 - 5 = 16 = 4^2.
Links
- Index entries for linear recurrences with constant coefficients, signature (1, 2, -2, -1, 1).
Crossrefs
Programs
-
Magma
[ n: n in [0..2500] | IsSquare(3*n - 5)];
-
Maple
A271713:=n->`if`(issqr(3*n-5), n, NULL): seq(A271713(n), n=1..5000); # Wesley Ivan Hurt, Apr 13 2016
-
Mathematica
Select[Range@ 2300, IntegerQ@ Sqrt[3 # - 5] &] (* Michael De Vlieger, Apr 12 2016 *)
-
PARI
is(n)=issquare(3*n-5) \\ Charles R Greathouse IV, Apr 12 2016
-
PARI
a(n)=((n\2*3-(-1)^n)^2+5)/3 \\ Charles R Greathouse IV, Apr 12 2016
-
Python
from _future_ import division A271713_list = [(n**2+5)//3 for n in range(10**6) if not (n**2+5) % 3] # Chai Wah Wu, Apr 13 2016
Formula
G.f.: x*(2 + x + x^3 + 2*x^4)/((1 - x)^3*(1 + x)^2). - Ilya Gutkovskiy, Apr 12 2016
a(n) = (3/2)*n^2 + O(n). - Charles R Greathouse IV, Apr 12 2016
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>5. - Wesley Ivan Hurt, Apr 13 2016
Comments