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 A343754 #16 Apr 30 2021 17:18:37 %S A343754 0,0,1,1,0,2,3,3,4,4,3,3,2,0,3,5,6,8,9,9,10,10,9,11,12,12,13,13,12,12, %T A343754 11,9,10,10,9,9,8,6,5,3,0,4,7,9,12,14,15,17,18,18,21,23,24,26,27,27, %U A343754 28,28,27,29,30,30,31,31,30,30,29,27,30,32,33,35,36 %N A343754 a(n) = 0, and for any n > 0, a(n+1) = a(n) - A065363(n) + 1. %C A343754 This sequence has connections with A296062 and the Takagi (or blancmange) curve: %C A343754 - for any real number x, %C A343754 - let s(x) = min(frac(x), 1-frac(x)) (this is the building block of the Takagi curve), %C A343754 - let t(x) = min(1/3, s(x)), %C A343754 - let f(x) = Sum_{k >= 0} t(x * 3^k) / 3^k, %C A343754 - the scatterplot of the sequence in the range A003462(k)..A003462(k+1) %C A343754 approaches the curve x -> f(x)*3^k for x in the range 0..1. %H A343754 Rémy Sigrist, <a href="/A343754/b343754.txt">Table of n, a(n) for n = 0..9841</a> %H A343754 Rémy Sigrist, <a href="/A343754/a343754_1.png">Scatterplot of the sequence for n = 0..A003462(11)</a> %H A343754 Rémy Sigrist, <a href="/A343754/a343754.png">Representation of f in the range 0..1</a> %H A343754 Rémy Sigrist, <a href="/A343754/a343754_2.png">Successive approximations of f</a> %H A343754 Wikipedia, <a href="https://en.wikipedia.org/wiki/Blancmange_curve">Blancmange curve</a> %F A343754 a(n) = n - A174574(n). %F A343754 a(n) >= 0 with equality iff n belongs to A003462. %F A343754 a(n) <= n/2 with equality iff n belongs to A005823. %o A343754 (PARI) s=0; for (n=1, 73, print1 (s", "); m=n; while (m>1, s-=d=centerlift(Mod(m, 3)); m=(m-d)\3)) %Y A343754 Cf. A005823, A065363, A174574, A296062. %K A343754 nonn,base %O A343754 0,6 %A A343754 _Rémy Sigrist_, Apr 27 2021