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.

A333588 a(n) = floor(-(3/2)*a(n-1)), a(1)=-2.

Original entry on oeis.org

-2, 3, -5, 7, -11, 16, -24, 36, -54, 81, -122, 183, -275, 412, -618, 927, -1391, 2086, -3129, 4693, -7040, 10560, -15840, 23760, -35640, 53460, -80190, 120285, -180428, 270642, -405963, 608944, -913416, 1370124, -2055186, 3082779, -4624169, 6936253, -10404380, 15606570, -23409855, 35114782
Offset: 1

Views

Author

Simon Strandgaard, Mar 27 2020

Keywords

Examples

			floor(-(3/2) *  -2) =   3;
floor(-(3/2) *   3) =  -5;
floor(-(3/2) *  -5) =   7;
floor(-(3/2) *   7) = -11;
floor(-(3/2) * -11) =  16;
floor(-(3/2) *  16) = -24.
		

Crossrefs

Cf. A061419.

Programs

  • Mathematica
    Nest[Append[#1, Floor[-3 #1[[-1]]/2]] & @@ {#, Mod[Length@ #, 2]} &, {-2}, 44] (* Michael De Vlieger, Mar 27 2020 *)
    NestList[Floor[-3/2 #] &, -2, 50] (* Alonso del Arte, Mar 29 2020 *)
  • Ruby
    values = [-2]; 100.times { values << (values.last * -3/2) }; p values