login
3x+1 sequence beginning at 21.
4

%I #21 Jan 05 2024 13:27:10

%S 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,

%T 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,

%U 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

%N 3x+1 sequence beginning at 21.

%H Colin Barker, <a href="/A033481/b033481.txt">Table of n, a(n) for n = 0..1000</a>

%H Bertrand Teguia Tabuguia, <a href="https://arxiv.org/abs/2401.00256">Hypergeometric-Type Sequences</a>, arXiv:2401.00256 [cs.SC], 2023. See p. 20.

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1).

%F From _Colin Barker_, Oct 04 2019: (Start)

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

%F a(n) = a(n-3) for n>15.

%F (End)

%t 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 *)

%o (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

%Y Row 21 of A347270.

%K nonn,easy

%O 0,1

%A _Jeff Burch_