login
A376045
Complement of A325112.
2
3, 6, 9, 12, 13, 15, 16, 18, 19, 21, 23, 24, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 45, 46, 48, 49, 51, 53, 54, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 75, 76, 78, 79, 81, 83, 84, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 102, 103, 105, 106, 108
OFFSET
1,1
COMMENTS
Numbers missing from A325112.
Equivalently, numbers whose decimal expansion has a subsequence which is divisible by 3.
PROG
(Python)
from itertools import combinations
def A376045(n):
def f(x):
c, l = 0, len(str(x))
for i in range(l):
k = 10**i
for j in (1, 2, 4, 5, 7, 8):
if j*k<=x:
c += 1
for a in combinations((10**i for i in range(l)), 2):
for b in ((1, 1), (1, 4), (1, 7), (2, 2), (2, 5), (2, 8), (4, 1), (4, 4), (4, 7), (5, 2), (5, 5), (5, 8), (7, 1), (7, 4), (7, 7), (8, 2), (8, 5), (8, 8)):
if a[0]*b[0]+a[1]*b[1] <= x:
c += 1
return n+c
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m # Chai Wah Wu, Sep 10 2024
CROSSREFS
Cf. A325112.
Sequence in context: A285402 A153403 A336341 * A257220 A092452 A230215
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 09 2024
STATUS
approved