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-5 of 5 results.

A355595 Positions of records in A355593: Integers whose number of alternating divisors sets a new record.

Original entry on oeis.org

1, 2, 4, 6, 12, 24, 36, 72, 144, 180, 360, 504, 630, 1080, 1260, 1890, 2520, 3780, 7560, 15120, 18900, 22680, 30240, 37800, 45360, 75600, 90720, 151200, 162540, 226800, 317520, 325080, 650160, 763560, 1137780, 1243620, 1527120, 2275560, 3054240, 3738420, 4551120, 6826680, 7476840, 14953680, 17445960, 21818160, 26168940, 36363600, 43636320, 52337880
Offset: 1

Views

Author

Bernard Schott, Jul 08 2022

Keywords

Comments

Alternating integers are in A030141.
Corresponding records of number of alternating divisors are 1, 2, 3, 4, 6, 7, 9, 11, ...

Examples

			a(6) = 24 is in the sequence because A355593(24) = 7 is larger than any earlier value in A355593.
		

Crossrefs

Similar, but with undulating divisors: A355304.

Programs

  • Mathematica
    q[n_] := ! MemberQ[Differences[Mod[IntegerDigits[n], 2]], 0]; f[n_] := DivisorSum[n, 1 &, q[#] &]; fm = 0; s = {}; Do[fn = f[n]; If[fn > fm, fm = fn; AppendTo[s, n]], {n, 1, 10^5}]; s (* Amiram Eldar, Jul 08 2022 *)

Extensions

a(21)-a(36) from Amiram Eldar, Jul 08 2022
a(37)-a(50) from Charles R Greathouse IV, Jul 08 2022

A355594 a(n) is the smallest integer that has exactly n alternating divisors.

Original entry on oeis.org

1, 2, 4, 6, 16, 12, 24, 48, 36, 96, 72, 144, 210, 180, 420, 360, 504, 864, 630, 1080, 1512, 2160, 1260, 3150, 1890, 2520, 5040, 6300, 3780, 10080, 12600, 9450, 7560, 32760, 15120, 18900, 22680, 30240, 88830, 37800, 45360, 75600, 105840, 90720, 151200, 162540, 254520
Offset: 1

Views

Author

Bernard Schott, Jul 08 2022

Keywords

Comments

This sequence first differs from A005179 at index 7 where A005179(7) = 64.

Examples

			16 has 5 divisors: {1, 2, 4, 8, 16} all of which are alternating integers; no positive integer smaller than 16 has five alternating divisors, hence a(5) = 16.
96 has 12 divisors: {1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 96}, only 24 and 48 are not alternating; no positive integer smaller than 96 has ten alternating divisors, hence a(10) = 96.
		

Crossrefs

Cf. A005179, A030141 (alternating numbers), A355593, A355595, A355596.
Similar, but with undulating divisors: A355303.

Programs

  • Maple
    isalt:= proc(n) local L; option remember;
       L:= convert(n,base,10) mod 2;
       L:= L[2..-1]-L[1..-2];
       not member(0,L)
    end proc:
    N:= 50: # for a(1)..a(N)
    V:= Vector(N): count:= 0:
    for n from 1 while count < N do
      w:= nops(select(isalt,numtheory:-divisors(n)));
      if w <= N and V[w] = 0 then V[w]:= n; count:= count+1 fi
    od:
    convert(V,list); # Robert Israel, Jan 24 2023
  • Mathematica
    q[n_] := ! MemberQ[Differences[Mod[IntegerDigits[n], 2]], 0]; f[n_] := DivisorSum[n, 1 &, q[#] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[50, 10^6] (* Amiram Eldar, Jul 08 2022 *)
  • PARI
    is(n, d=digits(n))=for(i=2, #d, if((d[i]-d[i-1])%2==0, return(0))); 1; \\ A030141
    a(n) = my(k=1); while (sumdiv(k, d, is(d)) != n, k++); k; \\ Michel Marcus, Jul 11 2022
    
  • Python
    from itertools import count
    from sympy import divisors
    def A355594(n):
        for m in count(1):
            if sum(1 for k in divisors(m,generator=True) if all(int(a)+int(b)&1 for a, b in zip(str(k),str(k)[1:]))) == n:
                return m # Chai Wah Wu, Jul 12 2022

Formula

a(n) >= A005179(n). - David A. Corneth, Jan 25 2023

Extensions

More terms from David A. Corneth, Jul 08 2022

A355596 Numbers all of whose divisors are alternating numbers (A030141).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 32, 36, 41, 43, 47, 49, 50, 54, 58, 61, 63, 67, 69, 81, 83, 87, 89, 94, 98, 101, 103, 107, 109, 123, 125, 127, 129, 141, 145, 147, 149, 161, 163, 167, 181, 183, 189, 214, 218, 250, 254, 290, 298
Offset: 1

Views

Author

Bernard Schott, Jul 12 2022

Keywords

Comments

The smallest alternating number that is not a term is 30, because of 15.

Examples

			32 is a term since all the divisors of 32, i.e., 1, 2, 4, 8, 16 and 32, are alternating numbers
		

Crossrefs

Subsequence of A030141.
Similar sequences: A062687, A190217, A329419, A337941.

Programs

  • Mathematica
    q[n_] := AllTrue[Divisors[n], !MemberQ[Differences[Mod[IntegerDigits[#], 2]], 0] &]; Select[Range[300], q] (* Amiram Eldar, Jul 12 2022 *)
  • PARI
    isokd(n, d=digits(n))=for(i=2, #d, if((d[i]-d[i-1])%2==0, return(0))); 1; \\ A030141
    isok(m) = sumdiv(m, d, isokd(d)) == numdiv(m); \\ Michel Marcus, Jul 12 2022
  • Python
    from sympy import divisors
    def p(d): return 0 if d in "02468" else 1
    def c(n):
        if n < 10: return True
        s = str(n)
        return all(p(s[i]) != p(s[i+1]) for i in range(len(s)-1))
    def ok(n):
        return c(n) and all(c(d) for d in divisors(n, generator=True))
    print([k for k in range(1, 200) if ok(k)]) # Michael S. Branicky, Jul 12 2022
    

Extensions

a(51) and beyond from Michael S. Branicky, Jul 12 2022

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

A358099 a(n) is the number of divisors of n whose digits are in strictly decreasing order (A009995).

Original entry on oeis.org

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

Views

Author

Bernard Schott, Oct 29 2022

Keywords

Comments

As A009995 is finite with 1023 terms, a(n) is bounded with a(n) <= 1022 and not 1023, since A009995(1) = 0.

Examples

			22 has 4 divisors {1, 2, 11, 22} of which two have decimal digits that are not in strictly decreasing order: {11, 22}, hence a(22) = 4-2 = 2.
52 has 6 divisors {1, 2, 4, 13, 26, 52} of which four have decimal digits that are in strictly decreasing order {1, 2, 4, 52}, hence a(52) = 4.
		

Crossrefs

Similar: A086971 (semiprimes), A087990 (palindromic), A355593 (alternating), A357171 (increasing order).

Programs

  • Maple
    f:= proc(n) local L;
       if n < 10 then return true fi;
       L:= convert(n,base,10);
       andmap(type,L[2..-1]-L[1..-2],positive)
    end proc:
    g:= n -> nops(select(f,numtheory:-divisors(n))):
    map(g, [$1..100]); # Robert Israel, Oct 31 2022
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Max @ Differences @ IntegerDigits[#] < 0 &]; Array[a, 100] (* Amiram Eldar, Oct 29 2022 *)
  • PARI
    a(n) = sumdiv(n, d, my(dd=digits(d)); vecsort(dd, ,12) == dd); \\ Michel Marcus, Oct 30 2022
    
  • Python
    from sympy import divisors
    def c(n): s = str(n); return all(s[i+1] < s[i] for i in range(len(s)-1))
    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, Feb 12 2024

Formula

Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{n=2..1023} 1/A009995(n) = 3.89840673699905364734... (this is a rational number whose numerator and denominator have 1292 and 1291 digits, respectively). - Amiram Eldar, Jan 06 2024
Showing 1-5 of 5 results.