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.

A263327 A permutation of {0, 1, ..., 1023} corresponding to lexicographical ordering A262557 of numbers with decreasing digits A009995.

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 3, 5, 6, 9, 10, 12, 17, 18, 20, 24, 33, 34, 36, 40, 48, 65, 66, 68, 72, 80, 96, 129, 130, 132, 136, 144, 160, 192, 257, 258, 260, 264, 272, 288, 320, 384, 513, 514, 516, 520, 528, 544, 576, 640, 768, 7, 11, 13, 14
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 15 2015

Keywords

Comments

For n = 1..1023, A262557(a(n)) = A009995(n).
Cycle type = (1^12, 3^2, 10^2, 74, 912), i.e., this permutation has 12 fixed points, two 3-cycles and two 10-cycles, and two more cycles of length 74 and 912. See A263355 for the list of these cycles, A263383 for the length of the n-th cycle (ordered by increasing largest element).

Crossrefs

Cf. A009995, A262557, A263328 (inverse), A263329 (fixed points), A263383, A263355 (cycles).
Row 10 of A294648.

Programs

  • Haskell
    a263327 0 = 0
    a263327 n = head [x | x <- [1..1023], a262557 x == a009995' n]
    
  • Mathematica
    SortBy[Range[0, 1023], DigitCount[#, 2, 1] &] (* Paolo Xausa, Mar 31 2025 *)
  • PARI
    A263327=vecsort(A262557,,1) \\ Does not include a(0)=0. - M. F. Hasler, Dec 11 2019

Extensions

Edited by M. F. Hasler, Dec 11 2019

A009995 Numbers with digits in strictly decreasing order. From the Macaulay expansion of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 21, 30, 31, 32, 40, 41, 42, 43, 50, 51, 52, 53, 54, 60, 61, 62, 63, 64, 65, 70, 71, 72, 73, 74, 75, 76, 80, 81, 82, 83, 84, 85, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 210, 310, 320, 321, 410, 420, 421, 430, 431, 432, 510, 520, 521, 530
Offset: 1

Views

Author

Keywords

Comments

There are precisely 1023 terms (corresponding to every nonempty subset of {0..9}).
A178788(a(n)) = 1. - Reinhard Zumkeller, Jun 30 2010
A193581(a(n)) > 0 for n > 9. - Reinhard Zumkeller, Aug 10 2011
A227362(a(n)) = a(n). - Reinhard Zumkeller, Jul 09 2013
For a fixed natural number r, any natural number n has a unique "Macaulay expansion" n = C(a_r,r)+C(a_{r-1},r-1)+...+C(a_1,1) with a_r > a_{r-1} > ... > a_1 >= 0. If r=10, concatenating the digits a_r, ..., a_1 gives the present sequence. The representation is valid for all n, but the concatenation only makes sense if all the a_i are < 10. - N. J. A. Sloane, Apr 05 2014
a(n) = A262557(A263327(n)); a(A263328(n)) = A262557(n). - Reinhard Zumkeller, Oct 15 2015

Crossrefs

Cf. A009993.
Cf. A262557 (sorted lexicographically), A263327, A263328.

Programs

  • Haskell
    import Data.Set (fromList, minView, insert)
    a009995 n = a009995_list !! n
    a009995_list = 0 : f (fromList [1..9]) where
       f s = case minView s of
             Nothing     -> []
             Just (m,s') -> m : f (foldl (flip insert) s' $
                                  map (10*m +) [0..m `mod` 10 - 1])
    -- Reinhard Zumkeller, Aug 10 2011
    
  • Mathematica
    Sort@ Flatten@ Table[FromDigits /@ Subsets[ Range[9, 0, -1], {n}], {n, 10}] (* Zak Seidov, May 10 2006 *)
  • PARI
    is(n)=fromdigits(vecsort(digits(n),,12))==n \\ Charles R Greathouse IV, Apr 16 2015

A272011 Irregular triangle read by rows: strictly decreasing sequences of nonnegative numbers given in lexicographic order.

Original entry on oeis.org

0, 1, 1, 0, 2, 2, 0, 2, 1, 2, 1, 0, 3, 3, 0, 3, 1, 3, 1, 0, 3, 2, 3, 2, 0, 3, 2, 1, 3, 2, 1, 0, 4, 4, 0, 4, 1, 4, 1, 0, 4, 2, 4, 2, 0, 4, 2, 1, 4, 2, 1, 0, 4, 3, 4, 3, 0, 4, 3, 1, 4, 3, 1, 0, 4, 3, 2, 4, 3, 2, 0, 4, 3, 2, 1, 4, 3, 2, 1, 0, 5, 5, 0, 5, 1, 5, 1
Offset: 0

Views

Author

Peter Kagey, Apr 17 2016

Keywords

Comments

Length of n-th row given by A000120(n);
Maximum of n-th row given by A000523(n);
Minimum of n-th row given by A007814(n);
GCD of n-th row given by A064894(n);
Sum of n-th row given by A073642(n + 1).
n-th row begins at index A000788(n - 1) for n > 0.
The first appearance of n is at A001787(n).
a(A001787(n) + 1) = a(A001787(n)) for all n > 0.
a(A001787(n) + 2) = 0 for all n > 0.
a(A001787(n) + 3) = a(A001787(n)) for all n > 1.
a(A001787(n) + 4) = 1 for all n > 1.
a(A001787(n) + 5) = a(A001787(n)) for all n > 1.
Row n < 1024 lists the digits of A262557(n). - M. F. Hasler, Dec 11 2019

Examples

			Row n is given by the exponents in the binary expansion of n. For example, row 5 = [2, 0] because 5 = 2^2 + 2^0.
Row 0: []
Row 1: [0]
Row 2: [1]
Row 3: [1, 0]
Row 4: [2]
Row 5: [2, 0]
Row 6: [2, 1]
Row 7: [2, 1, 0]
		

Crossrefs

Cf. A133457 gives the rows in reverse order.

Programs

  • Mathematica
    Map[Length[#] - Flatten[Position[#, 1]] &, IntegerDigits[Range[50], 2]] (* Paolo Xausa, Feb 13 2024 *)
  • PARI
    apply( A272011_row(n)=Vecrev(vecextract([0..exponent(n+!n)],n)), [0..39]) \\ For n < 2^10: row(n)=digits(A262557[n]). There are 2^k rows starting with k, they start at row 2^k. - M. F. Hasler, Dec 11 2019

A263328 Permutation of {0, ..., 1023} corresponding to lexicographic ordering of numbers with decreasing digits (A009995). Inverse of A263327.

Original entry on oeis.org

0, 1, 2, 11, 3, 12, 13, 56, 4, 14, 15, 57, 16, 58, 59, 176, 5, 17, 18, 60, 19, 61, 62, 177, 20, 63, 64, 178, 65, 179, 180, 386, 6, 21, 22, 66, 23, 67, 68, 181, 24, 69, 70, 182, 71, 183, 184, 387, 25, 72, 73, 185, 74, 186, 187, 388, 75, 188, 189, 389, 190
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 15 2015

Keywords

Comments

For n = 1..1023: A009995(a(n)) = A262557(n).
The fixed points and cycles of this permutation (up to reversal the same as for its inverse A263327) are listed in A263355. - M. F. Hasler, Dec 11 2019

Crossrefs

Cf. A009995, A262557, A263327 (inverse), A263329 (fixed points).

Programs

  • Haskell
    a263328 0 = 0
    a263328 n = head [x | x <- [1..1023], a009995' x == a262557 n]
    
  • PARI
    A263328=vecsort(A263327,,1) \\ Does not include a(0)=0. - M. F. Hasler, Dec 11 2019

A330350 Table of strictly decreasing sequences with terms in {0, ..., 9}, sorted by length, then lexicographically.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Dec 11 2019

Keywords

Comments

Row n lists the digits of A009995(n), just as row n < 1024 of A272011 lists the digits of A262557(n).

Examples

			The first rows start
   n | row n
   1 | 0,
   2 | 1,
    ...
  10 | 9,
  11 | 1, 0,
  12 | 2, 0,
  13 | 2, 1,
  14 | 3, 0,
  15 | 3, 1,
  16 | 3, 2,
  17 | 4, 0,
    ...
The Sury paper lists the first rows of length 3, row 56 = (2, 1, 0), row 57 = (3, 1, 0), row 58 = (3, 2, 0), row 59 = (3, 2, 1), row 60 = (4, 1, 0), ...
		

Crossrefs

Programs

  • PARI
    concat(0,[digits(n)|n<-[1..99],is_A009995(n)])
Showing 1-5 of 5 results.