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 A371905 #7 Apr 16 2024 11:08:40 %S A371905 1,3,2,5,4,2,1,5,4,2,1,4,3,1,0,5,4,2,1,4,3,1,0,4,3,1,0,3,2,0,1,7,6,4, %T A371905 3,0,1,3,2,6,5,3,2,5,4,2,1,6,5,3,2,5,4,2,1,5,4,2,1,4,3,1,0,7,6,4,3,0, %U A371905 1,3,2,6,5,3,2,5,4,2,1,6,5,3,2,5,4,2,1 %N A371905 Let k = 0 and let A007814(2*n) = m; If m > k then a(n) = k = k + m, otherwise a(n) = k = k - m. %H A371905 Michael De Vlieger, <a href="/A371905/b371905.txt">Table of n, a(n) for n = 1..10000</a> %e A371905 Let f(x) = A007814(x). %e A371905 a(1) = 1 because k = 0 and f(2*1) = 1; since 0 < 1, a(1) = k = 0 + 1 = 1. %e A371905 a(2) = 3 because k = 1 and f(2*2) = 2; since 1 < 2, a(2) = k = 1 + 2 = 3. %e A371905 a(3) = 2 because k = 3 and f(2*3) = 1; since 3 > 2, a(3) = k = 3 - 1 = 2, etc. %t A371905 nn = 120; k = 0; q = 2; Reap[Do[If[k < #, k += #, k -= #] &@ IntegerExponent[q*n, q]; Sow[k], {n, nn}]][[-1, 1]] %Y A371905 Cf. A007814. %K A371905 nonn,easy %O A371905 1,2 %A A371905 _Michael De Vlieger_, Apr 11 2024