OFFSET
1,2
COMMENTS
Write down the numbers 3^i * 5^j in an ordered list and then record where the powers of 5 appear.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..1000
FORMULA
From David A. Corneth, May 14 2018: (Start)
Numbers between 5^n and 5^(n + 1) are of the form 5^m * 3^j where j > 0 and so m < n.
Thus 5^n < 5^m * 3^j < 5^(n + 1) if and only if 5^(n - m) < 3^j < 5^(n - m + 1).
Taking logs give (n - m) * log(5) < j * log(3) < (n - m + 1) * log(5).
Dividing by log(3) > 0 gives (n - m) * log(5) / log(3) < j < (n - m + 1) * log(5) / log(3).
(End)
EXAMPLE
The first twenty odd 5-smooth numbers are 1, 3, 5, 9, 15, 25, 27, 45, 75, 81, 125, 135, 225, 243, 375, 405, 625, 675, 729, 1125.
In that subset, the powers of 5 occur at positions 1 (corresponding to 1), 3 (corresponding to 5), 6 (corresponding to 25), 11 (corresponding to 125) and 17 (corresponding to 625).
MATHEMATICA
Position[Sort@ Flatten@ Table[3^i * 5^j, {i, 0, Log[3, #]}, {j, 0, Log[5, #/(3^i)]}] &[15^31], _?(IntegerQ@ Log[5, #] &)][[All, 1]] (* Michael De Vlieger, May 22 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved