A342582 a(n) is the least multiple of n that is a "binary antipalindrome" (i.e., an element of A035928).
2, 2, 12, 12, 10, 12, 42, 56, 558, 10, 682, 12, 52, 42, 150, 240, 170, 558, 38, 240, 42, 682, 598, 240, 150, 52, 3132, 56, 232, 150, 558, 992, 8382, 170, 2730, 936, 666, 38, 936, 240, 738, 42, 3010, 3784, 535230, 598, 11938, 240, 2254, 150, 204, 52, 212, 3132
Offset: 1
Examples
For n = 42: - 42 is a binary antipalindrome, - so a(42) = 42.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, PARI program for A342582
Programs
-
PARI
See Links section.
-
Python
def comp(s): z, o = ord('0'), ord('1'); return s.translate({z:o, o:z}) def BCR(n): return int(comp(bin(n)[2:])[::-1], 2) def bin_anti_pal(n): return BCR(n) == n def a(n): kn = n while not bin_anti_pal(kn): kn += n return kn print([a(n) for n in range(1, 55)]) # Michael S. Branicky, Mar 15 2021
Formula
a(n) = n * A318569(n).
Comments