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!)
A215005 a(n) = a(n-2) + a(n-1) + floor(n/2) + 1 for n > 1 and a(0)=0, a(1)=1. 2
0, 1, 3, 6, 12, 21, 37, 62, 104, 171, 281, 458, 746, 1211, 1965, 3184, 5158, 8351, 13519, 21880, 35410, 57301, 92723, 150036, 242772, 392821, 635607, 1028442, 1664064, 2692521, 4356601, 7049138, 11405756, 18454911, 29860685, 48315614, 78176318, 126491951, 204668289 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

If the seed is {1,1}: 1, 1, 4, 7, 14, 24, 42, 70, 117, 192, 315, 513, 835, 1355, 2198, 3561, 5768, 9338, 15116, 24464, 39591, 64066, 103669, 167747, ...

If the seed is {1,2}: A129696.

Same seed, but -1 in the formula instead of +1: b(n)=a(n-2)+1 for n>=2, i.e. 0, 1, 1, 2, 4, 7, 13, 22, 38, 63, 105, 172, 282, 459, 747, 1212, 1966, 3185, 5159, 8352, 13520, 21881, 35411, 57302, 92724, 150037, 242773, 392822, ...

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

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

FORMULA

a(n) = 2*F(n+2)-n/2-9/4+(-1)^n/4, where F is Fibonacci number. - Vaclav Kotesovec, Aug 11 2012

From Colin Barker, Sep 16 2015: (Start)

a(n) = 2*a(n-1) + a(n-2) - 3*a(n-3) + a(n-5) for n>4.

G.f.: x*(x^2-x-1) / ((x-1)^2*(x+1)*(x^2+x-1)).

(End)

MATHEMATICA

LinearRecurrence[{2, 1, -3, 0, 1}, {0, 1, 3, 6, 12}, 39] (* Jean-Fran├žois Alcover, Oct 05 2017 *)

PROG

(Python)

prpr = 0

prev = 1

for n in range(2, 100):

    print prpr,

    curr = prpr+prev + 1 + n//2

    prpr = prev

    prev = curr

(PARI) concat(0, Vec(x*(x^2-x-1) / ((x-1)^2*(x+1)*(x^2+x-1)) + O(x^100))) \\ Colin Barker, Sep 16 2015

CROSSREFS

Cf. A129696 (same formula, seed {1,2}).

Cf. A000071 (a(n+1) = a(n-1) + a(n) + 1).

Sequence in context: A128128 A162920 A247662 * A006330 A293636 A087503

Adjacent sequences:  A215002 A215003 A215004 * A215006 A215007 A215008

KEYWORD

nonn,easy

AUTHOR

Alex Ratushnyak, Jul 31 2012

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 28 05:46 EST 2020. Contains 332321 sequences. (Running on oeis4.)