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!)
A260644 Four steps forward, three steps back. 7
0, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 7, 6, 5, 4, 5, 6, 7, 8, 7, 6, 5, 6, 7, 8, 9, 8, 7, 6, 7, 8, 9, 10, 9, 8, 7, 8, 9, 10, 11, 10, 9, 8, 9, 10, 11, 12, 11, 10, 9, 10, 11, 12, 13, 12, 11, 10, 11, 12, 13, 14, 13, 12, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000 (a(301) = 43 corrected by Georg Fischer, Apr 10 2019 *)
FORMULA
G.f.: x*(1+x+x^2+x^3-x^4-x^5-x^6) / ((1-x)^2*(1+x+x^2+x^3+x^4+x^5+x^6)).
a(n) = a(n-1) + a(n-7) - a(n-8) for n>7.
a(n) = Sum_{i=1..n} (-1)^floor((2i - 2)/7).
EXAMPLE
a(6k): 0, 2, 4, 6, 6, 6, 6, 6, 8, 10, 12, 12, 12, 12, 12, 14, ...
a(6k+1): 1, 1, 3, 5, 7, 7, 7, 7, 7, 9, 11, 13, 13, 13, 13, 13, ...
a(6k+2): 2, 2, 2, 4, 6, 8, 8, 8, 8, 8, 10, 12, 14, 14, 14, 14, ...
a(6k+3): 3, 3, 3, 3, 5, 7, 9, 9, 9, 9, 9, 11, 13, 15, 15, 15, ...
a(6k+4): 4, 4, 4, 4, 4, 6, 8, 10, 10, 10, 10, 10, 12, 14, 16, 16, ...
a(6k+5): 3, 5, 5, 5, 5, 5, 7, 9, 11, 11, 11, 11, 11, 13, 15, 17, ...
MAPLE
A260644:=n->add((-1)^floor((2*i-2)/7), i=1..n): seq(A260644(n), n=0..100);
MATHEMATICA
Table[Sum[(-1)^Floor[(2 i - 2)/7], {i, n}], {n, 0, 100}]
LinearRecurrence[{1, 0, 0, 0, 0, 0, 1, -1}, {0, 1, 2, 3, 4, 3, 2, 1}, 90] (* Harvey P. Dale, Dec 27 2023 *)
PROG
(PARI) concat(0, Vec((x+x^2+x^3+x^4-x^5-x^6-x^7)/((x-1)^2*(1+x+x^2+x^3+x^4+x^5+x^6)) + O(x^100))) \\ Altug Alkan, Nov 12 2015
CROSSREFS
Cf. A008611 (one step back, two steps forward).
Cf. A058207 (three steps forward, two steps back).
Sequence in context: A171456 A028356 A232244 * A073791 A350862 A030340
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Nov 11 2015
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 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)