|
|
A054219
|
|
Concatenation of n in base 10 down to base 2 is divisible by at least one of these base b numbers, all numbers interpreted as decimals.
|
|
1
|
|
|
1, 2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 20, 24, 32, 36, 40, 64, 70, 72, 80, 96, 100, 104, 116, 128, 131, 144, 160, 168, 192, 200, 216, 256, 288, 292, 293, 300, 320, 336, 344, 360, 362, 370, 380, 400, 432, 512, 536, 544, 560, 576, 640, 648, 727, 768, 800, 864
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
n=9 -> 9{10}=10{9}=11{8}=12{7}=13{6}=14{5}=21{4}=100{3}=1001{2} -> 91011121314211001001 which is divisible by 21 (from 9 in base 4).
|
|
PROG
|
(Python)
from sympy.ntheory.digits import digits
def ok(n):
sb = ["".join(str(d) for d in digits(n, b)[1:]) for b in range(2, 11)]
cn = int("".join(sb[::-1]))
return any(cn%int(sbi) == 0 for sbi in sb)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|