login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101216 Number of n-digit base-2 deletable digit-sum multiple (DSM) integers. 0
1, 1, 2, 3, 5, 6, 9, 13, 26, 44, 87, 165, 305, 523, 948, 1792, 3501, 6644, 12622, 23334, 43232, 79651, 149716, 281278, 532051, 1000247, 1883093, 3577619, 6901273, 13495425, 26522993, 51976835 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
A positive integer n is a base-b digit-sum-multiple (DSM) number if the sum of the digits of n, in base b, divides n. It is a deletable base-b DSM if it has the property that removing some digit leaves either the empty string or another deletable base-b DSM.
LINKS
PROG
(Python)
from itertools import count, islice
def ok(n, prevset):
b = bin(n)[2:]
if n%b.count("1"): return False
si = (b[:i]+b[i+1:] for i in range(len(b)))
return any(t[0] != '0' and int(t, 2) in prevset for t in si)
def agen(): # generator of terms
s, snxt = {1}, set()
for n in count(2):
yield len(s)
for i in range(2**(n-1), 2**n):
if ok(i, s):
snxt.add(i)
s, snxt = snxt, set()
print(list(islice(agen(), 20))) # Michael S. Branicky, Feb 25 2023
CROSSREFS
Cf. A096236.
Sequence in context: A240203 A018126 A087900 * A371685 A175095 A073216
KEYWORD
nonn,base,more
AUTHOR
John W. Layman, Dec 14 2004
EXTENSIONS
a(19)-a(32) from Michael S. Branicky, Feb 25 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 11:35 EDT 2024. Contains 371912 sequences. (Running on oeis4.)