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!)
A001046 a(n) = n*(n-1)*a(n-1)/2 + a(n-2), a(0) = a(1) = 1.
(Formerly M1811 N0717)
3
1, 1, 2, 7, 44, 447, 6749, 142176, 3987677, 143698548, 6470422337, 356016927083, 23503587609815, 1833635850492653, 166884365982441238, 17524692064006822643, 2103129932046801158398, 286043195450428964364771, 43766712033847678348968361 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
EXAMPLE
a(4) = 4*3*7/2 + 2 = 44.
MAPLE
a := proc (n) option remember;
if n < 2 then 1
else binomial(n, 2)*a(n-1)+a(n-2) fi;
end proc;
seq(a(n), n = 0..20); # G. C. Greubel, Sep 20 2019
MATHEMATICA
RecurrenceTable[{a[0]==a[1]==1, a[n]==n(n-1) a[n-1]/2+a[n-2]}, a[n], {n, 20}] (* Harvey P. Dale, Sep 07 2011 *)
t = {1, 1}; Do[AppendTo[t, n*(n-1)*t[[-1]]/2 + t[[-2]]], {n, 2, 20}] (* T. D. Noe, Jun 25 2012 *)
PROG
(PARI) m=20; v=concat([1, 1], vector(m-2)); for(n=3, m, v[n]=binomial(n-1, 2)*v[n-1] + v[n-2] ); v \\ G. C. Greubel, Sep 20 2019
(Magma) I:=[1, 1]; [n le 2 select I[n] else Binomial(n-1, 2)*Self(n-1) + Self(n-2): n in [1..20]]; // G. C. Greubel, Sep 20 2019
(Sage)
def a(n):
if (n<2): return 1
else: return binomial(n, 2)*a(n-1)+a(n-2)
[a(n) for n in (0..20)] # G. C. Greubel, Sep 20 2019
(GAP) a:=[1, 1];; for n in [3..20] do a[n]:=Binomial(n-1, 2)*a[n-1]+a[n-2]; od; a; # G. C. Greubel, Sep 20 2019
CROSSREFS
Cf. A001052.
Sequence in context: A194453 A346258 A242105 * A158257 A348857 A172389
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from James A. Sellers, Oct 05 2000
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 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)