login
A266958
Numbers m such that 9*m+13 is a square.
1
-1, 4, 12, 27, 43, 68, 92, 127, 159, 204, 244, 299, 347, 412, 468, 543, 607, 692, 764, 859, 939, 1044, 1132, 1247, 1343, 1468, 1572, 1707, 1819, 1964, 2084, 2239, 2367, 2532, 2668, 2843, 2987, 3172, 3324, 3519, 3679, 3884, 4052, 4267, 4443, 4668, 4852, 5087, 5279, 5524
OFFSET
1,2
COMMENTS
Equivalently, numbers of the form h*(9*h+4)-1, where h = 0, -1, 1, -2, 2, -3, 3, -4, 4, ...
Also, integer values of k*(k+4)/9 minus 1.
Is A063289 (after -1) the list of the square roots of 9*a(n)+13?
FORMULA
G.f.: x*(-1 + 5*x + 10*x^2 + 5*x^3 - x^4)/((1 + x)^2*(1 - x)^3).
a(n) = a(-n+1) = (18*(n-1)*n + (2*n-1)*(-1)^n - 7)/8.
a(n) = A185039(n) + 1.
MATHEMATICA
Select[Range[-1, 6000], IntegerQ[Sqrt[9 # + 13]] &]
Table[(18 (n-1) n + (2 n - 1) (-1)^n - 7)/8, {n, 1, 50}]
LinearRecurrence[{1, 2, -2, -1, 1}, {-1, 4, 12, 27, 43}, 50] (* Harvey P. Dale, Jan 20 2020 *)
PROG
(Sage) [n for n in range(-1, 6000) if is_square(9*n+13)]
(Sage) [(18*(n-1)*n+(2*n-1)*(-1)^n-7)/8 for n in range(1, 50)]
(PARI) for(n=-1, 6000, if(issquare(9*n+13), print1(n, ", ")))
(PARI) vector(50, n, n; (18*(n-1)*n+(2*n-1)*(-1)^n-7)/8)
(Python) from gmpy2 import is_square
[n for n in range(-1, 6000) if is_square(9*n+13)]
(Python) [(18*(n-1)*n+(2*n-1)*(-1)**n-7)/8 for n in range(1, 60)]
(Magma) [n: n in [-1..6000] | IsSquare(9*n+13)];
(Magma) [(18*(n-1)*n+(2*n-1)*(-1)^n-7)/8: n in [1..50]];
CROSSREFS
Cf. A185039.
Cf. similar sequences listed in A266956.
Sequence in context: A239940 A320923 A008107 * A057306 A212973 A047732
KEYWORD
sign,easy
AUTHOR
Bruno Berselli, Jan 07 2016
STATUS
approved