%I #12 Jul 13 2013 12:03:45
%S 1,3,12,10,24,21,40,36,60,55,84,78,112,105,144,136,180,171,220,210,
%T 264,253,312,300,364,351,420,406,480,465,544,528,612,595,684,666,760,
%U 741,840,820,924,903,1012,990,1104,1081,1200,1176,1300,1275,1404
%N a(0)=1, a(n) = (a(n-1) mod (n+2))*(n+2).
%H Reinhard Zumkeller, <a href="/A182455/b182455.txt">Table of n, a(n) for n = 0..10000</a>
%F a(0)=1, a(n) = (a(n-1) mod (n+2))*(n+2).
%F For k>0, a(2*k)=(k+1)*(2*k+4), a(2*k+1)=(k+1)*(2*k+3).
%e a(5) = (a(4) mod 7)*7 = (24 mod 7)*7 = 3*7 = 21.
%o (Python)
%o a=1
%o for n in range(1,55):
%o . print a,
%o . a = (a%(n+2)) * (n+2)
%o (Haskell)
%o a182455 n = a182455_list !! n
%o a182455_list = 1 : zipWith (*) (zipWith mod a182455_list [3..]) [3..]
%o -- _Reinhard Zumkeller_, May 01 2012
%Y Cf. A093005 - a(n)=(a(n-1) mod (n+1))*(n+1).
%K nonn,easy
%O 0,2
%A _Alex Ratushnyak_, Apr 30 2012
|