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.

A182455 a(0)=1, a(n) = (a(n-1) mod (n+2))*(n+2).

Original entry on oeis.org

1, 3, 12, 10, 24, 21, 40, 36, 60, 55, 84, 78, 112, 105, 144, 136, 180, 171, 220, 210, 264, 253, 312, 300, 364, 351, 420, 406, 480, 465, 544, 528, 612, 595, 684, 666, 760, 741, 840, 820, 924, 903, 1012, 990, 1104, 1081, 1200, 1176, 1300, 1275, 1404
Offset: 0

Views

Author

Alex Ratushnyak, Apr 30 2012

Keywords

Examples

			a(5) = (a(4) mod 7)*7 = (24 mod 7)*7 = 3*7 = 21.
		

Crossrefs

Cf. A093005 (a(n)=(a(n-1) mod (n+1))*(n+1)).

Programs

  • Haskell
    a182455 n = a182455_list !! n
    a182455_list = 1 : zipWith (*) (zipWith mod a182455_list [3..]) [3..]
    -- Reinhard Zumkeller, May 01 2012
  • Python
    a=1
    for n in range(1,55):
        print(a, end=', ')
        a = (a%(n+2)) * (n+2)
    

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).