login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309496 a(1) = 1, a(2) = 3, a(3) = a(4) = a(6) = 6, a(5) = 2, a(7) = 4; a(n) = a(n-a(n-4)) + a(n-a(n-5)) for n > 7. 4
1, 3, 6, 6, 2, 6, 4, 6, 10, 12, 6, 12, 10, 9, 16, 18, 6, 16, 18, 9, 22, 24, 6, 22, 24, 9, 28, 30, 6, 28, 30, 9, 34, 36, 6, 34, 36, 9, 40, 42, 6, 40, 42, 9, 46, 48, 6, 46, 48, 9, 52, 54, 6, 52, 54, 9, 58, 60, 6, 58, 60, 9, 64, 66, 6, 64, 66, 9, 70, 72, 6, 70, 72, 9, 76, 78, 6, 76, 78, 9, 82, 84, 6, 82, 84, 9, 88 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A well-defined solution sequence for recurrence a(n) = a(n-a(n-4)) + a(n-a(n-5)).
LINKS
FORMULA
For k > 2:
a(6*k-4) = 9,
a(6*k-3) = 6*k-2,
a(6*k-2) = 6*k,
a(6*k-1) = 6,
a(6*k) = 6*k-2,
a(6*k+1) = 6*k.
From Colin Barker, Aug 05 2019: (Start)
G.f.: x*(1 + 3*x + 6*x^2 + 5*x^3 - x^4 - 3*x^6 + x^7 - 2*x^8 + 3*x^9 + x^10 + 2*x^11 - x^13 - 3*x^16 - 2*x^17 + 2*x^18 + 2*x^20 - 2*x^21) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)^2).
a(n) = a(n-3) + a(n-6) - a(n-9) for n > 22.
(End)
MATHEMATICA
a[n_] := a[n] = If[n < 8, {1, 3, 6, 6, 2, 6, 4}[[n]], a[n - a[n-4]] + a[n - a[n-5]]]; Array[a, 87] (* Giovanni Resta, Aug 07 2019 *)
PROG
(PARI) q=vector(100); q[1]=1; q[2]=3; q[3]=q[4]=q[6]=6; q[5]=2; q[7]=4; for(n=8, #q, q[n] = q[n-q[n-4]]+q[n-q[n-5]]); q
(PARI) Vec(x*(1 + 3*x + 6*x^2 + 5*x^3 - x^4 - 3*x^6 + x^7 - 2*x^8 + 3*x^9 + x^10 + 2*x^11 - x^13 - 3*x^16 - 2*x^17 + 2*x^18 + 2*x^20 - 2*x^21) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)^2) + O(x^80)) \\ Colin Barker, Aug 15 2019
(Magma) I:=[1, 3, 6, 6, 2, 6, 4]; [n le 7 select I[n] else Self(n-Self(n-4))+Self(n-Self(n-5)): n in [1..90]]; // Marius A. Burtea, Aug 07 2019
CROSSREFS
Sequence in context: A239567 A198239 A086727 * A021277 A245215 A232569
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Aug 05 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 1 01:46 EDT 2024. Contains 372143 sequences. (Running on oeis4.)