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.

A033480 3x + 1 sequence beginning at 15.

This page as a plain text file.
%I A033480 #24 Nov 17 2021 17:01:27
%S A033480 15,46,23,70,35,106,53,160,80,40,20,10,5,16,8,4,2,1,4,2,1,4,2,1,4,2,1,
%T A033480 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 A033480 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 A033480 3x + 1 sequence beginning at 15.
%H A033480 Colin Barker, <a href="/A033480/b033480.txt">Table of n, a(n) for n = 0..1000</a>
%H A033480 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%H A033480 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1).
%F A033480 a(0) = 15, a(n) = a(n - 1)/2 if a(n - 1) is even or 3a(n - 1) + 1 if a(n - 1) is odd.
%F A033480 From _Colin Barker_, Oct 04 2019: (Start)
%F A033480 G.f.: (15 + 46*x + 23*x^2 + 55*x^3 - 11*x^4 + 83*x^5 - 17*x^6 + 125*x^7 - 26*x^8 - 13*x^9 - 140*x^10 - 70*x^11 - 35*x^12 - 4*x^13 - 2*x^14 - x^15 - 14*x^16 - 7*x^17) / ((1 - x)*(1 + x + x^2)).
%F A033480 a(n) = a(n-3) for n>17.
%F A033480 (End)
%e A033480 15 is odd, so the next term is 3 * 15 + 1 = 46.
%e A033480 46 is even, so the next term is 46/2 = 23.
%t A033480 NestList[If[EvenQ[#], #/2, 3# + 1] &, 15, 100] (* _Harvey P. Dale_, Dec 27 2011 *)
%o A033480 (PARI) a(n)=my(k=15); for(i=1,n,k=if(k%2,k/2,3*k+1)); k \\ _Charles R Greathouse IV_, May 04 2015
%o A033480 (PARI) Vec((15 + 46*x + 23*x^2 + 55*x^3 - 11*x^4 + 83*x^5 - 17*x^6 + 125*x^7 - 26*x^8 - 13*x^9 - 140*x^10 - 70*x^11 - 35*x^12 - 4*x^13 - 2*x^14 - x^15 - 14*x^16 - 7*x^17) / ((1 - x)*(1 + x + x^2)) + O(x^80)) \\ _Colin Barker_, Oct 04 2019
%Y A033480 Cf. A033479.
%Y A033480 Row 15 of A347270.
%K A033480 nonn,easy
%O A033480 0,1
%A A033480 _Jeff Burch_