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

This page as a plain text file.
%I A342582 #11 Mar 16 2021 04:33:38
%S A342582 2,2,12,12,10,12,42,56,558,10,682,12,52,42,150,240,170,558,38,240,42,
%T A342582 682,598,240,150,52,3132,56,232,150,558,992,8382,170,2730,936,666,38,
%U A342582 936,240,738,42,3010,3784,535230,598,11938,240,2254,150,204,52,212,3132
%N A342582 a(n) is the least multiple of n that is a "binary antipalindrome" (i.e., an element of A035928).
%C A342582 This sequence has similarities with A141709.
%H A342582 Rémy Sigrist, <a href="/A342582/b342582.txt">Table of n, a(n) for n = 1..10000</a>
%H A342582 Rémy Sigrist, <a href="/A342582/a342582.gp.txt">PARI program for A342582</a>
%F A342582 a(n) = n * A318569(n).
%e A342582 For n = 42:
%e A342582 - 42 is a binary antipalindrome,
%e A342582 - so a(42) = 42.
%o A342582 (PARI) See Links section.
%o A342582 (Python)
%o A342582 def comp(s): z, o = ord('0'), ord('1'); return s.translate({z:o, o:z})
%o A342582 def BCR(n): return int(comp(bin(n)[2:])[::-1], 2)
%o A342582 def bin_anti_pal(n): return BCR(n) == n
%o A342582 def a(n):
%o A342582     kn = n
%o A342582     while not bin_anti_pal(kn): kn += n
%o A342582     return kn
%o A342582 print([a(n) for n in range(1, 55)]) # _Michael S. Branicky_, Mar 15 2021
%Y A342582 Cf. A035928, A141709, A318569.
%K A342582 nonn,base
%O A342582 1,1
%A A342582 _Rémy Sigrist_, Mar 15 2021