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.
%I A122033 #30 Jan 01 2024 11:58:39 %S A122033 1,2,4,4,-8,-40,-16,368,928,-3296,-21440,16448,461696,561536,-9957632, %T A122033 -34515200,209783296,1455022592,-3803020288,-57076808704,22755112960, %U A122033 2214428956672,3518653394944,-85968709390336,-326758168158208,3301044295639040,22286480662872064 %N A122033 a(n) = 2*a(n-1) - 2*(n-2)*a(n-2), with a(0)=1, a(1)=2. %H A122033 G. C. Greubel, <a href="/A122033/b122033.txt">Table of n, a(n) for n = 0..725</a> %F A122033 a(n) = 2*a(n-1) - 2*(n-2)*a(n-2), with a(0)=1, a(1)=2. - _G. C. Greubel_, Oct 04 2019 %F A122033 a(n) = 2*A062267(n-1) for n > 0. - _Michel Marcus_, Oct 05 2019 %F A122033 E.g.f.: 1 + exp(1)*sqrt(Pi)*( erf(1) - erf(1-x) ), where erf(x) is the error function. - _G. C. Greubel_, Oct 05 2019 %p A122033 a:= proc(n) option remember; %p A122033 if n < 2 then n+1 %p A122033 else 2*(a(n-1) - (n-2)*a(n-2)) %p A122033 fi %p A122033 end proc: %p A122033 seq(a(n), n = 0..35); # _G. C. Greubel_, Oct 04 2019 %t A122033 a[n_]:= a[n]= If[n<2, n+1, a[n-1]-(n-2)*a[n-2]]; Table[a[n], {n,0,30}] (* modified by _G. C. Greubel_, Oct 04 2019 *) %t A122033 nxt[{n_,a_,b_}]:={n+1,b,2b-2a(n-1)}; NestList[nxt,{1,1,2},30][[;;,2]] (* _Harvey P. Dale_, Jan 01 2024 *) %o A122033 (PARI) my(m=35, v=concat([1,2], vector(m-2))); for(n=3, m, v[n] = 2*(v[n-1] - (n-3)*v[n-2] ) ); v \\ _G. C. Greubel_, Oct 04 2019 %o A122033 (Magma) I:=[1,2]; [n le 2 select I[n] else 2*(Self(n-1)-(n-3)*Self(n-2)): n in [1..35]]; // _G. C. Greubel_, Oct 04 2019 %o A122033 (Sage) %o A122033 def a(n): %o A122033 if n<2: return n+1 %o A122033 else: return 2*(a(n-1) - (n-2)*a(n-2)) %o A122033 [a(n) for n in (0..35)] # _G. C. Greubel_, Oct 04 2019 %o A122033 (GAP) a:=[1,2];; for n in [3..35] do a[n]:=2*(a[n-1]-(n-3)*a[n-2]); od; a; # _G. C. Greubel_, Oct 04 2019 %Y A122033 Cf. A000898, A121966, A328141. %K A122033 sign,less %O A122033 0,2 %A A122033 _Roger L. Bagula_, Sep 13 2006 %E A122033 Edited by _N. J. A. Sloane_, Sep 17 2006 %E A122033 Corrected and offset changed by _G. C. Greubel_, Oct 04 2019