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.

Previous Showing 11-20 of 30 results. Next

A221714 Numbers written in base 2 with digits rearranged to be in decreasing order.

Original entry on oeis.org

0, 1, 10, 11, 100, 110, 110, 111, 1000, 1100, 1100, 1110, 1100, 1110, 1110, 1111, 10000, 11000, 11000, 11100, 11000, 11100, 11100, 11110, 11000, 11100, 11100, 11110, 11100, 11110, 11110, 11111, 100000, 110000, 110000, 111000, 110000
Offset: 0

Views

Author

Bruce L. Rothschild and N. J. A. Sloane, Jan 26 2013

Keywords

Comments

This is the base-2 equivalent of A004186.

Crossrefs

For decimal equivalents see A073138.

Programs

  • Maple
    a:= n-> parse(cat(0, sort(Bits[Split](n), `>`)[])):
    seq(a(n), n=0..36);  # Alois P. Heinz, Aug 18 2025
  • Mathematica
    a[n_] := FromDigits[-Sort[-IntegerDigits[n, 2]]] (* Giovanni Resta, Jan 27 2013 *)
  • Python
    def a(n):
         return "".join(sorted(bin(n)[2:],reverse=True)) # Indranil Ghosh, Jan 09 2017
    
  • Python
    def A221714(n): return int(bin((m:=1<>n.bit_count()))[2:]) # Chai Wah Wu, Aug 18 2025

Extensions

a(18)-a(36) from Giovanni Resta, Jan 27 2013

A276349 Numbers consisting of a nonempty string of 1's followed by a nonempty string of 0's.

Original entry on oeis.org

10, 100, 110, 1000, 1100, 1110, 10000, 11000, 11100, 11110, 100000, 110000, 111000, 111100, 111110, 1000000, 1100000, 1110000, 1111000, 1111100, 1111110, 10000000, 11000000, 11100000, 11110000, 11111000, 11111100, 11111110, 100000000, 110000000, 111000000
Offset: 1

Views

Author

Jaroslav Krizek, Aug 30 2016

Keywords

Comments

Intersection of A037415 and A009996 except for 1 [Corrected by David A. Corneth, Aug 30 2016].
Set of terms from sequence A052983.
a(n) is the binary expansion of A043569(n). - Michel Marcus, Sep 04 2016

Examples

			60 is of the form binomial(a, 2) + b where 0 < b <= a and a = 11, b = 5. So a(60) has (11 + 1) digits and 5 leading ones. The other digits are 0. Giving a(60) = 111110000000. It has 7 (more than 1) trailing zeros so the next one, a(61) is a(60) + 10^(7 - 1). - _David A. Corneth_, Aug 30 2016
		

Crossrefs

