|
|
A257743
|
|
Let n'= odd part of n. If n' is 1 or prime, then a(n)=1; otherwise a(n) is 1+ the number of times the map x -> (3*x+1)' must be applied to n' in order to reach 1 or a prime.
|
|
2
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 3, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 3, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 8, 1, 3, 3, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,9
|
|
COMMENTS
|
Conjecture: for every N>0 there exists n=n(N) such that a(n)>N.
|
|
LINKS
|
|
|
EXAMPLE
|
Let n=9. We have 9'=9; since (3*9+1)'=7, then a(9)=1+1=2.
|
|
MATHEMATICA
|
oddPart:=#/2^IntegerExponent[#, 2]&;
a257743=Map[Length[NestWhileList[oddPart[3#+1]&, oddPart[#], !(PrimeQ[#]||#==1)&]]&, Range[200]] (*Peter J. C. Moses, May 07 2015*)
|
|
PROG
|
(PARI) step(n)=n>>=valuation(n, 2); if(isprime(n), 1, n)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|