%I #20 Sep 08 2022 08:45:54
%S 1,4,20,29,61,76,124,145,209,236,316,349,445,484,596,641,769,820,964,
%T 1021,1181,1244,1420,1489,1681,1756,1964,2045,2269,2356,2596,2689,
%U 2945,3044,3316,3421,3709,3820,4124,4241,4561,4684,5020,5149,5501,5636,6004
%N Numbers k such that 11*k is 5 less than a square.
%C a(k)^k+1==0 (mod 3) for k of the form 3*(2*j+1); for other forms of k, a(k)^k-1==0 (mod 3). - _Bruno Berselli_, Oct 29 2010
%H G. C. Greubel, <a href="/A181433/b181433.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*(1+3*x+14*x^2+3*x^3+x^4)/((1-x)^3*(1+x)^2). - _Alexander R. Povolotsky_, Oct 21 2010
%F a(n) = (22*n*(n-1) - 5*(2*n-1)*(-1)^n + 3)/8.
%F a(n) = a(n-1) +2*a(n-2) -2*a(n-3) -a(n-4) +a(n-5) for n>5, a(1)=1, a(2)=4, a(3)=20, a(4)=29, a(5)=61.
%F Sum_{i=1..n} a(i) = n*(22*n^2-15*(-1)^n-13)/24.
%t Sort[Flatten[ Table[{((7 + 11 k)^2 - 5)/11, ((4 + 11 k)^2 - 5)/11}, {k, 0, 20, 1}]]]
%t Select[Range[7000],IntegerQ[Sqrt[11#+5]]&] (* _Harvey P. Dale_, Nov 21 2014 *)
%o (Magma) &cat[ [((4+11*k)^2-5)/11, ((7+11*k)^2-5)/11] : k in [0..23] ]; // _Klaus Brockhaus_, Oct 20 2010
%o (PARI) x='x+O('x^50); Vec(x*(1+3*x+14*x^2+3*x^3+x^4)/((1-x)^3*(1+x)^2)) \\ _G. C. Greubel_, Feb 25 2017
%K nonn,easy
%O 1,2
%A _Jon Perry_, Oct 20 2010
%E Formulas and more terms from _Klaus Brockhaus_ and _Bruno Berselli_, Oct 20 2010
%E Sum added and superfluous formula removed by _Bruno Berselli_, Oct 22 2010 - Nov 15 2010