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.
%I A221469 #9 Jun 03 2018 03:45:16 %S A221469 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, %T A221469 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, %U A221469 1,1,2,0,1,2,12,0,13,1,2,1,1,4,4,0,1,14,12 %N A221469 Number of increasing peak values in the Collatz (3x+1) iteration of n. %C A221469 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. %H A221469 T. D. Noe, <a href="/A221469/b221469.txt">Table of n, a(n) for n = 1..10000</a> %e A221469 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. %t A221469 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}] %o A221469 (Haskell) %o A221469 a221469 n = sum $ map fromEnum $ zipWith (>) (tail ts) ts where %o A221469 ts = scanl1 max $ a070165_row n %o A221469 -- _Reinhard Zumkeller_, Jan 18 2013 %Y A221469 Cf. A070165 (Collatz trajectory of n), A221470. %K A221469 nonn %O A221469 1,3 %A A221469 _T. D. Noe_, Jan 17 2013