OFFSET
1,2
COMMENTS
When k is a prime of the form (3^r-1)/2, then the m are 2^r-1 numbers (greater than 0) whose base-3 representation consists of only 0's and 1's. Hence, for r=3,7, and 13, the primes k are 13, 1093, and 797161, and the number of m < k/2 is 3, 63, and 4095.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..185
EXAMPLE
When k=40, then 1/k, 3/k, 9/k, and 13/k have base-3 representations containing only the digits 0 and 2.
MATHEMATICA
Length /@ Last[Transpose[cantor]] (* see A173931 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 03 2010
EXTENSIONS
Name qualified by Peter Munn, Jul 14 2019
STATUS
approved