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.

A357171 a(n) is the number of divisors of n whose digits are in strictly increasing order (A009993).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 3, 1, 6, 2, 4, 4, 5, 2, 6, 2, 4, 3, 2, 2, 8, 3, 4, 4, 6, 2, 6, 1, 5, 2, 4, 4, 9, 2, 4, 4, 5, 1, 6, 1, 3, 6, 4, 2, 10, 3, 4, 3, 5, 1, 7, 2, 8, 4, 4, 2, 8, 1, 2, 4, 5, 3, 4, 2, 6, 4, 6, 1, 11, 1, 3, 5, 5, 2, 8, 2, 6, 4, 2, 1, 9, 3, 2, 3, 4, 2, 9, 3, 5, 2, 3, 3, 10, 1, 5, 3, 5
Offset: 1

Views

Author

Bernard Schott, Sep 16 2022

Keywords

Comments

As A009993 is finite with 512 terms, a(n) is bounded with a(n) <= 511 and not 512, since A009993(1) = 0.

Examples

			22 has 4 divisors {1, 2, 11, 22} of which two have decimal digits that are not in strictly increasing order: {11, 22}, hence a(22) = 4-2 = 2.
52 has divisors {1, 2, 4, 13, 26, 52} and a(52) = 5 of them have decimal digits that are in strictly increasing order (all except 52 itself).
		

Crossrefs

Similar: A087990 (palindromic), A355302 (undulating), A355593 (alternating).

Programs

  • Maple
    f:= proc(n) local d,L,i,t;
      t:= 0;
      for d in numtheory:-divisors(n) do
        L:= convert(d,base,10);
        if `and`(seq(L[i]>L[i+1],i=1..nops(L)-1)) then t:= t+1 fi
      od;
      t
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 16 2022
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Less @@ IntegerDigits[#] &]; Array[a, 100] (* Amiram Eldar, Sep 16 2022 *)
  • PARI
    isok(d) = Set(d=digits(d)) == d; \\ A009993
    a(n) = sumdiv(n, d, isok(d)); \\ Michel Marcus, Sep 16 2022
    
  • Python
    from sympy import divisors
    def c(n): s = str(n); return s == "".join(sorted(set(s)))
    def a(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Sep 16 2022

Formula

G.f.: Sum_{n in A009993} x^n/(1-x^n). - Robert Israel, Sep 16 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{n=2..512} 1/A009993(n) = 4.47614714667538759358... (this is a rational number whose numerator and denominator have 1037 and 1036 digits, respectively). - Amiram Eldar, Jan 06 2024

A357172 a(n) is the smallest integer that has exactly n divisors whose decimal digits are in strictly increasing order.

Original entry on oeis.org

1, 2, 4, 6, 16, 12, 54, 24, 36, 48, 72, 180, 144, 360, 336, 468, 504, 936, 1008, 1512, 2520, 3024, 5040, 6552, 7560, 22680, 13104, 19656, 49140, 105840, 39312, 78624, 98280, 248976, 334152, 196560, 393120, 668304, 1244880, 1670760, 1867320, 4520880, 3341520, 3734640
Offset: 1

Views

Author

Bernard Schott, Sep 16 2022

Keywords

Comments

This sequence is finite since A009993 is finite with 511 nonzero terms, hence the last term is a(511) = lcm of the 511 nonzero terms of A009993.
a(511) = 8222356410...6120992000 and has 1036 digits. - Michael S. Branicky, Sep 16 2022

Examples

			For n=7, the divisors of 54 are {1, 2, 3, 6, 9, 18, 27, 54} of which 7 have their digits in strictly increasing order (all except 54). No integer < 54 has 7 such divisors, so a(7) = 54.
		

Crossrefs

Similar: A087997 (palindromic), A355303 (undulating), A355594 (alternating).

Programs

  • Mathematica
    s[n_] := DivisorSum[n, 1 &, Less @@ IntegerDigits[#] &]; seq[len_, nmax_] := Module[{v = Table[0, {len}], n = 1, c = 0, i}, While[c < len && n < nmax, i = s[n]; If[i <= len && v[[i]] == 0, v[[i]] = n; c++]; n++]; v]; seq[25, 10^4] (* Amiram Eldar, Sep 16 2022 *)
  • PARI
    isok(d) = Set(d=digits(d)) == d; \\ A009993
    f(n) = sumdiv(n, d, isok(d)); \\ A357171
    a(n) = my(k=1); while (f(k) !=n, k++); k; \\ Michel Marcus, Sep 16 2022
    
  • Python
    from sympy import divisors
    from itertools import count, islice
    def c(n): s = str(n); return s == "".join(sorted(set(s)))
    def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    def agen():
        n, adict = 1, 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(), 37))) # Michael S. Branicky, Sep 16 2022

Extensions

More terms from Amiram Eldar, Sep 16 2022

A358101 Positions of records in A358099, i.e., integers whose number of divisors whose decimal digits are in strictly decreasing order sets a new record.

Original entry on oeis.org

1, 2, 4, 6, 12, 20, 30, 40, 60, 120, 240, 360, 420, 840, 1260, 2520, 5040, 8640, 10080, 15120, 20160, 30240, 60480, 120960, 181440, 362880, 544320, 786240, 1572480, 1874880, 3749760, 5624640, 7862400, 14938560, 23587200, 24373440, 31872960, 63745920, 95618880
Offset: 1

Views

Author

Bernard Schott, Nov 03 2022

Keywords

Comments

As A009995 is finite, this sequence is necessarily finite.
Corresponding records are 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, ...

Examples

			a(9) = 60 is in the sequence because A358099(60) = 10 is larger than any earlier value in A358099.
		

Crossrefs

Similar sequences: A093036, A340548, A357173.

Programs

  • Mathematica
    f[n_] := DivisorSum[n, 1 &, Greater @@ IntegerDigits[#] &]; fm = 0; s = {}; Do[If[(fn = f[n]) > fm, fm = fn; AppendTo[s, n]], {n, 1, 10^6}]; s (* Amiram Eldar, Nov 03 2022 *)

Extensions

More terms from Amiram Eldar, Nov 03 2022
Showing 1-3 of 3 results.