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.

User: Erick B. Wong

Erick B. Wong's wiki page.

Erick B. Wong has authored 2 sequences.

A383887 Smallest non-palindromic number that is congruent to its reverse mod n.

Original entry on oeis.org

10, 13, 10, 15, 16, 13, 18, 19, 10, 1011, 100, 15, 1017, 1027, 16, 1025, 1039, 13, 1048, 1021, 18, 103, 1026, 19, 1026, 1017, 14, 1033, 1013, 1011, 1068, 1049, 100, 1039, 1046, 15, 1000, 1055, 1017, 1041, 1066, 1027, 1048, 105, 16, 1077, 1032, 1025, 1014, 1051, 1039, 1017, 1103, 17, 106, 1065
Offset: 1

Author

Erick B. Wong, May 29 2025, at the suggestion of Lanny Wong

Keywords

Comments

Comparable to A070837, but such a number provably exists: if n is coprime to 10 then take 10^k where k is the order of 10 mod n; else take a>b>0 such that n divides 10^a - 10^b, then the number 10^(a+b) + 10^b + 1 works.
The n-th term in this sequence is equal to the first nonzero term of A070837 that occurs at an index divisible by n/gcd(n,9).

Examples

			For n=6, a(6)=13 is congruent to 31 mod 6.
For n=10, note that any number of 3 or fewer digits is necessarily a palindrome if the first digit equals the last, and 1011 is the first 4-digit non-palindrome.
		

Crossrefs

Programs

  • Mathematica
    seq[len_] := Module[{s = Table[0, {len}], c = 0, k = 9, d}, While[c < len, k++; krev = IntegerReverse[k]; If[k != krev, d = Select[Divisors[Abs[k - krev]], # <= len &]; Do[If[s[[d[[i]]]] == 0, s[[d[[i]]]] = k; c++], {i, 1, Length[d]}]]]; s]; seq[60] (* Amiram Eldar, May 31 2025 *)
  • PARI
    a(n) = my(k=1, d=digits(k), rd=Vecrev(d)); while(!((d != rd) && Mod(fromdigits(rd), n) == k), k++; d=digits(k); rd=Vecrev(d)); k; \\ Michel Marcus, May 30 2025
  • Python
    from functools import partial
    from itertools import count
    def accept(mod, k):
        r = int(str(k)[::-1])
        return r != k and (r-k) % mod == 0
    def a(n):
        return next(filter(partial(accept, n), count(10)))
    print([a(n) for n in range(1,57)])
    

A367807 Even palindromes, divided by 2.

Original entry on oeis.org

0, 1, 2, 3, 4, 11, 22, 33, 44, 101, 106, 111, 116, 121, 126, 131, 136, 141, 146, 202, 207, 212, 217, 222, 227, 232, 237, 242, 247, 303, 308, 313, 318, 323, 328, 333, 338, 343, 348, 404, 409, 414, 419, 424, 429, 434, 439, 444, 449, 1001, 1056, 1111
Offset: 1

Author

Erick B. Wong, Dec 01 2023, at the suggestion of Landon Wong

Keywords

Crossrefs

Cf. A029951.

Programs

  • Mathematica
    Select[Range[0, 2222, 2], PalindromeQ]/2

Formula

a(n) = A029951(n)/2.