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.

A033478 3x+1 sequence beginning at 3.

This page as a plain text file.
%I A033478 #25 May 31 2023 22:36:07
%S A033478 3,10,5,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,
%T A033478 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,
%U A033478 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 A033478 3x+1 sequence beginning at 3.
%D A033478 C. A. Pickover, The Math Book, Sterling, NY, 2009; see p. 374.
%H A033478 Colin Barker, <a href="/A033478/b033478.txt">Table of n, a(n) for n = 0..1000</a>
%H A033478 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>
%H A033478 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1).
%F A033478 From _Colin Barker_, Oct 04 2019: (Start)
%F A033478 G.f.: (3 + 10*x + 5*x^2 + 13*x^3 - 2*x^4 - x^5 - 14*x^6 - 7*x^7) / ((1 - x)*(1 + x + x^2)).
%F A033478 a(n) = a(n-3) for n>7.
%F A033478 (End)
%p A033478 f:=proc(n) if n mod 2 = 0 then n/2 else 3*n+1; fi; end; g:=proc(n) local i,t1; t1:=[n]; for i from 1 to 120 do t1:=[op(t1),f(t1[nops(t1)])]; od; t1; end; g(3);
%t A033478 A033478list[nmax_]:=PadRight[{3,10,5,16,8},nmax+1,{2,1,4}];A033478list[100] (* _Paolo Xausa_, May 31 2023 *)
%o A033478 (PARI) a(n)=if(n>4,[2,1,4][n%3+1],[3,10,5,16,8][n+1]) \\ _Charles R Greathouse IV_, Jun 22 2016
%o A033478 (PARI) Vec((3 + 10*x + 5*x^2 + 13*x^3 - 2*x^4 - x^5 - 14*x^6 - 7*x^7) / ((1 - x)*(1 + x + x^2)) + O(x^80)) \\ _Colin Barker_, Oct 04 2019
%Y A033478 Row 3 of A347270.
%K A033478 nonn,easy
%O A033478 0,1
%A A033478 _Jeff Burch_