OFFSET
0,4
COMMENTS
The 3-wave sequence with initial values a, b, c is formed by the following construction:
a.......a+b+c............3a+5b+6c...
..b...b+c...a+2b+2c..2a+4b+5c...
....c..........a+2b+3c...
REFERENCES
J. Kappraff, Beyond Measure, World Scientific, Inc. 2002, p. 497.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..1000
Floor van Lamoen, Wave sequences
Index entries for linear recurrences with constant coefficients, signature (0,2,0,1,0,-1).
FORMULA
a(n) = a(n-1) + a(n-2) if n is odd,
a(n) = a(n-1) + a(n-4) if n is even.
a(n) = 2*a(n-2) + a(n-4) - a(n-6).
G.f.: (1 + x - x^2)/(1 - 2*x^2 - x^4 + x^6).
MATHEMATICA
LinearRecurrence[{0, 2, 0, 1, 0, -1}, {1, 1, 1, 2, 3, 5}, 50] (* Paolo Xausa, Apr 19 2026 *)
PROG
(PARI) a(n)=if(n>-1, polcoeff((1+x-x^2)/(1-2*x^2-x^4+x^6)+x*O(x^n), n), if(n<-3, polcoeff((1-x-x^2)/(1-x^2-2*x^4+x^6)+O(x^(-3-n)), -4-n), 0))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
Edited by Floor van Lamoen, Feb 05 2002
More terms from Paolo Xausa, Apr 19 2026
STATUS
approved
