A271723 Numbers k such that 3*k - 8 is a square.
3, 4, 8, 11, 19, 24, 36, 43, 59, 68, 88, 99, 123, 136, 164, 179, 211, 228, 264, 283, 323, 344, 388, 411, 459, 484, 536, 563, 619, 648, 708, 739, 803, 836, 904, 939, 1011, 1048, 1124, 1163, 1243, 1284, 1368, 1411, 1499, 1544, 1636, 1683, 1779, 1828, 1928, 1979, 2083, 2136, 2244, 2299
Offset: 1
Examples
a(1) = 3 because 3*3 - 8 = 1^2.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Crossrefs
Programs
-
Magma
[n: n in [1..2400] | IsSquare(3*n-8)];
-
Maple
seq(seq(((3*m+k)^2+8)/3, k=1..2),m=0..50); # Robert Israel, Dec 05 2016
-
Mathematica
Select[Range@ 2400, IntegerQ@ Sqrt[3 # - 8] &] (* Bruno Berselli, Apr 14 2016 *) LinearRecurrence[{1,2,-2,-1,1},{3,4,8,11,19},60] (* Harvey P. Dale, Oct 02 2020 *)
-
Python
from gmpy2 import is_square [n for n in range(3000) if is_square(3*n-8)] # Bruno Berselli, Dec 05 2016
-
Python
[(6*(n-1)*n-(2*n-1)*(-1)**n+23)/8 for n in range(1, 60)] # Bruno Berselli, Dec 05 2016
Formula
From Ilya Gutkovskiy, Apr 13 2016: (Start)
G.f.: x*(3 + x - 2*x^2 + x^3 + 3*x^4)/((1 - x)^3*(1 + x)^2).
a(n) = (6*(n - 1)*n - (2*n - 1)*(-1)^n + 23)/8. (End)
Comments