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!)
A062112 a(0)=0; a(1)=1; a(n) = a(n-1) + (3 + (-1)^n)*a(n-2)/2. 4
0, 1, 1, 2, 4, 6, 14, 20, 48, 68, 164, 232, 560, 792, 1912, 2704, 6528, 9232, 22288, 31520, 76096, 107616, 259808, 367424, 887040, 1254464, 3028544, 4283008, 10340096, 14623104, 35303296, 49926400, 120532992, 170459392, 411525376 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
a(2*n) = A007070(n+1).
a(2*n+1) = A006012(n).
G.f.: x*(1+x-2*x^2)/(1-4*x^2+2*x^4).
a(n) = 4*a(n-2) - 2*a(n-4), a(0)=0, a(1)=1, a(2)=1, a(3)=2. - Harvey P. Dale, May 24 2013
EXAMPLE
a(4) = a(3) + 2*a(2) = 2 + 2 = 4.
MATHEMATICA
RecurrenceTable[{a[0]==0, a[1]==1, a[n]==a[n-1]+(3+(-1)^n) (a[n-2])/2}, a, {n, 40}] (* or *) LinearRecurrence[{0, 4, 0, -2}, {0, 1, 1, 2}, 40] (* Harvey P. Dale, May 24 2013 *)
PROG
(PARI) { for (n=0, 200, if (n>1, a=a1 + (3 + (-1)^n)*a2/2; a2=a1; a1=a, if (n==0, a=a2=0, a=a1=1)); write("b062112.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 01 2009
(Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1+x-2*x^2)/(1-4*x^2+2*x^4))); // G. C. Greubel, Oct 16 2018
CROSSREFS
Sequence in context: A064409 A225078 A032353 * A226302 A337499 A284886
KEYWORD
easy,nonn
AUTHOR
Olivier Gérard, Jun 05 2001
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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)