A033481 3x+1 sequence beginning at 21.
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
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Bertrand Teguia Tabuguia, Hypergeometric-Type Sequences, arXiv:2401.00256 [cs.SC], 2023. See p. 20.
- Index entries for sequences related to 3x+1 (or Collatz) problem
- Index entries for linear recurrences with constant coefficients, signature (0,0,1).
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)