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.

A355695 a(n) is the smallest number that has exactly n nonpalindromic divisors (A029742).

Original entry on oeis.org

1, 10, 20, 30, 48, 72, 60, 140, 144, 120, 210, 180, 300, 240, 560, 504, 360, 420, 780, 1764, 900, 960, 720, 1200, 840, 1560, 2640, 1260, 1440, 2400, 3900, 3024, 1680, 3120, 2880, 4800, 7056, 3600, 2520, 3780, 3360, 5460, 6480, 16848, 6300, 8820, 7200, 9240, 6720, 12480, 5040
Offset: 0

Views

Author

Bernard Schott, Jul 14 2022

Keywords

Examples

			48 has 10 divisors: {1, 2, 3, 4, 6, 8, 12, 16, 24, 48}, only 12, 16, 24 and 48 are nonpalindromic; no positive integer smaller than 48 has four nonpalindromic divisors, hence a(4) = 48.
		

Crossrefs

Similar sequences: A087997, A333456, A355303, A355594.

Programs

  • Mathematica
    f[n_] := DivisorSum[n, 1 &, ! PalindromeQ[#] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n] + 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[50, 10^5] (* Amiram Eldar, Jul 14 2022 *)
  • PARI
    isnp(n) = my(d=digits(n)); d!=Vecrev(d); \\ A029742
    a(n) = my(k=1); while (sumdiv(k, d, isnp(d)) != n, k++); k; \\ Michel Marcus, Jul 14 2022
    
  • Python
    from sympy import divisors
    from itertools import count, islice
    def c(n): s = str(n); return s != s[::-1]
    def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    def agen():
        n, adict = 0, dict()
        for k in count(1):
            fk = f(k)
            if fk not in adict: adict[fk] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 51))) # Michael S. Branicky, Jul 27 2022

Extensions

More terms from Michel Marcus, Jul 14 2022