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.

A238192 In the Collatz (3x+1) iteration of n, the last odd number before 1, or 0 if there is no such number.

This page as a plain text file.
%I A238192 #6 Feb 23 2014 04:05:42
%S A238192 0,0,5,0,5,5,5,0,5,5,5,5,5,5,5,0,5,5,5,5,21,5,5,5,5,5,5,5,5,5,5,0,5,5,
%T A238192 5,5,5,5,5,5,5,21,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5,
%U A238192 5,5,5,5,5,5,85,5,5,5,5,5,5,5,5,21,85,5
%N A238192 In the Collatz (3x+1) iteration of n, the last odd number before 1, or 0 if there is no such number.
%C A238192 Another version of A237660. The only terms appearing here are 0, 5, 21, 85, ..., which is A002450 without 1.
%H A238192 T. D. Noe, <a href="/A238192/b238192.txt">Table of n, a(n) for n = 1..10000</a>
%t A238192 Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[c = Collatz[n]; co = Select[c, OddQ]; If[Length[co] == 1, 0, co[[-2]]], {n, 100}]
%Y A238192 Cf. A002450 ((4^n-1)/3), A070165 (Collatz trajectories).
%K A238192 nonn
%O A238192 1,3
%A A238192 _T. D. Noe_, Feb 21 2014