login
A219835
Number of terms of 2^j + 3^k <= 10^n.
2
7, 29, 64, 118, 181, 254, 354, 453, 565, 708, 878, 1033, 1224, 1403, 1594, 1828, 2046, 2274, 2553, 2808, 3139, 3467, 3765, 4073, 4443, 4779, 5124, 5537, 5911, 6294, 6690, 7266, 7693, 8129, 8650, 9114, 9588, 10153, 10654, 11167, 11776, 12449, 13005, 13662, 14243
OFFSET
1,1
COMMENTS
As n-> infinity, a(n) -> log_2(n)*log_3(n).
MATHEMATICA
Join[{7, 29}, Table[m = 10^x; -4 + Floor [ Log[3, m ]] + Sum[Floor @ Log[2, m - 3^i], {i, 0, Log[3, m]}], {x, 3, 100}]]
PROG
(Python)
def a(n):
s, pow3, lim = set(), 1, 10**n
while pow3 < lim:
for j in range((lim-pow3).bit_length()):
s.add(2**j + pow3)
pow3 *= 3
return len(s)
print([a(n) for n in range(1, 46)]) # Michael S. Branicky, Jul 29 2021
CROSSREFS
Cf. A004050 (numbers of the form 2^j + 3^k).
Sequence in context: A005698 A080185 A355920 * A041621 A022272 A185438
KEYWORD
nonn
AUTHOR
Zak Seidov, Nov 29 2012
STATUS
approved