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

A336813 Fixed points of A187769.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 18, 29, 30, 31, 32, 33, 34, 41, 42, 53, 54, 61, 62, 63, 64, 65, 66, 76, 115, 125, 126, 127, 128, 129, 130, 172, 211, 253, 254, 255, 256, 257, 258, 312, 455, 509, 510, 511, 512, 513, 514, 696, 839, 1021
Offset: 1

Views

Author

Rémy Sigrist, Nov 21 2020

Keywords

Comments

If m > 0 belongs to the sequence, then A054429(m) also belongs to the sequence; this accounts for the symmetries visible in the binary plot of the sequence (see Links section).
For any k >= 0 and any e in {-1, 0, +1}, 2^k + e belongs to the sequence.

Examples

			A187769(53) = 53, so 53 belongs to the sequence.
		

Crossrefs

Programs

  • PARI
    See Links section.

A381500 a(n) = A019565(A187769(n)).

Original entry on oeis.org

1, 2, 3, 6, 5, 10, 15, 30, 7, 14, 21, 35, 42, 70, 105, 210, 11, 22, 33, 55, 77, 66, 110, 165, 154, 231, 385, 330, 462, 770, 1155, 2310, 13, 26, 39, 65, 91, 143, 78, 130, 195, 182, 273, 455, 286, 429, 715, 1001, 390, 546, 910, 1365, 858, 1430, 2145, 2002, 3003
Offset: 0

Views

Author

Keywords

Comments

The squarefree numbers, ordered first by largest prime factor (dividing the sequence into rows), then by number of prime factors, then lexicographically by their prime factors (written in descending order).
We index (a(n)) from offset 0, matching the choice for A019565 and similar sequences.

Examples

			Table begins:
  Row 0:  1;
  Row 1:  2;
  Row 2:  3,  6;
  Row 3:  5, 10, 15, 30;
  Row 4:  7, 14, 21, 35, 42, 70, 105, 210;
  Row 5: 11, 22, 33, 55, 77, 66, 110, 165, 154, 231, 385, 330, 462, 770, 1155, 2310;
  ...
Table of a(n) for n = 0..31, demonstrating relationship of this sequence with s = A187769:
          <-factors                    <-factors
   n  a(n)  2 3 5 7  s(n)  |   n   a(n)  2 3 5 7 11 s(n)
  -------------------------|----------------------------
   0    1   .          0   |  16    11   . . . . x   16
   1    2   x          1   |  17    22   x . . . x   17
   2    3   . x        2   |  18    33   . x . . x   18
   3    6   x x        3   |  19    55   . . x . x   20
   4    5   . . x      4   |  20    77   . . . x x   24
   5   10   x . x      5   |  21    66   x x . . x   19
   6   15   . x x      6   |  22   110   x . x . x   21
   7   30   x x x      7   |  23   165   . x x . x   22
   8    7   . . . x    8   |  24   154   x . . x x   25
   9   14   x . . x    9   |  25   231   . x . x x   26
  10   21   . x . x   10   |  26   385   . . x x x   28
  11   35   . . x x   12   |  27   330   x x x . x   23
  12   42   x x . x   11   |  28   462   x x . x x   27
  13   70   x . x x   13   |  29   770   x . x x x   29
  14  105   . x x x   14   |  30  1155   . x x x x   30
  15  210   x x x x   15   |  31  2310   x x x x x   31
  -------------------------|----------------------------
            1 2 4 8  s(n)  |             1 2 4 8 16 s(n)
             bits->                         bits->
		

Crossrefs

