OFFSET
0,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
FORMULA
a(0)=1, a(n) = (a(n-1) mod (n+2))*(n+2).
For k>0, a(2*k)=(k+1)*(2*k+4), a(2*k+1)=(k+1)*(2*k+3).
EXAMPLE
a(5) = (a(4) mod 7)*7 = (24 mod 7)*7 = 3*7 = 21.
PROG
(Python)
a=1
for n in range(1, 55):
. print a,
. a = (a%(n+2)) * (n+2)
(Haskell)
a182455 n = a182455_list !! n
a182455_list = 1 : zipWith (*) (zipWith mod a182455_list [3..]) [3..]
-- Reinhard Zumkeller, May 01 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Apr 30 2012
STATUS
approved