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!)
A309554 a(1) = a(6) = 1, a(2) = a(3) = a(8) = 2, a(4) = a(7) = 7, a(5) = 5; a(n) = a(n-a(n-1)) + a(n-a(n-3)) for n > 8. 3
1, 2, 2, 7, 5, 1, 7, 2, 9, 3, 11, 3, 6, 4, 14, 5, 9, 16, 6, 15, 6, 10, 8, 21, 21, 21, 2, 28, 3, 30, 3, 6, 4, 33, 5, 9, 35, 6, 34, 6, 10, 8, 40, 40, 40, 2, 47, 3, 49, 3, 6, 4, 52, 5, 9, 54, 6, 53, 6, 10, 8, 59, 59, 59, 2, 66, 3, 68, 3, 6, 4, 71, 5, 9, 73, 6, 72, 6, 10, 8, 78, 78, 78, 2, 85, 3, 87, 3, 6, 4 (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-1)) + a(n-a(n-3)).
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1).
FORMULA
For k >= 1:
a(19*k-11) = 2,
a(19*k-10) = 19*k-10,
a(19*k-9) = 3,
a(19*k-8) = 19*k-8,
a(19*k-7) = 3,
a(19*k-6) = 6,
a(19*k-5) = 4,
a(19*k-4) = 19*k-5,
a(19*k-3) = 5,
a(19*k-2) = 9,
a(19*k-1) = 19*k-3,
a(19*k) = 6,
a(19*k+1) = 19*k-4,
a(19*k+2) = 6,
a(19*k+3) = 10,
a(19*k+4) = 8,
a(19*k+5) = a(19*k+6) = a(19*k+7) = 19*k+2.
From Colin Barker, Aug 08 2019: (Start)
G.f.: x*(1 + x)*(1 + x + x^2 + 6*x^3 - x^4 + 2*x^5 + 5*x^6 - 3*x^7 + 12*x^8 - 9*x^9 + 20*x^10 - 17*x^11 + 23*x^12 - 19*x^13 + 33*x^14 - 28*x^15 + 37*x^16 - 21*x^17 + 27*x^18 - 14*x^19 + 16*x^20 - 10*x^21 + 4*x^22 + 7*x^23 + 12*x^24 - 5*x^25 + 3*x^26 + 7*x^27 - 10*x^28 + 18*x^29 - 21*x^30 + 15*x^31 - 19*x^32 + 24*x^33 - 29*x^34 + 20*x^35 - 17*x^36 + 11*x^37 - 6*x^38 + 2*x^39 - 10*x^40 + 9*x^41 - 6*x^42 + 5*x^43) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + x^12 + x^13 + x^14 + x^15 + x^16 + x^17 + x^18)^2).
a(n) = 2*a(n-19) - a(n-38) for n > 45.
(End)
PROG
(PARI) q=vector(100); q[1]=q[6]=1; q[2]=q[3]=q[8]=2; q[4]=q[7]=7; q[5]=5; for(n=9, #q, q[n]=q[n-q[n-1]]+q[n-q[n-3]]); q
(PARI) Vec(x*(1 + x)*(1 + x + x^2 + 6*x^3 - x^4 + 2*x^5 + 5*x^6 - 3*x^7 + 12*x^8 - 9*x^9 + 20*x^10 - 17*x^11 + 23*x^12 - 19*x^13 + 33*x^14 - 28*x^15 + 37*x^16 - 21*x^17 + 27*x^18 - 14*x^19 + 16*x^20 - 10*x^21 + 4*x^22 + 7*x^23 + 12*x^24 - 5*x^25 + 3*x^26 + 7*x^27 - 10*x^28 + 18*x^29 - 21*x^30 + 15*x^31 - 19*x^32 + 24*x^33 - 29*x^34 + 20*x^35 - 17*x^36 + 11*x^37 - 6*x^38 + 2*x^39 - 10*x^40 + 9*x^41 - 6*x^42 + 5*x^43) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + x^12 + x^13 + x^14 + x^15 + x^16 + x^17 + x^18)^2) + O(x^90)) \\ Colin Barker, Aug 11 2019
(Magma) I:=[1, 2, 2, 7, 5, 1, 7, 2]; [n le 8 select I[n] else Self(n-Self(n-1))+Self(n-Self(n-3)): n in [1..90]]; // Marius A. Burtea, Aug 08 2019
CROSSREFS
Sequence in context: A074144 A239383 A325525 * A011146 A241370 A197735
KEYWORD
nonn,easy
AUTHOR
Altug Alkan and Rémy Sigrist, Aug 07 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 April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)