login
A366347
a(n) has as many prime factors as the ternary expansion of n has runs of nonzero digits; if the k-th run corresponds to A032924(e) and appears after m-1 0's then the p-adic valuation of a(n) is e (where p corresponds to the m-th prime number).
2
1, 2, 4, 3, 8, 16, 9, 32, 64, 5, 6, 12, 27, 128, 256, 81, 512, 1024, 25, 18, 36, 243, 2048, 4096, 729, 8192, 16384, 7, 10, 20, 15, 24, 48, 45, 96, 192, 125, 54, 108, 2187, 32768, 65536, 6561, 131072, 262144, 625, 162, 324, 19683, 524288, 1048576, 59049
OFFSET
0,2
COMMENTS
This sequence is a variant of the Doudna sequence (A005940); here we consider runs of nonzero digits in ternary expansions, there in binary expansions.
This sequence is a bijection from the nonnegative integers to the positive integers with inverse A366348.
We can devise a similar sequence for any fixed base b >= 2:
- the case b = 2 corresponds (up to the offset) to the Doudna sequence (A005940),
- the case b = 3 corresponds to the present sequence,
- the case b = 10 corresponds to A290389.
FORMULA
a(3*n) = A003961(a(n)).
a(3^k) = prime(1 + k) for any k >= 0.
a(2 * 3^k) = prime(1 + k)^2 for any k >= 0.
a(n) is squarefree iff n belongs to A060140.
EXAMPLE
For n = 46: the ternary expansion of 46 is "1201; we have two runs of nonzero digits: "12" (= 5 = A032924(4)) after 2-1 0's and "1" (= 1 = A032924(1)) after 1-1 0's; so a(46) = prime(2)^4 * prime(1)^1 = 3^4 * 2^1 = 162.
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Oct 07 2023
STATUS
approved