OFFSET
1,1
COMMENTS
The sums of the following consecutive integer sequences are squares for any integer i and n >=1: if mod(n,3) = 0, 17*i + 1, ..., a(n)*i + (A001541(n/3)-1)/2 if mod(n,3) = 1 or 2, 17*i + 9, ..., a(n)*i + (a(n) - 1)/2.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,6,0,0,-1).
FORMULA
a(3n) = 17*A001541(n).
From Colin Barker, Mar 29 2012: (Start)
a(n) = 6*a(n-3) - a(n-6).
G.f.: x*(19 +33*x +51*x^2 -33*x^3 -19*x^4 -17*x^5)/(1 -6*x^3 +x^6). (End)
EXAMPLE
MATHEMATICA
LinearRecurrence[{0, 0, 6, 0, 0, -1}, {19, 33, 51, 81, 179, 289}, 40] (* G. C. Greubel, Aug 18 2021 *)
PROG
(Magma) I:=[19, 33, 51, 81, 179, 289]; [n le 6 select I[n] else 6*Self(n-3) - Self(n-6): n in [1..41]]; // G. C. Greubel, Aug 18 2021
(Sage)
def A106527_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( x*(19 +33*x +51*x^2 -33*x^3 -19*x^4 -17*x^5)/(1 -6*x^3 +x^6) ).list()
a=A106527_list(41); a[1:] # G. C. Greubel, Aug 18 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Andras Erszegi (erszegi.andras(AT)chello.hu), May 09 2005
STATUS
approved