A038196 3-wave sequence starting with 1, 1, 1.
1, 1, 1, 2, 3, 5, 6, 11, 14, 25, 31, 56, 70, 126, 157, 283, 353, 636, 793, 1429, 1782, 3211, 4004, 7215, 8997, 16212, 20216, 36428, 45425, 81853, 102069, 183922, 229347, 413269, 515338, 928607, 1157954, 2086561, 2601899, 4688460, 5846414
Offset: 0
References
- J. Kappraff, Beyond Measure, World Scientific, Inc. 2002, p. 497.
Links
- F. v. Lamoen, Wave sequences
- Index entries for linear recurrences with constant coefficients, signature (0, 2, 0, 1, 0, -1).
Crossrefs
Programs
-
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))
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.
Also: 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).
Extensions
Edited by Floor van Lamoen, Feb 05 2002
Comments