A271675 Numbers m such that 3*m + 4 is a square.
0, 4, 7, 15, 20, 32, 39, 55, 64, 84, 95, 119, 132, 160, 175, 207, 224, 260, 279, 319, 340, 384, 407, 455, 480, 532, 559, 615, 644, 704, 735, 799, 832, 900, 935, 1007, 1044, 1120, 1159, 1239, 1280, 1364, 1407, 1495, 1540, 1632, 1679, 1775, 1824, 1924, 1975, 2079, 2132, 2240, 2295, 2407
Offset: 1
Examples
a(4) = 32 because 3*32 + 4 = 100 = 10*10.
Links
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Crossrefs
Programs
-
Magma
[n: n in [0..4000] | IsSquare(3*n+4)];
-
Mathematica
Select[Range[0,2500], IntegerQ@ Sqrt[3 # + 4] &] (* Michael De Vlieger, Apr 12 2016 *) LinearRecurrence[{1,2,-2,-1,1},{0,4,7,15,20},60] (* Harvey P. Dale, Dec 09 2016 *)
-
Python
from gmpy2 import is_square for n in range(0,10**5): if(is_square(3*n+4)):print(n) # Soumil Mandal, Apr 12 2016
Formula
O.g.f.: x^2*(4 + 3*x - x^3)/((1 + x)^2*(1 - x)^3).
E.g.f.: 1 + (1 - 2*x)*exp(-x)/8 - 3*(3 - 4*x - 2*x^2)*exp(x)/8.
a(n) = A001082(n+1) - 1 = (6*n*(n+1) + (2*n + 1)*(-1)^n - 1)/8 - 1. Therefore: a(2*k+1) = k*(3*k+4), a(2*k) = (k+1)*(3*k-1).
Sum_{n>=2} 1/a(n) = 19/16 - Pi/(4*sqrt(3)). - Amiram Eldar, Jul 26 2024
Extensions
Edited and extended by Bruno Berselli, Apr 12 2016
Comments