OFFSET
0,5
COMMENTS
This sequence was constructed to show that there are many sequences, besides those merging with multiples of the Padovan sequence A000931, with the property that for any four consecutive terms the maximum term is the sum of the two minimum terms. This refutes a conjecture that was formerly in that entry.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
David Nacin, Van der Laan Sequences and a Conjecture on Padovan Numbers, J. Int. Seq., Vol. 26 (2023), Article 23.1.2.
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,0,0,0,-1).
FORMULA
G.f.: (1 + x + x^2 + x^3 + x^4)/(1 - x^3 - x^6) - 1/(1 - x^3).
G.f.: (x + x^2 + x^3 - x^5 - x^7)/(1 - 2*x^3 + x^9).
a(n) = 2*a(n-3) - a(n-9). - G. C. Greubel, Dec 04 2018
EXAMPLE
For n=13, as n is 1 (mod 3), we find a(3*4+1) is the 4+2=6th Fibonacci number which is 8.
MAPLE
seq(coeff(series(((x^4+x^3+x^2+x+1)/(1-x^3-x^6))-(1/(1-x^3)), x, n+1), x, n), n = 0 .. 60); # Muniru A Asiru, Nov 29 2018
MATHEMATICA
CoefficientList[Series[(x+x^2+x^3-x^5-x^7)/(1-2x^3+x^9), {x, 0, 20}], x] (* or *)
LinearRecurrence[{0, 0, 2, 0, 0, 0, 0, 0, -1}, {0, 1, 1, 1, 2, 1, 2, 3, 2}, 50] (* G. C. Greubel, Dec 04 2018 *)
PROG
(Python)
def a(n):
if n<6:
return [0, 1, 1, 1, 2, 1][n]
return a(n-3)+a(n-6)+[1, 0, 0][n%3]
(Racket)
(define (f x) (cond [(< x 6) (list-ref (list 0 1 1 1 2 1) x)]
[else (+ (f (- x 3)) (f (- x 6)) (list-ref (list 1 0 0) (remainder x 3)))]))
(Magma) m:=70; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!((x+x^2+x^3-x^5-x^7)/(1-2*x^3+x^9))); // Vincenzo Librandi, Nov 29 2018
(PARI) my(x='x+O('x^70)); Vec((x+x^2+x^3-x^5-x^7)/(1-2*x^3+x^9)) \\ G. C. Greubel, Dec 04 2018
(Sage) s=((x+x^2+x^3-x^5-x^7)/(1-2*x^3+x^9)).series(x, 70); s.coefficients(x, sparse=False) # G. C. Greubel, Dec 04 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
David Nacin, Nov 23 2018
STATUS
approved