login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A221469 Number of increasing peak values in the Collatz (3x+1) iteration of n. 4
0, 0, 2, 0, 1, 2, 3, 0, 3, 1, 2, 1, 1, 3, 4, 0, 1, 3, 2, 0, 1, 2, 3, 0, 2, 1, 15, 2, 1, 4, 14, 0, 1, 1, 2, 1, 1, 2, 4, 0, 14, 1, 2, 1, 1, 3, 13, 0, 1, 2, 2, 0, 1, 15, 13, 0, 2, 1, 3, 3, 1, 14, 12, 0, 1, 1, 2, 0, 1, 2, 12, 0, 13, 1, 2, 1, 1, 4, 4, 0, 1, 14, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
That is, the number of times that the Collatz iteration of n reaches a new maximum. See A221470 for the first occurrence of each peak count.
LINKS
EXAMPLE
The Collatz iteration starting at 7 is (7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1), which has 3 increasing peaks: 22, 34, and 52.
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[c = Collatz[n]; cnt = 0; mx = n; Do[If[k > mx, cnt++; mx = k], {k, c}]; cnt, {n, 100}]
PROG
(Haskell)
a221469 n = sum $ map fromEnum $ zipWith (>) (tail ts) ts where
ts = scanl1 max $ a070165_row n
-- Reinhard Zumkeller, Jan 18 2013
CROSSREFS
Cf. A070165 (Collatz trajectory of n), A221470.
Sequence in context: A360677 A263833 A308625 * A350369 A117398 A295989
KEYWORD
nonn
AUTHOR
T. D. Noe, Jan 17 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 04:58 EDT 2024. Contains 371235 sequences. (Running on oeis4.)