login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A289205 a(1) = a(2) = a(3) = 1, a(4) = 3; a(n) = n - a(n-a(n-1)) - a(n-a(n-2)) for n > 4. 2
1, 1, 1, 3, 1, 4, 2, 1, 6, 1, 9, 2, 1, 11, 1, 14, 2, 1, 16, 1, 19, 2, 1, 21, 1, 24, 2, 1, 26, 1, 29, 2, 1, 31, 1, 34, 2, 1, 36, 1, 39, 2, 1, 41, 1, 44, 2, 1, 46, 1, 49, 2, 1, 51, 1, 54, 2, 1, 56, 1, 59, 2, 1, 61, 1, 64, 2, 1, 66, 1, 69, 2, 1, 71, 1, 74, 2, 1, 76, 1, 79, 2, 1, 81, 1, 84, 2, 1, 86, 1, 89, 2, 1, 91, 1, 94, 2, 1, 96, 1, 99, 2, 1, 101 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Colin Barker, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,2,0,0,0,0,-1).

FORMULA

a(5k) = a(5k + 3) = 1, a(5k + 1) = 5k - 1, a(5k + 2) = 2, a(5k + 4) = 5k + 1 for k > 0.

From Colin Barker, Jun 28 2017: (Start)

G.f.: x*(1 + x)*(1 + x^2 + 2*x^3 - x^4 + 3*x^5 - 3*x^6 + 2*x^7 - 2*x^8 + x^9 + x^10 - 2*x^11 + 2*x^12) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)^2).

a(n) = 2*a(n-5) - a(n-10) for n>12.

(End)

MATHEMATICA

LinearRecurrence[{0, 0, 0, 0, 2, 0, 0, 0, 0, -1}, {1, 1, 1, 3, 1, 4, 2, 1, 6, 1, 9, 2, 1, 11}, 120] (* Harvey P. Dale, Aug 20 2017 *)

PROG

(PARI) q=vector(10^5); q[1]=q[2]=q[3]=1; q[4]=3; for(n=5, #q, q[n] = n-q[n-q[n-1]]-q[n-q[n-2]]); q

(PARI) Vec(x*(1 + x)*(1 + x^2 + 2*x^3 - x^4 + 3*x^5 - 3*x^6 + 2*x^7 - 2*x^8 + x^9 + x^10 - 2*x^11 + 2*x^12) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)^2) + O(x^100)) \\ Colin Barker, Jun 28 2017

CROSSREFS

Cf. A244477.

Sequence in context: A179833 A131033 A135821 * A283866 A134545 A174907

Adjacent sequences:  A289202 A289203 A289204 * A289206 A289207 A289208

KEYWORD

nonn,easy

AUTHOR

Altug Alkan, Jun 28 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 22 22:34 EDT 2019. Contains 328335 sequences. (Running on oeis4.)