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

A347759 Let s(k) be the finite permutation associated to A175061(k); s(a(n)) is the inverse of s(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 7, 8, 6, 13, 11, 12, 10, 14, 15, 27, 33, 26, 32, 20, 21, 22, 28, 24, 30, 18, 16, 23, 29, 25, 31, 19, 17, 50, 48, 36, 42, 38, 44, 51, 49, 37, 43, 39, 45, 46, 47, 35, 41, 34, 40, 52, 53, 57, 55, 56, 54, 104, 102, 150, 126, 152, 128, 105, 103
Offset: 1

Views

Author

Rémy Sigrist, Sep 12 2021

Keywords

Comments

This sequence is a self-inverse permutation of the positive integers.

Examples

			For n = 42:
- the binary expansion of A175061(42) is "100001110000011",
- so s(42) = [1, 4, 3, 5, 2],
- and s(a(42)) = [1, 5, 3, 2, 4],
- and the binary expansion of A175061(a(42)) = "100000111001111",
- and a(42) = 37.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) < A003422(k) for any n < A003422(k).

A175062 An arrangement of permutations. Irregular table read by rows: Read A175061(n) in binary from left to right. Row n contains the lengths of the runs of 0's and 1's.

Original entry on oeis.org

1, 1, 2, 2, 1, 1, 3, 2, 1, 2, 3, 2, 3, 1, 2, 1, 3, 3, 2, 1, 3, 1, 2, 1, 4, 2, 3, 1, 4, 3, 2, 1, 3, 2, 4, 1, 3, 4, 2, 1, 2, 3, 4, 1, 2, 4, 3, 2, 4, 1, 3, 2, 4, 3, 1, 2, 3, 1, 4, 2, 3, 4, 1, 2, 1, 3, 4, 2, 1, 4, 3, 3, 4, 1, 2, 3, 4, 2, 1, 3, 2, 1, 4, 3, 2, 4, 1, 3, 1, 2, 4, 3, 1, 4, 2, 4, 3, 1, 2, 4, 3, 2, 1, 4, 2
Offset: 1

Views

Author

Leroy Quet, Dec 12 2009

Keywords

Comments

Let F(n) = sum{k=1 to n} k!. Then rows F(n-1)+1 to F(n) are the permutations of (1,2,3,...,n). (And each row in this range is made up of exactly n terms, obviously.)

Examples

			A175061(10) = 536 in binary is 1000011000. This contains a run of one 1, followed by a run of four 0's, followed by a run of two 1's, followed finally by a run of three 0's. So row 10 consists of the run lengths (1,4,2,3), a permutation of (1,2,3,4).
		

Crossrefs

Extensions

Extended by Ray Chandler, Dec 16 2009

A109299 Primal codes of canonical finite permutations on positive integers.

Original entry on oeis.org

1, 2, 12, 18, 360, 540, 600, 1350, 1500, 2250, 75600, 105840, 113400, 126000, 158760, 246960, 283500, 294000, 315000, 411600, 472500, 555660, 735000, 864360, 992250, 1296540, 1389150, 1440600, 1653750, 2572500, 3241350, 3601500, 3858750
Offset: 1

Views

Author

Jon Awbrey, Jul 09 2005

Keywords

Comments

A canonical finite permutation on positive integers is a bijective mapping of [n] = {1, ..., n} to itself, counting the empty mapping as a permutation of the empty set.
From Rémy Sigrist, Sep 18 2021: (Start)
As usual with lists, the terms of the sequence are given in ascending order.
Equivalently, these are the numbers m such that A001221(m) = A051903(m) = A061395(m) = A071625(m).
This sequence has connections with A175061; here the prime factorizations, there the run-lengths in binary expansions, encode finite permutations.
There are m! terms with m distinct prime factors, the least one being A006939(m) and the greatest one being A076954(m); these m! terms are not necessarily contiguous. (End)

Examples

			Writing (prime(i))^j as i:j, we have this table:
