OFFSET
1,11
COMMENTS
The Cantor staircase function, say c, maps rational numbers in the interval [0..1] to rational numbers in the interval [0..1], hence this sequence is well defined.
For any n > 0, the binary expansion of c(1/n) is terminating (and A326539(n) is a power of 2) iff the ternary expansion of 1/n is terminating or contains a digit 1.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..6561
Rémy Sigrist, PARI program for A326538
Wikipedia, Cantor function
EXAMPLE
The first terms, alongside c(1/n) and the ternary and binary representation of 1/n and c(1/n), respectively, with periodic part in parentheses, are:
n a(n) c(1/n) ter(1/n) bin(c(1/n))
-- ---- ------ ---------------------- -----------
1 1 1 1.(0) 1.(0)
2 1 1/2 0.(1) 0.1(0)
3 1 1/2 0.1(0) 0.1(0)
4 1 1/3 0.(02) 0.(01)
5 1 1/4 0.(0121) 0.01(0)
6 1 1/4 0.0(1) 0.01(0)
7 1 1/4 0.(010212) 0.01(0)
8 1 1/4 0.(01) 0.01(0)
9 1 1/4 0.01(0) 0.01(0)
10 1 1/5 0.(0022) 0.(0011)
11 3 3/16 0.(00211) 0.0011(0)
12 1 1/6 0.0(02) 0.0(01)
13 1 1/7 0.(002) 0.(001)
14 1 1/8 0.(001221) 0.001(0)
15 1 1/8 0.0(0121) 0.001(0)
16 1 1/8 0.(0012) 0.001(0)
17 1 1/8 0.(0011202122110201) 0.001(0)
18 1 1/8 0.00(1) 0.001(0)
19 1 1/8 0.(001102100221120122) 0.001(0)
20 1 1/8 0.(0011) 0.001(0)
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base,frac
AUTHOR
Rémy Sigrist, Jul 12 2019
STATUS
approved