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.

A033481 3x+1 sequence beginning at 21.

Original entry on oeis.org

21, 64, 32, 16, 8, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1, 4, 2, 1
Offset: 0

Views

Author

Keywords

Crossrefs

Row 21 of A347270.

Programs

  • Mathematica
    NestList[If[EvenQ[#],#/2,3#+1]&,21,100] (* or *) PadRight[ {21,64,32,16,8},100,{2,1,4}] (* Harvey P. Dale, Sep 30 2018 *)
  • PARI
    Vec((21 + 64*x + 32*x^2 - 5*x^3 - 56*x^4 - 28*x^5 - 14*x^6 - 7*x^7) / ((1 - x)*(1 + x + x^2)) + O(x^80)) \\ Colin Barker, Oct 04 2019

Formula

From Colin Barker, Oct 04 2019: (Start)
G.f.: (21 + 64*x + 32*x^2 - 5*x^3 - 56*x^4 - 28*x^5 - 14*x^6 - 7*x^7) / ((1 - x)*(1 + x + x^2)).
a(n) = a(n-3) for n>15.
(End)