Primal Codes of Canonical Finite Permutations
        1 = { }
        2 = 1:1
       12 = 1:2 2:1
       18 = 1:1 2:2
      360 = 1:3 2:2 3:1
      540 = 1:2 2:3 3:1
      600 = 1:3 2:1 3:2
     1350 = 1:1 2:3 3:2
     1500 = 1:2 2:1 3:3
     2250 = 1:1 2:2 3:3
    75600 = 1:4 2:3 3:2 4:1
   105840 = 1:4 2:3 3:1 4:2
   113400 = 1:3 2:4 3:2 4:1
   126000 = 1:4 2:2 3:3 4:1
   158760 = 1:3 2:4 3:1 4:2
   246960 = 1:4 2:2 3:1 4:3
   283500 = 1:2 2:4 3:3 4:1
   294000 = 1:4 2:1 3:3 4:2
   315000 = 1:3 2:2 3:4 4:1
   411600 = 1:4 2:1 3:2 4:3
   472500 = 1:2 2:3 3:4 4:1
   555660 = 1:2 2:4 3:1 4:3
   735000 = 1:3 2:1 3:4 4:2
   864360 = 1:3 2:2 3:1 4:4
   992250 = 1:1 2:4 3:3 4:2
  1296540 = 1:2 2:3 3:1 4:4
  1389150 = 1:1 2:4 3:2 4:3
  1440600 = 1:3 2:1 3:2 4:4
  1653750 = 1:1 2:3 3:4 4:2
  2572500 = 1:2 2:1 3:4 4:3
  3241350 = 1:1 2:3 3:2 4:4
  3601500 = 1:2 2:1 3:3 4:4
  3858750 = 1:1 2:2 3:4 4:3
  5402250 = 1:1 2:2 3:3 4:4
		

References

  • Suggested by Franklin T. Adams-Watters

Crossrefs

Programs

  • PARI
    \\ See Links section.
    
  • PARI
    is(n) = { my (f=factor(n), p=f[,1]~, e=f[,2]~); Set(e)==[1..#e] && (#p==0 || p[#p]==prime(#p)) } \\ Rémy Sigrist, Sep 18 2021

Extensions

Offset changed to 1 and data corrected by Rémy Sigrist, Sep 18 2021

A175356 Those positive integers n where, when written in binary, there are exactly k number of runs (of either 0's or 1's) each of exactly k length, for all k where 1<=k<=m, for some positive integer m.

Original entry on oeis.org

1, 19, 25, 27, 8984, 8988, 9016, 9100, 9112, 9116, 9784, 10008, 10012, 10040, 12568, 12572, 12600, 12680, 12686, 12728, 12740, 12742, 12744, 12750, 12760, 12764, 12856, 13192, 13198, 13240, 13880, 14104, 14108, 14136, 14476, 14488, 14492, 14532, 14534, 14536
Offset: 1

Views

Author

Leroy Quet, Apr 22 2010

Keywords

Comments

A "run" of 0's is not immediately bounded by any 0's, and a "run" of 1's is not immediately bounded by any 1's.
There are exactly (m*(m+1)/2)! / Product_{k=1 to m} k! numbers in the sequence each of m^3/3 + m^2/2 + m/6 binary digits, for all m >= 1, and none of any other number of binary digits.
A005811(a(n)) is triangular, i.e., in A000217. - Michael S. Branicky, Jan 19 2021

Examples

			9016 in binary is 10001100111000. There is exactly one run of one binary digit, two runs of two binary digits, and three runs of three binary digits. (Note that it doesn't matter if the runs are of 0's or of 1's.) So, 9016 is in the sequence.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.
    
  • Python
    from itertools import groupby
    def ok(n):
      runlens = [len(list(g)) for k, g in groupby(bin(n)[2:])]
      return all(runlens.count(k) == k for k in range(1, max(runlens)+1))
    def aupto(limit): return [m for m in range(1, limit+1) if ok(m)]
    print(aupto(14536)) # Michael S. Branicky, Jan 19 2021

Extensions

More terms from Rémy Sigrist, Feb 06 2019
Showing 1-4 of 4 results.