OFFSET
1,1
COMMENTS
LINKS
Rémy Sigrist, PARI program for A300654
FORMULA
a(2*n) = a(n).
a(n) = 2 iff n belongs to A300630.
EXAMPLE
For n = 19:
- the binary expansion of 1/19 is 0.0000(110101111001010000) (with repeating digits in parentheses),
- the first occurrence of the binary representation of k for k = 1..16 is:
k bin(k) bin(1/19) with bin(k) in parentheses
-- ------ ------------------------------------
1 1 0.0000(1)101...
2 10 0.00001(10)101...
3 11 0.0000(11)010...
4 100 0.000011010111(100)101...
5 101 0.00001(101)011...
6 110 0.0000(110)101...
7 111 0.000011010(111)100...
8 1000 0.00001101011110010(1000)011...
9 1001 0.000011010111(1001)010...
10 1010 0.00001(1010)111...
11 1011 0.0000110(1011)110...
12 1100 0.00001101011(1100)101...
13 1101 0.0000(1101)011...
14 1110 0.0000110101(1110)010...
15 1111 0.000011010(1111)001...
16 10000 0.00001101011110010(10000)110...
- the binary representation of 17 (10001) is missing,
- hence a(19) = 16.
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 10 2018
STATUS
approved