login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A142722 a(0)=a(1)=1 and a(n) = -(2*n-1)*a(n-1) + a(n-2) for n>=2. 0
1, 1, -2, 11, -79, 722, -8021, 104995, -1582946, 27015077, -514869409, 10839272666, -249818140727, 6256292790841, -169169723493434, 4912178274100427, -152446696220606671, 5035653153554120570, -176400307070614826621, 6531847014766302705547 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Table of n, a(n) for n=0..19.

MAPLE

a:= proc(n) if n<2 then 1 else a(n) := -(2*n-1)*a(n-1) + a(n-2) fi end:

seq (a(n), n=0..25);   # Sergei N. Gladkovskii, Jul 04 2012

MATHEMATICA

k = 2; b[0] = 1; b[n_] := b[n] = b[n - 1] + k

M[0] := {{-b[n], -1}, {1, 0}};

M[1] := {{-b[n], 1}, {-1, 0}};

v[0] = {1, 1};

v[n_] := v[n] = M[Mod[n, 2]].v[n - 1];

Table[v[n][[1]], {n, 1, 30}]

PROG

(PARI)

a(n)= if ( n<=1, 1, -(2*n-1)*a(n-1) + a(n-2) );

/* note this is inefficient, optimize using memoization: */

v=vector(66); v[1]=1; v[2]=1; /* PARI's vectors are one-based */

for (n=3, #v, v[n] = -(2*n-3)*v[n-1] + v[n-2]);

v /* show terms */

/* Joerg Arndt, Jul 023 2012 */

CROSSREFS

Sequence in context: A151418 A154273 A163203 * A099661 A027110 A118969

Adjacent sequences:  A142719 A142720 A142721 * A142723 A142724 A142725

KEYWORD

sign

AUTHOR

Roger L. Bagula and Gary W. Adamson, Sep 27 2008

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified November 22 20:13 EST 2014. Contains 249827 sequences.