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.

A350309 a(n) = (n+2)*a(n-1) + (n+1)*(A003422(n) - 4)/6 for n > 0 with a(0) = 1.

This page as a plain text file.
%I A350309 #23 Jan 07 2025 08:48:24
%S A350309 1,2,7,35,215,1535,12455,113255,1141415,12632615,152341415,1988514215,
%T A350309 27934434215,420236744615,6740662856615,114841743944615,
%U A350309 2071122598472615,39418302548552615,789563088403016615,16603426141551176615,365724864314899016615,8421063413387754056615
%N A350309 a(n) = (n+2)*a(n-1) + (n+1)*(A003422(n) - 4)/6 for n > 0 with a(0) = 1.
%H A350309 G. C. Greubel, <a href="/A350309/b350309.txt">Table of n, a(n) for n = 0..445</a>
%F A350309 Recurrence: (2*n-1)*a(n) = n*(2*n+5)*a(n-1) - (n+1)*(2*n+1)*a(n-2). - _Vaclav Kotesovec_, Nov 21 2024
%t A350309 a[n_]:= a[n]= If[n<2, n+1, (n*(2*n+5)*a[n-1] - (n+1)*(2*n+1)*a[n-2])/(2*n-1)]; (* a = A350309 *)
%t A350309 Table[a[n], {n,0,30}] (* _G. C. Greubel_, Jan 07 2025 *)
%o A350309 (PARI) lf(n) = sum(k=0, n-1, k!); \\ A003422
%o A350309 a(n) = if (n, (n+2)*a(n-1) + (n+1)*(lf(n) - 4)/6, 1); \\ _Michel Marcus_, Jan 11 2022
%o A350309 (Magma)
%o A350309 [n le 2 select n else ((n-1)*(2*n+3)*Self(n-1) - n*(2*n-1)*Self(n-2))/(2*n-3): n in [1..30]]; // _G. C. Greubel_, Jan 07 2025
%o A350309 (Python)
%o A350309 from sage.all import * # remove for SageMath
%o A350309 @CachedFunction # a = A350309
%o A350309 def a(n): return n+1 if n<2 else (n*(2*n+5)*a(n-1) - (n+1)*(2*n+1)*a(n-2))//(2*n-1)
%o A350309 print([a(n) for n in range(31)]) # _G. C. Greubel_, Jan 07 2025
%Y A350309 Cf. A003422, A006157 (first differences).
%K A350309 nonn
%O A350309 0,2
%A A350309 _Mikhail Kurkov_, Dec 24 2021