cp's OEIS Frontend

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.

A342582 a(n) is the least multiple of n that is a "binary antipalindrome" (i.e., an element of A035928).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 15 2021

Keywords

Comments

This sequence has similarities with A141709.

Examples

			For n = 42:
- 42 is a binary antipalindrome,
- so a(42) = 42.
		

Crossrefs

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).