|
|
A238192
|
|
In the Collatz (3x+1) iteration of n, the last odd number before 1, or 0 if there is no such number.
|
|
3
|
|
|
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, 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, 5, 5, 5, 5, 5, 5, 85, 5, 5, 5, 5, 5, 5, 5, 5, 21, 85, 5
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Another version of A237660. The only terms appearing here are 0, 5, 21, 85, ..., which is A002450 without 1.
|
|
LINKS
|
|
|
MATHEMATICA
|
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}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|