login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers m such that 9*m+13 is a square.
1

%I #31 Sep 08 2022 08:46:15

%S -1,4,12,27,43,68,92,127,159,204,244,299,347,412,468,543,607,692,764,

%T 859,939,1044,1132,1247,1343,1468,1572,1707,1819,1964,2084,2239,2367,

%U 2532,2668,2843,2987,3172,3324,3519,3679,3884,4052,4267,4443,4668,4852,5087,5279,5524

%N Numbers m such that 9*m+13 is a square.

%C Equivalently, numbers of the form h*(9*h+4)-1, where h = 0, -1, 1, -2, 2, -3, 3, -4, 4, ...

%C Also, integer values of k*(k+4)/9 minus 1.

%C Is A063289 (after -1) the list of the square roots of 9*a(n)+13?

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).

%F G.f.: x*(-1 + 5*x + 10*x^2 + 5*x^3 - x^4)/((1 + x)^2*(1 - x)^3).

%F a(n) = a(-n+1) = (18*(n-1)*n + (2*n-1)*(-1)^n - 7)/8.

%F a(n) = A185039(n) + 1.

%t Select[Range[-1, 6000], IntegerQ[Sqrt[9 # + 13]] &]

%t Table[(18 (n-1) n + (2 n - 1) (-1)^n - 7)/8, {n, 1, 50}]

%t LinearRecurrence[{1,2,-2,-1,1},{-1,4,12,27,43},50] (* _Harvey P. Dale_, Jan 20 2020 *)

%o (Sage) [n for n in range(-1,6000) if is_square(9*n+13)]

%o (Sage) [(18*(n-1)*n+(2*n-1)*(-1)^n-7)/8 for n in range(1,50)]

%o (PARI) for(n=-1, 6000, if(issquare(9*n+13), print1(n, ", ")))

%o (PARI) vector(50, n, n; (18*(n-1)*n+(2*n-1)*(-1)^n-7)/8)

%o (Python) from gmpy2 import is_square

%o [n for n in range(-1,6000) if is_square(9*n+13)]

%o (Python) [(18*(n-1)*n+(2*n-1)*(-1)**n-7)/8 for n in range(1,60)]

%o (Magma) [n: n in [-1..6000] | IsSquare(9*n+13)];

%o (Magma) [(18*(n-1)*n+(2*n-1)*(-1)^n-7)/8: n in [1..50]];

%Y Cf. A185039.

%Y Cf. similar sequences listed in A266956.

%K sign,easy

%O 1,2

%A _Bruno Berselli_, Jan 07 2016