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

A223474 Least positive multiple of n that when written in base 10 has digits in nonincreasing order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 60, 52, 42, 30, 32, 51, 54, 76, 20, 21, 22, 92, 72, 50, 52, 54, 84, 87, 30, 31, 32, 33, 442, 70, 72, 74, 76, 663, 40, 41, 42, 43, 44, 90, 92, 94, 96, 98, 50, 51, 52, 53, 54, 55, 840, 741, 522, 531, 60, 61, 62, 63, 64, 65, 66, 871, 544, 552, 70, 71, 72, 73, 74, 75, 76, 77, 6552, 553, 80, 81, 82, 83, 84, 85
Offset: 1

Views

Author

Paul Tek, Mar 20 2013

Keywords

Comments

This sequence is well defined (same reasoning as for A079339).

Examples

			a(39) = 663 because it is the least multiple of 39 appearing in A009996.
		

Crossrefs

a(n)/n yields sequence A223475.
Cf. A009996.

Programs

  • Mathematica
    a[n_] := Block[{x=n}, While[0 < Max@Differences@IntegerDigits@x, x += n]; x]; Array[a, 85] (* Giovanni Resta, Mar 26 2013 *)
  • Perl
    sub A223474 {
        my $n = shift;
        my $a = $n;
        while ($a !~ /^9*8*7*6*5*4*3*2*1*0*$/) {
            $a += $n;
        }
        return $a;
    }
    foreach (1..100) {
        print A223474($_), ",";
    }

A381770 a(n) is the least k > 0 such that the factorial base expansion of k*n has digits in nonincreasing order.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 07 2025

Keywords

Comments

The sequence is well defined as for any n > 0, the factorial base expansion of n! has digits in nonincreasing order.

Examples

			The first terms, alongside the factorial base expansion of n*a(n), are:
  n   a(n)  fact(n*a(n))
  --  ----  ------------
   0     1  0
   1     1  1
   2     1  1,0
   3     1  1,1
   4     1  2,0
   5     1  2,1
   6     1  1,0,0
   7     2  2,1,0
   8     1  1,1,0
   9     1  1,1,1
  10     2  3,1,0
  11     2  3,2,0
  12     1  2,0,0
  13     5  2,2,2,1
  14     1  2,1,0
  15     1  2,1,1
		

Crossrefs

Programs

  • PARI
    is(n) = { my (p = -1); for (r = 2, oo, if (n==0, return (1), p > p = n%r, return
     (0)); n \= r;); }
    a(n) = { for (k = 1, oo, if (is(k*n), return (k););); }
    
  • Python
    from itertools import count
    def facbase(n, i=2): return [n] if n < i else [*facbase(n//i, i=i+1), n%i]
    def is_non_inc(n): return (fb:=facbase(n)) == sorted(fb, reverse=True)
    def a(n): return next(k for k in count(1) if is_non_inc(k*n))
    print([a(n) for n in range(87)]) # Michael S. Branicky, Mar 09 2025

Formula

a(n) <= (n-1)! for any n > 0.
a(n) = 1 iff n belongs to A351987.
Showing 1-2 of 2 results.