OFFSET
0,2
COMMENTS
In A302717, if we count the terms added from each 4-tuple during each iteration we find that either two or three terms are added: 2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 3, ... where the set of three twos (2, 2, 2) appears with decreasing frequency. a(n) is the index into A302717 where each such set begins.
40*a(n) + 169 is a square, whose square root belongs to A063226 and A063206. - Bruno Berselli, Apr 17 2018
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
From Colin Barker, Apr 16 2018: (Start)
G.f.: x*(9 - 4*x)/(1 - x)^3.
a(n) = n*(5*n + 13)/2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>2. (End)
EXAMPLE
In A302717:
with a=9 and b=10, a(20,21,22) are appended;
with a=10 and b=11, a(23,24) are appended;
with a=11 and b=12, a(25,26) are appended;
with a=12 and b=13, a(27,28) are appended;
with a=13 and b=14, a(29,30,31) are appended, so a(2) = 23, because A302717(23) is the start of three consecutively added pairs of terms.
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {0, 9, 23}, 50] (* Vincenzo Librandi, Apr 17 2018 *)
PROG
(PARI) concat(0, Vec(x*(9 - 4*x) / (1 - x)^3 + O(x^50))) \\ Colin Barker, Apr 16 2018
(Magma) [n*(5*n+13)/2: n in [0..60]]; // Vincenzo Librandi, Apr 17 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
J. Stauduhar, Apr 15 2018
STATUS
approved