A210145 a(n) = 2^n - A210109(n).
2, 4, 8, 14, 25, 41, 74, 124, 222, 390, 706, 1262, 2324, 4244, 7869, 14607, 27337, 51243, 96665, 182666, 346647, 659206, 1257287, 2402569, 4601771, 8828741, 16969511, 32665154, 62972932
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
Triangle begins: n k=0 k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9 k=10 k=11 k=12 k=13 k=14 1 1 2 3 1 3 4 2 2 4 6 3 4 3 5 8 6 6 6 6 6 14 9 11 10 11 9 7 20 18 18 18 18 18 18 8 36 30 33 30 34 30 33 30 9 60 56 56 58 56 56 58 56 56 10 108 99 105 99 105 100 105 99 105 99 11 188 186 186 186 186 186 186 186 186 186 186 12 352 335 344 338 346 335 348 335 346 338 344 335 13 632 630 630 630 630 630 630 630 630 630 630 630 630 14 1182 1161 1179 1161 1179 1161 1179 1162 1179 1161 1179 1161 1179 1161 15 2192 2182 2182 2188 2182 2184 2188 2182 2182 2188 2184 2182 2188 2182 2182...
from itertools import product def is3div(b): for i in range(1, len(b)-1): for j in range(i+1, len(b)): X, Y, Z = b[:i], b[i:j], b[j:] if all(b < bp for bp in [X+Z+Y, Z+Y+X, Y+X+Z, Y+Z+X, Z+X+Y]): return True return False def a(n): return sum(is3div("".join(b)) for b in product("012", repeat=n)) print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Aug 28 2021
from itertools import product, combinations, permutations def is4div(b): for i, j, k in combinations(range(1, len(b)), 3): divisions = [b[:i], b[i:j], b[j:k], b[k:]] all_greater = True for p, bp in enumerate(permutations(divisions)): if p == 0: continue if b >= "".join(bp): all_greater = False; break if all_greater: return True return False def a(n): return sum(is4div("".join(b)) for b in product("012", repeat=n)) print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Aug 28 2021
from itertools import product, combinations, permutations def is5div(b): for i, j, k, l in combinations(range(1, len(b)), 4): divisions = [b[:i], b[i:j], b[j:k], b[k:l], b[l:]] all_greater = True for p, bp in enumerate(permutations(divisions)): if p == 0: continue if b >= "".join(bp): all_greater = False; break if all_greater: return True return False def a(n): return sum(is5div("".join(b)) for b in product("012", repeat=n)) print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Aug 28 2021
from itertools import product, combinations, permutations def is4div(b): for i, j, k in combinations(range(1, len(b)), 3): divisions = [b[:i], b[i:j], b[j:k], b[k:]] all_greater = True for p, bp in enumerate(permutations(divisions)): if p == 0: continue if b >= "".join(bp): all_greater = False; break if all_greater: return True return False def a(n): return sum(is4div("".join(b)) for b in product("01", repeat=n)) print([a(n) for n in range(1, 14)]) # Michael S. Branicky, Aug 27 2021
from itertools import product, combinations, permutations def is5div(b): for i, j, k, l in combinations(range(1, len(b)), 4): divisions = [b[:i], b[i:j], b[j:k], b[k:l], b[l:]] all_greater = True for p, bp in enumerate(permutations(divisions)): if p == 0: continue if b >= "".join(bp): all_greater = False; break if all_greater: return True return False def a(n): return sum(is5div("".join(b)) for b in product("01", repeat=n)) print([a(n) for n in range(1, 13)]) # Michael S. Branicky, Aug 27 2021
Comments