login
A105037
a(n) = 22*a(n-2) - a(n-4) + 10, for n > 3, with a(0) = 0, a(1) = 4, a(2) = 6, a(3) = 98.
4
0, 4, 6, 98, 142, 2162, 3128, 47476, 68684, 1042320, 1507930, 22883574, 33105786, 502396318, 726819372, 11029835432, 15956920408, 242153983196, 350325429614, 5316357794890, 7691202531110, 116717717504394, 168856130254816
OFFSET
0,2
COMMENTS
It appears this sequence gives all nonnegative m such that 120*m^2 + 120*m + 1 is a square.
FORMULA
a(n) = 22*a(n-2) - a(n-4) + 10, for n > 3.
G.f.: 2*x*(2 + x + 2*x^2)/((1-x)*(1-22*x^2+x^4)). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009
MATHEMATICA
LinearRecurrence[{1, 22, -22, -1, 1}, {0, 4, 6, 98, 142}, 41] (* G. C. Greubel, Mar 14 2023 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( 2*x*(2+x+2*x^2)/((1-x)*(1-22*x^2+x^4)) )); // G. C. Greubel, Mar 14 2023
(SageMath)
@CachedFunction
def a(n): # a = A105037
if (n<5): return (0, 4, 6, 98, 142)[n]
else: return a(n-1) +22*a(n-2) -22*a(n-3) -a(n-4) +a(n-5)
[a(n) for n in range(41)] # G. C. Greubel, Mar 14 2023
CROSSREFS
Cf. A077421.
Sequence in context: A087934 A052684 A213128 * A139730 A367880 A013023
KEYWORD
nonn,easy
AUTHOR
Gerald McGarvey, Apr 03 2005
STATUS
approved