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!)
A109534 a(0)=1, a(n)=n+a(n-1) if n mod 2=0, a(n)=3n-a(n-1) if n mod 2 = 1. 0
1, 2, 4, 5, 9, 6, 12, 9, 17, 10, 20, 13, 25, 14, 28, 17, 33, 18, 36, 21, 41, 22, 44, 25, 49, 26, 52, 29, 57, 30, 60, 33, 65, 34, 68, 37, 73, 38, 76, 41, 81, 42, 84, 45, 89, 46, 92, 49, 97, 50, 100, 53, 105, 54, 108, 57, 113, 58, 116, 61, 121, 62, 124, 65, 129, 66, 132, 69, 137 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
G.f.: (1+2x+3x^2+3x^3+4x^4-x^5)/((1+x^2)(1-x)^2(1+x)^2). a(n)=a(n-2)+a(n-4)-a(n-6). a(2n)=A047461(n+1). a(2n+1)=A042963(n+1). [From R. J. Mathar, Oct 29 2008]
MAPLE
a:=proc(n) if n=0 then 1 elif n mod 2=0 then n+a(n-1) else 3*n-a(n-1) fi end: seq(a(n), n=0..68);
MATHEMATICA
a[0] = 1; a[n_] := a[n] = If[Mod[n, 2] == 0, a[n - 1] + n, -a[n - 1] + 3*n] aa = Table[a[n], {n, 0, 100}]
CROSSREFS
Sequence in context: A169624 A368797 A011175 * A276163 A011341 A116477
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Jun 18 2005
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 16 14:51 EDT 2024. Contains 371749 sequences. (Running on oeis4.)