OFFSET
0,2
COMMENTS
It appears this sequence gives all the nonnegative m such that 42*m^2 + 42*m + 1 is a square.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,26,-26,-1,1).
FORMULA
a(n) = 26*a(n-2) - a(n-4) + 12, for n > 3.
From R. J. Mathar, Sep 13 2009: (Start)
G.f.: 4*x*(1+x+x^2)/((1-x)*(1-26*x^2+x^4)).
a(n) = a(n-1) +26*a(n-2) -26*a(n-3) -a(n-4) +a(n-5). (End)
From Ralf Stephan, Nov 15 2010: (Start)
MATHEMATICA
LinearRecurrence[{1, 26, -26, -1, 1}, {0, 4, 8, 116, 220}, 30] (* Harvey P. Dale, Mar 25 2013 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( 4*x*(1+x+x^2)/((1-x)*(1-26*x^2+x^4)) )); // G. C. Greubel, Mar 15 2023
(SageMath)
@CachedFunction
def a(n): # a = A105036
if (n<5): return (0, 4, 8, 116, 220)[n]
else: return a(n-1) +26*a(n-2) -26*a(n-3) -a(n-4) +a(n-5)
[a(n) for n in range(41)] # G. C. Greubel, Mar 15 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Gerald McGarvey, Apr 03 2005
STATUS
approved