Programs

  • Magma
    [n: n in [1..10^7] | Seqint(Setseq(Set(Sort(Intseq(n))))) eq 10 and Seqint(Sort((Intseq(n)))) eq n];
    
  • Maple
    seq(seq(10^(m+1)*(1-10^(-j))/9,j=1..m),m=1..20); # Robert Israel, Sep 02 2016
  • Mathematica
    Table[FromDigits@ Join[ConstantArray[1, #1], ConstantArray[0, #2]] & @@@ Transpose@ {#, n - #} &@ Range[n - 1], {n, 2, 9}] // Flatten (* Michael De Vlieger, Aug 30 2016 *)
    Flatten[Table[FromDigits[Join[PadRight[{},n,1],PadRight[{},k,0]]],{n,8},{k,8}]]//Sort (* Harvey P. Dale, Jan 09 2019 *)
  • PARI
    is(n) = vecmin(digits(n))==0 && vecmax(digits(n))==1 && digits(n)==vecsort(digits(n), , 4) \\ Felix Fröhlich, Aug 30 2016
    
  • PARI
    a(n) = my(r =  ceil((sqrt(1+8*n)+1)/2), k = n - binomial(r-1, 2));10^(r-k)*(10^(k)-1)/9
    \\ given an element n, computes the next element of the sequence.
    nxt(n) = my(d = digits(n), qd=#d, s = vecsum(d)); if(qd-s>1, n+10^(qd-s-1), 10^qd)
    \\ given an element n of the sequence, computes its place in the sequence.
    inv(n) = my(d = digits(n)); binomial(#d-1,2) + vecsum(d) \\ David A. Corneth, Aug 31 2016
    
  • Python
    from math import isqrt, comb
    def A276349(n): return 10*(10**(m:=isqrt(n<<3)+1>>1)-10**(comb(m+1,2)-n))//9 # Chai Wah Wu, Jun 16 2025

Formula

A227362(a(n)) = 10.
From Robert Israel, Sep 02 2016: (Start)
a((m^2-m)/2+j) = 10^(m+1)*(1-10^(-j))/9 for m>=1, 1<=j<=m.
a(n) = 10*(10^m - 10^(-n+m*(m+1)/2))/9 where m = A002024(n). (End)
A002275(A002260(n)) * 10^A004736(n) - Peter Kagey, Sep 02 2016
Sum_{n>=1} 1/a(n) = A073668. - Amiram Eldar, Feb 20 2022
a(n) = 10*A309761(n). - Chai Wah Wu, Jun 16 2025

A351987 Numbers with factorial base expansion digits in nonincreasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 12, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 30, 32, 33, 48, 54, 56, 57, 60, 62, 63, 64, 65, 72, 78, 80, 81, 84, 86, 87, 88, 89, 90, 92, 93, 94, 95, 96, 102, 104, 105, 108, 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, 144, 150
Offset: 1

Views

Author

Rémy Sigrist, Feb 27 2022

Keywords

Comments

This sequence is to factorial base what A009996 is to decimal base.

Examples

			The factorial base expansion of 102 is "4100", so 102 belongs to this sequence.
The factorial base expansion of 103 is "4101", so 103 does not belong to this sequence.
		

Crossrefs

Programs

  • Mathematica
    max = 6; q[n_] := AllTrue[Differences @ IntegerDigits[n, MixedRadix[Range[max, 2, -1]]], # <= 0 &]; Select[Range[0, max!], q] (* Amiram Eldar, Feb 28 2022 *)
  • PARI
    is(n) = { my (p=0); for (r=2, oo, if (n==0, return (1)); my (d=n%r); if (d
    				
  • Python
    def facbase(n, i=2): return [n] if n < i else [*facbase(n//i, i=i+1), n%i]
    def ok(n): return (fb:=facbase(n)) == sorted(fb, reverse=True)
    print([k for k in range(151) if ok(k)]) # Michael S. Branicky, Mar 09 2025
    
  • Python
    # faster for initial segment of sequence
    from math import factorial
    from itertools import count, islice, product
    def bgen(d, first, last): # generator of non-increasing factorial base tuples
        yield from ((i,) + t for i in range(first, last+1) for t in bgen(d-1, first=0, last=min(i, d-1))) if d else (tuple(),)
    def A351987_gen(): # generator of terms
        yield from (sum(dj*factorial(j) for j, dj in enumerate(t[::-1], 1)) for d in count(0) for t in bgen(d, 1, d))
    print(list(islice(A351987_gen(), 63))) # Michael S. Branicky, Mar 09 2025

A355221 The k-th leftmost digit of a(n) is the least of the k leftmost digits of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 20, 21, 22, 22, 22, 22, 22, 22, 22, 22, 30, 31, 32, 33, 33, 33, 33, 33, 33, 33, 40, 41, 42, 43, 44, 44, 44, 44, 44, 44, 50, 51, 52, 53, 54, 55, 55, 55, 55, 55, 60, 61, 62, 63, 64, 65, 66, 66
Offset: 0

Views

Author

Rémy Sigrist, Jun 24 2022

Keywords

Comments

Leading zeros are ignored.

Examples

			For n = 1402: min({1}) = 1, min({1, 4}) = 1, min({1, 4, 0}) = 0, min({1, 4, 0, 2}) = 0, so a(1402) = 1100.
		

Crossrefs

See A355222, A355223 and A355224 for similar sequences.
Cf. A009996 (fixed points), A342126 (binary analog).

Programs

  • Mathematica
    Table[FromDigits[Table[Min[Take[IntegerDigits[n],d]],{d,IntegerLength[n]}]],{n,0,70}] (* Harvey P. Dale, Jun 30 2023 *)
  • PARI
    a(n, base=10) = { my (d=digits(n, base), m=oo); for (k=1, #d, d[k]=m=min(m, d[k])); fromdigits(d, base) }
    
  • Python
    def a(n):
        s, m = str(n), "9"
        return int("".join((m:=min(m, s[k])) for k in range(len(s))))
    print([a(n) for n in range(68)]) # Michael S. Branicky, Jun 24 2022
    
  • Python
    from itertools import accumulate
    def A355221(n): return int(''.join(accumulate(str(n),func=min))) # Chai Wah Wu, Jun 25 2022

Formula

a(n) <= n with equality iff n belongs to A009996.
a(a(n)) = a(n).

A355224 The k-th rightmost digit of a(n) is the greatest of the k rightmost digits of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 22, 33, 44, 55, 66, 77, 88, 99, 20, 21, 22, 33, 44, 55, 66, 77, 88, 99, 30, 31, 32, 33, 44, 55, 66, 77, 88, 99, 40, 41, 42, 43, 44, 55, 66, 77, 88, 99, 50, 51, 52, 53, 54, 55, 66, 77, 88, 99, 60, 61, 62, 63, 64, 65, 66, 77
Offset: 0

Views

Author

Rémy Sigrist, Jun 24 2022

Keywords

Comments

Leading zeros are ignored.

Examples

			For n = 1402:
- max({1, 4, 0, 2}) = 4,
- max({4, 0, 2}) = 4,
- max({0, 2}) = 2,
- max({2}) = 2,
- so a(1402) = 4422.
		

Crossrefs

See A355221, A355222 and A355223 for similar sequences.
Cf. A009996 (fixed points), A340632 (binary analog).

Programs

  • Mathematica
    Table[FromDigits[Max/@Table[Drop[IntegerDigits[m],n],{n,0,IntegerLength[m]-1}]],{m,0,70}] (* Harvey P. Dale, Nov 17 2024 *)
  • PARI
    a(n, base=10) = { my (d=digits(n, base), m=-oo); forstep (k=#d, 1, -1, d[k]=m=max(m, d[k])); fromdigits(d, base) }
    
  • Python
    def a(n):
        s, m = str(n), "0"
        return int("".join((m:=max(m, s[-1-k])) for k in range(len(s)))[::-1])
    print([a(n) for n in range(68)]) # Michael S. Branicky, Jun 24 2022
    
  • Python
    from itertools import accumulate
    def A355224(n): return int(''.join(accumulate(str(n)[::-1],func=max))[::-1]) # Chai Wah Wu, Jun 25 2022

Formula

a(n) >= n with equality iff n belongs to A009996.
a(a(n)) = a(n).

A062826 Square nialpdromes not ending in 0.

Original entry on oeis.org

1, 4, 9, 64, 81, 441, 841, 961, 7744, 8874441, 9853321, 999887641
Offset: 1

Views

Author

David W. Wilson, Jul 20 2001

Keywords

Comments

Probably finite.
There are no more terms up to 10^11. - Charles R Greathouse IV, Jan 02 2014
No more terms up to 10^42. - Chai Wah Wu, Dec 07 2015

Crossrefs

Nialpdromes are A009996. Square nialpdromes are A028822.

Programs

  • Maple
    F:= proc(x) local L; L:= convert(x,base,10); max(L[1..-2] - L[2..-1]) <= 0 end proc:
    select(F, [seq(seq((10*x+y)^2,y=1..9),x=0..10^6)]); # Robert Israel, Dec 08 2015

A130576 Record values in A130571.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 21, 22, 30, 31, 32, 33, 40, 41, 42, 43, 44, 50, 51, 52, 53, 54, 55, 60, 61, 62, 63, 64, 65, 66, 70, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90, 100, 101, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 05 2007

Keywords

Comments

a(n)=A130571(A130577(n)); A130571(i)A130577(i);
for n<=54 the sequence coincides with A009996, A032873, A032907, A072543 and A084383.

A190220 Numbers all of whose divisors are numbers whose decimal digits are in nonincreasing order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 21, 22, 31, 33, 40, 41, 43, 44, 53, 55, 61, 62, 63, 66, 71, 73, 77, 82, 83, 86, 88, 93, 97, 99, 110, 211, 220, 311, 331, 421, 422, 431, 433, 440, 443, 511, 521, 541, 622, 631, 633, 641, 643, 653, 661, 662, 733, 743, 751
Offset: 1

Views

Author

Jaroslav Krizek, May 06 2011

Keywords

Comments

Subset of A009996. Superset of A028867, A190219 and A190217.

Examples

			Number 110 is in sequence because all divisors of 110 (1, 2, 5, 10, 11, 22, 55, 110) are numbers whose decimal digits are in nonincreasing order.
		

Programs

  • Maple
    with(numtheory): A190220 := proc(n) option remember: local d, dd, i, j, k, m, poten: if(n=1)then return 1: fi: for k from procname(n-1)+1 do d:=divisors(k): poten:=1: for i from 1 to nops(d) do m:=-1: dd:=convert(d[i], base, 10): for j from 1 to nops(dd) do if(m<=dd[j])then m:=dd[j]: else poten:=0: break: fi: od: if(poten=0)then break:fi: od: if(poten=1)then return k: fi: od: end: seq(A190220(n), n=1..64); # Nathaniel Johnston, May 14 2011

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($_), ",";
    }

A223475 Least k such that the decimal representation of k*n has digits in nonincreasing order.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 3, 2, 2, 3, 3, 4, 1, 1, 1, 4, 3, 2, 2, 2, 3, 3, 1, 1, 1, 1, 13, 2, 2, 2, 2, 17, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 15, 13, 9, 9, 1, 1, 1, 1, 1, 1, 1, 13, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 84, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 86, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 5, 7, 5, 2, 5, 3, 4, 6, 1, 1, 75, 47, 38, 8, 45, 56, 8, 7, 5, 55, 5, 7
Offset: 1

Views

Author

Paul Tek, Mar 20 2013

Keywords

Examples

			39*17 = 663 has digits in nonincreasing order, and no k < 17 has this property, hence a(39) = 17.
		

Crossrefs

a(n)*n yields sequence A223474.
Cf. A009996.

Programs

  • Mathematica
    a[n_] := a[nn_] := Block[{n = nn, f, w = Range@9, k = 1}, While[Mod[n, 10] == 0, n /= 10]; While[(f = Select[w, Max@ Differences@ IntegerDigits[n*#] <= 0 &, 1]) == {}, k++; w = Union@ Flatten@Table[ Select[d*10^(k-1) + w, Max@ Differences@ IntegerDigits[Mod[n*#, 10^k], 10, k] <= 0 &], {d, 0, 9}]]; f[[1]]]; Array[a, 123] (* faster than basic approach. Giovanni Resta, Mar 26 2013 *)
Previous Showing 11-20 of 30 results. Next