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”).

A266956
Numbers m such that 9*m+7 is a square.
7
1, 2, 18, 21, 53, 58, 106, 113, 177, 186, 266, 277, 373, 386, 498, 513, 641, 658, 802, 821, 981, 1002, 1178, 1201, 1393, 1418, 1626, 1653, 1877, 1906, 2146, 2177, 2433, 2466, 2738, 2773, 3061, 3098, 3402, 3441, 3761, 3802, 4138, 4181, 4533, 4578, 4946, 4993, 5377, 5426
OFFSET
1,2
COMMENTS
Equivalently, numbers of the form h*(9*h+8)+1, where h = 0, -1, 1, -2, 2, -3, 3, -4, 4, ...
Also, integer values of k*(k+8)/9 plus 1.
It is easy to see that the Diophantine equation 9*x+3*j+1 = y^2 has infinitely many solutions in integers (x,y) for any j in Z. It follows a table with j = -5..5:
...
j = -5, x: 2, 7, 15, 30, 46, 71, 95, 130, 162, 207, 247, ...
j = -4, x: 3, 4, 20, 23, 55, 60, 108, 115, 179, 188, 268, ...
j = -3, x: 1, 8, 12, 33, 41, 76, 88, 137, 153, 216, 236, ...
j = -2, x: 1, 6, 14, 29, 45, 70, 94, 129, 161, 206, 246, ...
j = -1, x: 2, 3, 19, 22, 54, 59, 107, 114, 178, 187, 267, ...
j = 0, x: 0, 7, 11, 32, 40, 75, 87, 136, 152, 215, 235, ... (A132355)
j = 1, x: 0, 5, 13, 28, 44, 69, 93, 128, 160, 205, 245, ... (A185039)
j = 2, x: 1, 2, 18, 21, 53, 58, 106, 113, 177, 186, 266, ... (A266956)
j = 3, x: -1, 6, 10, 31, 39, 74, 86, 135, 151, 214, 234, ... (A266957)
j = 4, x: -1, 4, 12, 27, 43, 68, 92, 127, 159, 204, 244, ... (A266958)
j = 5, x: 0, 1, 17, 20, 52, 57, 105, 112, 176, 185, 265, ... (A218864)
...
The general closed form of these sequences is:
b(n,j) = (18*(n-1)*n + s(j)*(2*n-1)*(-1)^n + t(j))/8, where s(j) = 6*(-j) + 18*floor(j/3) - (-1)^floor(2*(j+1)/3) + 6 and t(j) = 4*(-j) + 4*floor((j+1)/3) + 5.
a(2m) - a(2m-1) gives the odd numbers (A005408); a(2m+1) - a(2m) gives the multiples of 16 (A008598).
FORMULA
G.f.: x*(1 + x + 14*x^2 + x^3 + x^4)/((1 + x)^2*(1 - x)^3).
a(n) = a(-n+1) = (18*(n-1)*n - 7*(2*n-1)*(-1)^n + 1)/8.
a(n) = A218864(n) + 1.
MATHEMATICA
Select[Range[0, 6000], IntegerQ[Sqrt[9 # + 7]] &]
Table[(18 (n - 1) n - 7 (2 n - 1) (-1)^n + 1)/8, {n, 1, 50}]
PROG
(Sage) [n for n in (0..6000) if is_square(9*n+7)]
(Sage) [(18*(n-1)*n-7*(2*n-1)*(-1)^n+1)/8 for n in (1..50)]
(PARI) for(n=0, 6000, if(issquare(9*n+7), print1(n, ", ")))
(PARI) vector(50, n, n; (18*(n-1)*n-7*(2*n-1)*(-1)^n+1)/8)
(Python) from gmpy2 import is_square
[n for n in range(6000) if is_square(9*n+7)]
(Python) [(18*(n-1)*n-7*(2*n-1)*(-1)**n+1)/8 for n in range(1, 60)]
(Magma) [n: n in [0..6000] | IsSquare(9*n+7)];
(Magma) [(18*(n-1)*n-7*(2*n-1)*(-1)^n+1)/8: n in [1..50]];
CROSSREFS
Cf. numbers m such that 9*m+i: A132355 (i=1), A185039 (i=4), this sequence (i=7), A005563 (i=9), A266957 (i=10), A266958 (i=13), A218864 (i=16), A008865 (i=18, without -2).
Cf. A156638: square roots of 9*a(n)+7.
Sequence in context: A022371 A299380 A352159 * A092587 A247457 A015787
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Jan 07 2016
STATUS
approved