OFFSET
1,3
COMMENTS
Naturally, all terms are triangular numbers.
Numbers m such that k*m+1 and 8*m+1 are both squares:
k=1: A006454;
k=3: this sequence;
k=4: A029549;
k=5: 0, 3, 231, 4560, 333336, 6575751, ...
k=6: A200999;
k=7: A157879.
Numbers m such that 3*m+1 and k*m+1 are both squares:
k=1: A045899;
k=2: A045502;
k=4: A059989;
k=5: A159683;
k=6: 8*A029546;
k=7: A160695;
k=8: this sequence.
LINKS
Bruno Berselli, Table of n, a(n) for n = 1..500
Index entries for linear recurrences with constant coefficients, signature (1,98,-98,-1,1).
FORMULA
G.f.: x^2*(1 + 20*x + x^2)/((1 - x)*(1 - 10*x + x^2)*(1 + 10*x + x^2)).
a(n) = a(n-1) + 98*a(n-2) - 98*a(n-3) - a(n-4) + a(n-5).
G.f. of the quadrisections:
a(4k+1): 40*x*(52 + 3*x)/((1 - x)*(1 - 9602*x + x^2));
a(4k+2): (1 + 2178*x + 21*x^2)/((1 - x)*(1 - 9602*x + x^2));
a(4k+3): (21 + 2178*x + x^2)/((1 - x)*(1 - 9602*x + x^2));
a(4k+4): 40*(3 + 52*x)/((1 - x)*(1 - 9602*x + x^2)).
MATHEMATICA
LinearRecurrence[{1, 98, -98, -1, 1}, {0, 1, 21, 120, 2080}, 20] (* or *) CoefficientList[Series[x (1 + 20 x + x^2)/((1 - x) (1 - 10 x + x^2) (1 + 10 x + x^2)), {x, 0, 20}], x]
PROG
(PARI) a=vector(20); a[1]=0; a[2]=1; a[3]=21; a[4]=120; a[5]=2080; for(i=6, #a, a[i]=a[i-1]+98*a[i-2]-98*a[i-3]-a[i-4]+a[i-5]); a
(Maxima) a[1]:0$ a[2]:1$ a[3]:21$ a[4]:120$ a[5]:2080$ a[n]:=a[n-1]+98*a[n-2]-98*a[n-3]-a[n-4]+a[n-5]$ makelist(a[n], n, 1, 20);
(Magma) I:=[0, 1, 21, 120, 2080]; [n le 5 select I[n] else Self(n-1)+98*Self(n-2)-98*Self(n-3)-Self(n-4)+Self(n-5): n in [1..20]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Jul 15 2014
EXTENSIONS
Changed offset from 0 to 1 and adapted formulas by Bruno Berselli, Mar 03 2016
STATUS
approved