cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A001052 a(n) = n*(n-1)*a(n-1)/2 + a(n-2), a(0) = 1, a(1) = 2.

This page as a plain text file.
%I A001052 M0911 N0343 #30 Jul 02 2025 16:01:54
%S A001052 1,2,3,11,69,701,10584,222965,6253604,225352709,10147125509,
%T A001052 558317255704,36859086001973,2875567025409598,261713458398275391,
%U A001052 27482788698844325653,3298196357319717353751,448582187384180404435789,68636372866136921596029468
%N A001052 a(n) = n*(n-1)*a(n-1)/2 + a(n-2), a(0) = 1, a(1) = 2.
%D A001052 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A001052 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A001052 T. D. Noe, <a href="/A001052/b001052.txt">Table of n, a(n) for n = 0..100</a>
%p A001052 a := proc (n) option remember;
%p A001052 if n < 2 then n+1
%p A001052 else binomial(n,2)*a(n-1)+a(n-2) fi;
%p A001052 end proc;
%p A001052 seq(a(n), n = 0..20); # _G. C. Greubel_, Sep 20 2019
%t A001052 t = {1, 2}; Do[AppendTo[t, n*(n-1)*t[[-1]]/2 + t[[-2]]], {n, 2, 20}] (* _T. D. Noe_, Jun 25 2012 *)
%o A001052 (PARI) a(n)=if(n<2,max(0,n+1),n*(n-1)*a(n-1)/2+a(n-2))
%o A001052 (Magma) I:=[1,2]; [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
%o A001052 (Sage)
%o A001052 def a(n):
%o A001052     if (n<2): return n+1
%o A001052     else: return binomial(n,2)*a(n-1)+a(n-2)
%o A001052 [a(n) for n in (0..20)] # _G. C. Greubel_, Sep 20 2019
%o A001052 (GAP) a:=[1,2];; 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
%Y A001052 Cf. A001046.
%K A001052 nonn,easy
%O A001052 0,2
%A A001052 _N. J. A. Sloane_
%E A001052 More terms from _James Sellers_, Sep 19 2000