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!)
A267808 a(0) = a(1) = 1; for n>1, a(n) = (a(n-1) mod 4) + a(n-2). 3
1, 1, 2, 3, 5, 4, 5, 5, 6, 7, 9, 8, 9, 9, 10, 11, 13, 12, 13, 13, 14, 15, 17, 16, 17, 17, 18, 19, 21, 20, 21, 21, 22, 23, 25, 24, 25, 25, 26, 27, 29, 28, 29, 29, 30, 31, 33, 32, 33, 33, 34, 35, 37, 36, 37, 37, 38, 39, 41, 40, 41, 41, 42, 43, 45, 44, 45, 45, 46, 47, 49 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
From Bruno Berselli, Jan 21 2016: (Start)
G.f.: (1 + x^2 + x^3 + 2*x^4 - x^5) / ((1 + x)*(1 - x)^2*(1 - x + x^2)*(1 + x + x^2)).
a(n) = a(n-1) + a(n-6) - a(n-7) for n>6.
a(n) = n - floor((n+1)/3) + ((-1)^n - (-1)^(floor(n/3)))/2 + 1. (End)
MATHEMATICA
RecurrenceTable[{a[0] == a[1] == 1, a[n] == Mod[a[n - 1], 4] + a[n - 2]}, a, {n, 70}]
Table[n - Floor[(n + 1)/3] + ((-1)^n - (-1)^Floor[n/3])/2 + 1, {n, 0, 70}] (* or *) LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {1, 1, 2, 3, 5, 4, 5}, 80] (* Bruno Berselli, Jan 21 2016 *)
PROG
(PARI) a=vector(100); for(n=1, #a, if(n<3, a[n]=1, a[n]=a[n-1]%4+a[n-2])); a \\ Colin Barker, Jan 22 2016
CROSSREFS
Sequence in context: A104204 A131296 A371216 * A239852 A263279 A262507
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Edited by Bruno Berselli, Jan 21 2016.
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 13:45 EDT 2024. Contains 371975 sequences. (Running on oeis4.)