OFFSET
1,2
COMMENTS
The terms show a 3-quasiperiodic pattern (2m-1, 4m-1, 2m), m = 1, 2, 3, ...
Or: group positive integers by pairs, then insert the sum of the pair between the two terms.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..19683
Eric Angelini, Re: Add or subtract my cumulative sum of terms, SeqFan list, Feb 24 2020.
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
a(3k-2) = 2k - 1, a(3k-1) = 4k - 1, a(3k) = 2k, for all k >= 1.
From Colin Barker, Feb 25 2020: (Start)
G.f.: x*(1 + x)*(1 + 2*x + x^3) / ((1 - x)^2*(1 + x + x^2)^2).
a(n) = 2*a(n-3) - a(n-6) for n>6.
(End)
PROG
(PARI) apply( {A332057(n)=n<<max(n%3, 1)\/3}, [1..99])
(PARI) Vec(x*(1 + x)*(1 + 2*x + x^3) / ((1 - x)^2*(1 + x + x^2)^2) + O(x^60)) \\ Colin Barker, Feb 26 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric Angelini and M. F. Hasler, Feb 24 2020
STATUS
approved