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.

Showing 1-3 of 3 results.

A062279 Smallest multiple k*n of n which is a palindrome or becomes a palindrome when 0's are added on the left (e.g. 10 becomes 010 which is a palindrome).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 60, 494, 70, 30, 80, 272, 90, 171, 20, 252, 22, 161, 600, 50, 494, 999, 252, 232, 30, 434, 800, 33, 272, 70, 252, 111, 494, 585, 40, 656, 252, 989, 44, 90, 414, 141, 2112, 343, 50, 969, 676, 212, 9990, 55, 616, 171, 232, 767
Offset: 0

Views

Author

Amarnath Murthy, Jun 17 2001

Keywords

Comments

Every positive integer is a factor of a palindrome, unless it is a multiple of 10 (D. G. Radcliffe, see Links).

Examples

			a(13) = 494 is the smallest multiple of 13 which is a palindrome.
		

Crossrefs

Cf. A050782, A062293. Values of k are given in A061674.
Cf. A141709.

Programs

  • ARIBAS
    : maxarg := 60; stop := 200000; for n := 0 to maxarg do k := 1; test := true; while test and k < stop do m := omit_trailzeros(n*k); if test := m <> int_reverse(m) then inc(k); end; end; if k < stop then write(n*k," "); else write(-1," "); end; end;
    
  • Haskell
    a062279 0 = 0
    a062279 n = until ((== 1) . a136522 . a004151) (+ n) n
    -- Reinhard Zumkeller, May 06 2013

Formula

A136522(A004151(a(n))) = 1. - Reinhard Zumkeller, May 06 2013

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org) and Klaus Brockhaus, Jun 18 2001

A203070 Smallest positive multiple of n that is palindromic in base 3, ignoring trailing zeros.

Original entry on oeis.org

1, 2, 3, 4, 10, 6, 28, 8, 9, 10, 121, 12, 13, 28, 30, 16, 68, 18, 608, 20, 84, 242, 23, 24, 100, 26, 27, 28, 203, 30, 1550, 160, 363, 68, 280, 36, 1850, 608, 39, 40, 82, 84, 4988, 484, 90, 644, 1222, 48, 784, 100, 204, 52, 212, 54, 1210, 56, 1824, 1276, 1003
Offset: 1

Views

Author

Harvey P. Dale, Dec 28 2011

Keywords

Crossrefs

Cf. A141709.

Programs

  • Mathematica
    notpal3Q[i_]:=Module[{id=IntegerDigits[i,3]},While[Last[id]==0,id = Most[id]];id!=Reverse[id]]; lm3[n_]:=Module[{k=1},While[notpal3Q[k n],k++];k n]; Array[lm3,80]

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).
Showing 1-3 of 3 results.