login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A343754
a(n) = 0, and for any n > 0, a(n+1) = a(n) - A065363(n) + 1.
1
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, 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, 28, 28, 27, 29, 30, 30, 31, 31, 30, 30, 29, 27, 30, 32, 33, 35, 36
OFFSET
0,6
COMMENTS
This sequence has connections with A296062 and the Takagi (or blancmange) curve:
- for any real number x,
- let s(x) = min(frac(x), 1-frac(x)) (this is the building block of the Takagi curve),
- let t(x) = min(1/3, s(x)),
- let f(x) = Sum_{k >= 0} t(x * 3^k) / 3^k,
- the scatterplot of the sequence in the range A003462(k)..A003462(k+1)
approaches the curve x -> f(x)*3^k for x in the range 0..1.
FORMULA
a(n) = n - A174574(n).
a(n) >= 0 with equality iff n belongs to A003462.
a(n) <= n/2 with equality iff n belongs to A005823.
PROG
(PARI) s=0; for (n=1, 73, print1 (s", "); m=n; while (m>1, s-=d=centerlift(Mod(m, 3)); m=(m-d)\3))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 27 2021
STATUS
approved