Programs

  • Mathematica
    a187769 = {{0}}~Join~Table[SortBy[Range[2^n, 2^(n + 1) - 1], DigitCount[#, 2, 1] &], {n, 0, 8}] // Flatten; a019565[x_] := Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[x, 2]; Map[a019565, a187769]

Formula

a(n) = A019565(A187769(n)).
As an irregular triangle T(n,k), where row 0 = {1}:
For n > 1, omega(T(n,1)) = 1, omega(T(n, 2^(n-1))) = n, thus row n is divided into n segments S such that with S, omega(T(n,k)) = m, where m = 1..n. (See A187769 for the lengths of segments associated with Pascal's triangle A007318.)
S(-1,-1) = (1).
For n >= 0:
S(n-1, n) = (); S(n, -1) = ();
for 0 <= m <= n, S(n,m) = ( A253550'(S(n-1, m)), A119416'(S(n-1, m-1)) ), where Axxx'((i_1, i_2, ..., i_j)) denotes Axxx(i_1), Axxx(i_2), ..., Axxx(i_j).
a(A163866(n)) = A098012(n).

A294648 Irregular triangle read by rows, representing a family of sequences L(n), for n=1, 2, 3, ... The sequence L(n) (i.e., the n-th row) is the ordinance of vectors of the n-dimensional Boolean cube (hypercube) {0,1}^n in accordance with their (Hamming) weights, where the lexicographic order is chosen as a second criterion for an ordinance the vectors of equal weights.

Original entry on oeis.org

0, 1, 0, 1, 2, 3, 0, 1, 2, 4, 3, 5, 6, 7, 0, 1, 2, 4, 8, 3, 5, 6, 9, 10, 12, 7, 11, 13, 14, 15, 0, 1, 2, 4, 8, 16, 3, 5, 6, 9, 10, 12, 17, 18, 20, 24, 7, 11, 13, 14, 19, 21, 22, 25, 26, 28, 15, 23, 27, 29, 30, 31, 0, 1, 2, 4, 8, 16, 32, 3, 5, 6, 9, 10, 12, 17, 18, 20, 24, 33, 34, 36, 40, 48, 7, 11, 13, 14, 19, 21
Offset: 1

Views

Author

Valentin Bakoev, Nov 06 2017

Keywords

Comments

The sequences represent the ordinance of vectors of the n-dimensional Boolean cube (hypercube) {0,1}^n in accordance with their (Hamming) weights. The lexicographic order is chosen as a second criterion for the ordinance of the vectors of equal weights. We refer to this order as a Weight-Lexicographic Order (WLO). The WLO is represented by the (serial) numbers of the vectors, instead of the vectors itself. It is well known that if the vectors of {0,1}^n are in lexicographic (standard) order, their numbers form the sequence of natural numbers 0, 1, 2, ..., 2^n-1. So, the WLO means a permutation of the numbers 0, 1, 2, ..., 2^n-1, such that the corresponding vectors are in WLO. This sequence (permutation) is denoted by L(n). It consists of (n+1) subsequences, corresponding to the layers of the Boolean cube.

Examples

			The lexicographic order of {0,1}^3 is: (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), (1,1,1), and the corresponding sequence of (serial) numbers is: 0, 1, 2, ..., 7. The WLO of these vectors is given by the sequence L(3)= 0, 1, 2, 4, 3, 5, 6, 7.
The triangle starts:
n=1: 0, 1;
n=2: 0, 1, 2, 3;
n=3: 0, 1, 2, 4, 3, 5, 6, 7;
n=4: 0, 1, 2, 4, 8, 3, 5, 6, 9, 10, 12, 7, 11, 13, 14, 15;
n=5: 0, 1, 2, 4, 8, 16, 3, 5, 6, 9, 10, 12, 17, 18, 20, 24, 7, 11, 13, 14, 19, 21, 22, 25, 26, 28, 15, 23, 27, 29, 30, 31;
n=6: 0, 1, 2, 4, 8, 16, 32, 3, 5, 6, 9, 10, 12, 17, 18, 20, 24, 33, 34, 36, 40, 48, 7, 11, 13, 14, 19, 21, 22, 25, 26, 28, 35, 37, 38, 41, 42, 44, 49, 50, 52, 56, 15, 23, 27, 29, 30, 39, 43, 45, 46, 51, 53, 54, 57, 58, 60, 31, 47, 55, 59, 61, 62, 63;
		

Crossrefs

A051459 gives the orders' number of the vectors of {0,1}^n in accordance with their weights.
Cf. A007318, A047869 (8th row), A091444 (as bits), A187769, A263327 (10th row).
Cf. A382467.

Programs

  • Maple
    with(ListTools): conc := (a,b,c) -> Flatten([op(a),[seq(op(j)+c, j in b)]], 1):
    rec := proc(n,k) option remember; `if`(k=0, [0], `if`(k=n, [2^n-1], conc(rec(n-1,k), rec(n-1,k-1), 2^(n-1)))) end:
    L := n -> `if`(n=1, [0,1], Flatten([seq(rec(n,k),k=0..n)], 1)):
    Flatten([seq(L(n), n = 1..6)], 1); # Peter Luschny, Nov 06 2017
  • Mathematica
    conc[a_List, b_List, c_] := Join[a, b + c];
    rec[n_, k_] := rec[n, k] = If[k == 0, {0}, If[k == n, {2^n - 1}, conc[rec[n - 1, k], rec[n - 1, k - 1], 2^(n - 1)]]];
    L[n_] := If[n == 1, {0, 1}, Flatten[Table[rec[n, k], {k, 0, n}]]];
    Array[L, 6] // Flatten (* Jean-François Alcover, Jul 26 2018, after Peter Luschny *)
    Table[SortBy[Range[0, 2^n - 1], DigitSum[#, 2] &], {n, 6}] (* Paolo Xausa, Jul 28 2025 *)
  • PARI
    cmph(x, y) = my(d=hammingweight(x)-hammingweight(y)); if (d, d, x-y);
    row(n) = my(v=[0..2^n-1]); vecsort(v, cmph); \\ Michel Marcus, Sep 16 2023
  • Python
    from itertools import product
    def sortby(x): return (len(x), x.count('1'), x)
    def agen(maxbindigs):
        for i in range(1, maxbindigs+1):
            for t in sorted([p for p in product("01", repeat=i)], key=sortby):
                yield int("".join(t), 2)
    print([an for an in agen(6)]) # Michael S. Branicky, Aug 13 2021
    

Formula

For n=1, 2, 3, ..., L(n) is defined by the recurrence:
if n=1, L(1)= 0, 1;
else L(n)= l(n, 0), l(n, 1), ..., l(n, k), ..., l(n, n), where the subsequences are defined as follows:
l(n, k)= 0, if k=0, else
l(n, k)= 2^n - 1, if k=n, else
l(n, k)= l(n-1, k), l(n-1, k-1) + 2^{n-1}, for 0 < k < n.
Comments:
1) l(n, k)= l(n-1, k), l(n-1, k-1) + 2^{n-1} means that l(n, k) is a concatenation of two subsequences: l(n-1, k) and l(n-1, k-1) + 2^{n-1}. The second one is obtained after addition of the number 2^{n-1} to each member of l(n-1,k-1).
2) The computing of the members of L(n) resembles the computing (and filling in) the binomial coefficients in Pascal's triangle. The binomial coefficients determine the lengths of the subsequences l(n, k), 0 <= k <= n, in L(n). Thus the beginning of each subsequence can be computed easily.
3) The inductive formula, corresponding to the recurrence, is much more useful for implementations.

A331274 a(n) is the greatest binary anagram of n not yet in the sequence.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 8, 12, 10, 14, 9, 13, 11, 15, 16, 24, 20, 28, 18, 26, 25, 30, 17, 22, 21, 29, 19, 27, 23, 31, 32, 48, 40, 56, 36, 52, 50, 60, 34, 49, 44, 58, 42, 57, 54, 62, 33, 41, 38, 53, 37, 51, 46, 61, 35, 45, 43, 59, 39, 55, 47, 63, 64, 96, 80, 112
Offset: 1

Views

Author

Rémy Sigrist, Jan 13 2020

Keywords

Comments

Leading zeros are ignored.
This sequence is a self-inverse permutation of the natural numbers.

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   1     1       1          1
   2     2      10         10
   3     3      11         11
   4     4     100        100
   5     6     101        110
   6     5     110        101
   7     7     111        111
   8     8    1000       1000
   9    12    1001       1100
  10    10    1010       1010
  11    14    1011       1110
  12     9    1100       1001
  13    13    1101       1101
  14    11    1110       1011
  15    15    1111       1111
		

Crossrefs

Cf. A007318, A187769, A298847, A331275 (ternary analog).

Programs

  • PARI
    \\ See Links section.

Formula

a(A187769(n, k)) = A187769(n, A007318(n-1)+1-k) for any n > 0 and k = 1..A007318(n-1).

A261370 Permutation of nonnegative integers where a number having digits in nondescending order is followed by all numbers having the same digits arranged in increasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 13, 31, 14, 41, 15, 51, 16, 61, 17, 71, 18, 81, 19, 91, 20, 22, 23, 32, 24, 42, 25, 52, 26, 62, 27, 72, 28, 82, 29, 92, 30, 33, 34, 43, 35, 53, 36, 63, 37, 73, 38, 83, 39, 93, 40, 44, 45, 54, 46, 64, 47, 74, 48, 84
Offset: 0

Views

Author

David A. Corneth, Aug 17 2015

Keywords

Comments

If a number contains a zero, then some permutation will yield a number with a leading zero, which is already in the sequence without the leading zero. So that permutation is not included. For example, 102 contains a zero, so 012 and 021 are permutations of these numbers' digits. But they are actually 12 and 21, which are already in the sequence. This leaves 120, 201 and 210 to be added to the sequence after 102.
From Rémy Sigrist, May 01 2017 : (Start)
- This sequence is to base 10 what A187769 is to base 2,
- Beyond the initial 0, this sequence can be seen as an irregular table, where the n-th row corresponds to the permutation class of A179239(n).
(End)

Crossrefs

Programs

  • Mathematica
    a = {0}; f[n_] := Block[{w = Sort@ Permutations@ IntegerDigits@ n}, w = Delete[w, Position[First /@ w, 0]]]; Do[If[! MemberQ[a, n], AppendTo[a, FromDigits /@ f@ n]], {n, 105}]; DeleteDuplicates@ Flatten@ a (* Michael De Vlieger, Sep 07 2015 *)

A344085 Triangle of squarefree numbers first grouped by greatest prime factor, then sorted by omega, then in increasing order, read by rows.

Original entry on oeis.org

1, 2, 3, 6, 5, 10, 15, 30, 7, 14, 21, 35, 42, 70, 105, 210, 11, 22, 33, 55, 77, 66, 110, 154, 165, 231, 385, 330, 462, 770, 1155, 2310, 13, 26, 39, 65, 91, 143, 78, 130, 182, 195, 273, 286, 429, 455, 715, 1001, 390, 546, 858, 910, 1365, 1430, 2002, 2145, 3003, 5005, 2730, 4290, 6006, 10010, 15015, 30030
Offset: 1

Views

Author

Gus Wiseman, May 11 2021

Keywords

Comments

Differs from A339195 in having 77 before 66.

Examples

			Triangle begins:
   1
   2
   3   6
   5  10  15  30
   7  14  21  35  42  70 105 210
		

Crossrefs

Programs

  • Mathematica
    nn=4;
    GatherBy[SortBy[Select[Range[Times@@Prime/@Range[nn]],SquareFreeQ[#]&&PrimePi[FactorInteger[#][[-1,1]]]<=nn&],PrimeOmega],FactorInteger[#][[-1,1]]&]

A187786 Table read by rows, where n-th row contains all numbers having in binary representation as many zeros and ones as n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 5, 6, 7, 8, 9, 10, 12, 9, 10, 12, 11, 13, 14, 9, 10, 12, 11, 13, 14, 11, 13, 14, 15, 16, 17, 18, 20, 24, 17, 18, 20, 24, 19, 21, 22, 25, 26, 28, 17, 18, 20, 24, 19, 21, 22, 25, 26, 28, 19, 21, 22, 25, 26, 28, 23, 27, 29, 30, 17, 18, 20
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 06 2013

Keywords

Comments

For k = 0..A090706(n)-1: A023416(T(n,k))=A023416(n); A000120(T(n,k))=A000120(n); A053644(n)<=T(n,k)<=A003817(n);
T(n,k) = n for some k;
A187769 contains all rows without repetitions.

Examples

			.  n  n-th row              binary                          row length
. --  --------------------- ------------------------------- ----------
.  0  {0}                   {0}                                      1
.  1  {1}                   {1}                                      1
.  2  {2}                   {10}                                     1
.  3  {3}                   {11}                                     1
.  4  {4}                   {100}                                    1
.  5  {5,6}                 {101,110}                                2
.  6  {5,6}                 {101,110}                                2
.  7  {7}                   {111}                                    1
.  8  {8}                   {1000}                                   1
.  9  {9,10,12}             {1001,1010,1100}                         3
. 10  {9,10,12}             {1001,1010,1100}                         3
. 11  {11,13,14}            {1011,1101,1110}                         3
. 12  {9,10,12}             {1001,1010,1100}                         3
. 13  {11,13,14}            {1011,1101,1110}                         3
. 14  {11,13,14}            {1011,1101,1110}                         3
. 15  {15}                  {1111}                                   1
. 16  {16}                  {10000}                                  1
. 17  {17,18,20,24}         {10001,10010,10100,11000}                4
. 18  {17,18,20,24}         {10001,10010,10100,11000}                4
. 19  {19,21,22,25,26,28}   {10011,10101,10110,11001,11010,11100}    6
. 20  {17,18,20,24}         {10001,10010,10100,11000}                4 .
		

Programs

  • Haskell
    import List (find)
    import Maybe (fromJust)
    a187786 n k = a187786_tabf !! n !! k
    a187786_row n = fromJust $ find (elem n) a187769_tabf
    a187786_tabf = map a187786_row [0..]

A332144 Nonnegative numbers ordered by number of digits, and then by sum of digits, and then by value.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 12, 21, 30, 13, 22, 31, 40, 14, 23, 32, 41, 50, 15, 24, 33, 42, 51, 60, 16, 25, 34, 43, 52, 61, 70, 17, 26, 35, 44, 53, 62, 71, 80, 18, 27, 36, 45, 54, 63, 72, 81, 90, 19, 28, 37, 46, 55, 64, 73, 82, 91, 29, 38, 47, 56
Offset: 0

Views

Author

Rémy Sigrist, Nov 20 2020

Keywords

Comments

This sequence is a permutation of the nonnegative integers with inverse A332166.
This sequence can also be seen as an irregular triangle with first row consisting of a zero, and subsequent row lengths given by A289410.

Examples

			Triangle starts:
    0;
    1;
    2;
    3;
    4;
    5;
    6;
    7;
    8;
    9;
    10;
    11, 20;
    12, 21, 30;
    13, 22, 31, 40;
    14, 23, 32, 41, 50;
    15, 24, 33, 42, 51, 60;
    16, 25, 34, 43, 52, 61, 70;
    17, 26, 35, 44, 53, 62, 71, 80;
    18, 27, 36, 45, 54, 63, 72, 81, 90;
    19, 28, 37, 46, 55, 64, 73, 82, 91;
    29, 38, 47, 56, 65, 74, 83, 92;
    39, 48, 57, 66, 75, 84, 93;
    49, 58, 67, 76, 85, 94;
    59, 68, 77, 86, 95;
    69, 78, 87, 96;
    79, 88, 97;
    89, 98;
    99;
    ...
		

Crossrefs

Cf. A187769 (binary analog), A289410, A332166 (inverse).

Programs

  • PARI
    See Links section.

Formula

a(10^k - 1) = 10^k - 1 for any k >= 0.
a(10^k) = 10^k for any k >= 0.
a(10^k + 1) = 10^k + 1 for any k >= 0.
Showing 1-8 of 8 results.