Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #44 Dec 25 2024 04:57:19
%S 0,25,29,104,112,237,249,424,440,665,685,960,984,1309,1337,1712,1744,
%T 2169,2205,2680,2720,3245,3289,3864,3912,4537,4589,5264,5320,6045,
%U 6105,6880,6944,7769,7837,8712,8784,9709,9785,10760,10840,11865,11949,13024,13112
%N Numbers k such that 27*k+1 is a square.
%C Equivalently, numbers of the form m*(27*m+2), where m = 0,-1,1,-2,2,-3,3,...
%C Also, integer values of h*(h+2)/27.
%C The sequence terms are the exponents in the expansion of Product_{n >= 1} (1 - q^(54*n))*(1 - q^(54*n-25))*(1 - q^(54*n-29)) = 1 - q^25 - q^29 + q^104 + q^112 - q^237 - q^249 + + - - .... - _Peter Bala_, Dec 24 2024
%H Bruno Berselli, <a href="/A219258/b219258.txt">Table of n, a(n) for n = 1..1000</a>
%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^2*(25 + 4*x + 25*x^2)/((1 + x)^2*(1 - x)^3).
%F a(n) = a(-n+1) = (54*n*(n-1) + 23*(-1)^n*(2*n - 1) - 1)/8 + 3.
%F Sum_{n>=2} 1/a(n) = 27/4 - cot(2*Pi/27)*Pi/2. - _Amiram Eldar_, Mar 17 2022
%p A219258:=proc(q)
%p local n;
%p for n from 1 to q do if type(sqrt(27*n+1), integer) then print(n);
%p fi; od; end:
%p A219258(1000); # _Paolo P. Lava_, Feb 19 2013
%t Select[Range[0, 14000], IntegerQ[Sqrt[27 # + 1]] &]
%t CoefficientList[Series[x (25 + 4 x + 25 x^2)/((1 + x)^2 (1 - x)^3), {x, 0, 50}], x] (* _Vincenzo Librandi_, Aug 18 2013 *)
%o (Magma) [n: n in [0..14000] | IsSquare(27*n+1)];
%o (Magma) I:=[0,25,29,104,112]; [n le 5 select I[n] else Self(n-1)+2*Self(n-2)-2*Self(n-3)-Self(n-4)+Self(n-5): n in [1..50]]; // _Vincenzo Librandi_, Aug 18 2013
%Y Cf. similar sequences listed in A219257.
%Y Cf. A056081 (square roots of 27*a(n)+1).
%K nonn,easy
%O 1,2
%A _Bruno Berselli_, Nov 19 2012