login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A326538
a(n) is the numerator of the image of 1/n by the Cantor staircase function.
2
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 3, 3, 3, 3, 23, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 1, 7, 7
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
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
See A326539 for the corresponding denominators.
Cf. A061392.
Sequence in context: A103756 A103755 A355818 * A333844 A317933 A363329
KEYWORD
nonn,base,frac
AUTHOR
Rémy Sigrist, Jul 12 2019
STATUS
approved