login
A271675
Numbers m such that 3*m + 4 is a square.
3
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,2
COMMENTS
7 is the unique prime in this sequence. If m is in this sequence, then 3*m + 4 = k^2 for k is nonzero integer, that is, m = (k^2 - 4)/3 = (k-2)*(k+2)/3. So m can be only prime if one of divisors is prime and another one is 1. Otherwise there should be more than 1 prime divisors, that is n must be composite. - Altug Alkan, Apr 12 2016
From Ray Chandler, Apr 12 2016: (Start)
Square roots of resulting squares gives A001651 (with a different starting point).
Sequence is the union of (positive terms) in A140676 and A270710. (End)
The sequence terms are the exponents in the expansion of Sum_{n >= 0} q^n*(1 - q)*(1 - q^3)*...*(1 - q^(2*n+1)) = 1 - q^4 - q^7 + q^15 + q^20 - q^32 - q^50 + + - - .... - Peter Bala, Dec 19 2024
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
EXAMPLE
a(4) = 32 because 3*32 + 4 = 100 = 10*10.
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 *)
PROG
(Magma) [n: n in [0..4000] | IsSquare(3*n+4)];
(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
CROSSREFS
Cf. numbers n such that 3*n + k is a square: A120328 (k=-6), A271713 (k=-5), A056107 (k=-3), A257083 (k=-2), A033428 (k=0), A001082 (k=1), A080663 (k=3), this sequence (k=4), A100536 (k=6).
Sequence in context: A049832 A092309 A263617 * A356714 A039669 A109622
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Edited and extended by Bruno Berselli, Apr 12 2016
STATUS
approved