This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A266956 #51 Sep 08 2022 08:46:15 %S A266956 1,2,18,21,53,58,106,113,177,186,266,277,373,386,498,513,641,658,802, %T A266956 821,981,1002,1178,1201,1393,1418,1626,1653,1877,1906,2146,2177,2433, %U A266956 2466,2738,2773,3061,3098,3402,3441,3761,3802,4138,4181,4533,4578,4946,4993,5377,5426 %N A266956 Numbers m such that 9*m+7 is a square. %C A266956 Equivalently, numbers of the form h*(9*h+8)+1, where h = 0, -1, 1, -2, 2, -3, 3, -4, 4, ... %C A266956 Also, integer values of k*(k+8)/9 plus 1. %C A266956 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: %C A266956 ... %C A266956 j = -5, x: 2, 7, 15, 30, 46, 71, 95, 130, 162, 207, 247, ... %C A266956 j = -4, x: 3, 4, 20, 23, 55, 60, 108, 115, 179, 188, 268, ... %C A266956 j = -3, x: 1, 8, 12, 33, 41, 76, 88, 137, 153, 216, 236, ... %C A266956 j = -2, x: 1, 6, 14, 29, 45, 70, 94, 129, 161, 206, 246, ... %C A266956 j = -1, x: 2, 3, 19, 22, 54, 59, 107, 114, 178, 187, 267, ... %C A266956 j = 0, x: 0, 7, 11, 32, 40, 75, 87, 136, 152, 215, 235, ... (A132355) %C A266956 j = 1, x: 0, 5, 13, 28, 44, 69, 93, 128, 160, 205, 245, ... (A185039) %C A266956 j = 2, x: 1, 2, 18, 21, 53, 58, 106, 113, 177, 186, 266, ... (A266956) %C A266956 j = 3, x: -1, 6, 10, 31, 39, 74, 86, 135, 151, 214, 234, ... (A266957) %C A266956 j = 4, x: -1, 4, 12, 27, 43, 68, 92, 127, 159, 204, 244, ... (A266958) %C A266956 j = 5, x: 0, 1, 17, 20, 52, 57, 105, 112, 176, 185, 265, ... (A218864) %C A266956 ... %C A266956 The general closed form of these sequences is: %C A266956 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. %C A266956 a(2m) - a(2m-1) gives the odd numbers (A005408); a(2m+1) - a(2m) gives the multiples of 16 (A008598). %H A266956 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1). %F A266956 G.f.: x*(1 + x + 14*x^2 + x^3 + x^4)/((1 + x)^2*(1 - x)^3). %F A266956 a(n) = a(-n+1) = (18*(n-1)*n - 7*(2*n-1)*(-1)^n + 1)/8. %F A266956 a(n) = A218864(n) + 1. %t A266956 Select[Range[0, 6000], IntegerQ[Sqrt[9 # + 7]] &] %t A266956 Table[(18 (n - 1) n - 7 (2 n - 1) (-1)^n + 1)/8, {n, 1, 50}] %o A266956 (Sage) [n for n in (0..6000) if is_square(9*n+7)] %o A266956 (Sage) [(18*(n-1)*n-7*(2*n-1)*(-1)^n+1)/8 for n in (1..50)] %o A266956 (PARI) for(n=0, 6000, if(issquare(9*n+7), print1(n, ", "))) %o A266956 (PARI) vector(50, n, n; (18*(n-1)*n-7*(2*n-1)*(-1)^n+1)/8) %o A266956 (Python) from gmpy2 import is_square %o A266956 [n for n in range(6000) if is_square(9*n+7)] %o A266956 (Python) [(18*(n-1)*n-7*(2*n-1)*(-1)**n+1)/8 for n in range(1, 60)] %o A266956 (Magma) [n: n in [0..6000] | IsSquare(9*n+7)]; %o A266956 (Magma) [(18*(n-1)*n-7*(2*n-1)*(-1)^n+1)/8: n in [1..50]]; %Y A266956 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). %Y A266956 Cf. A156638: square roots of 9*a(n)+7. %Y A266956 Cf. A005408, A008598. %K A266956 nonn,easy %O A266956 1,2 %A A266956 _Bruno Berselli_, Jan 07 2016