login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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. 3
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

Harry J. Smith, Table of n, a(n) for n = 0..200

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

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

Cf. A006012, A007068, A007070.

Sequence in context: A064409 A225078 A032353 * A226302 A284886 A249339

Adjacent sequences:  A062109 A062110 A062111 * A062113 A062114 A062115

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 18 09:39 EST 2020. Contains 332011 sequences. (Running on oeis4.)