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 51-60 of 67 results. Next

A380008 Numbers t whose binary expansion Sum 2^e_i has exponents e_i which are odious numbers (A000069).

Original entry on oeis.org

0, 2, 4, 6, 16, 18, 20, 22, 128, 130, 132, 134, 144, 146, 148, 150, 256, 258, 260, 262, 272, 274, 276, 278, 384, 386, 388, 390, 400, 402, 404, 406, 2048, 2050, 2052, 2054, 2064, 2066, 2068, 2070, 2176, 2178, 2180, 2182, 2192, 2194, 2196, 2198, 2304, 2306, 2308, 2310, 2320, 2322, 2324, 2326, 2432, 2434, 2436, 2438, 2448, 2450, 2452, 2454
Offset: 0

Views

Author

Luis Rato, Jan 08 2025

Keywords

Comments

These t in binary representation have 1s only in positions with 0s in the Thue-Morse sequence (A010059) with beginning of that sequence corresponding to least significant bit. a(n) can be derived from n by placing the bits of n into a(n) at those permitted positions.
a(n) can be represented in base 4 equal to binary representation of n with each digit multiplied by 1 or 2 according to the 1-2 Thue-Morse sequence A001285 starting in the least significant digit and transforming 1->2, and 2->1.
Any pair 2*p and 2*p+1 has one evil and the other odious number, so the bit at position p in n goes to either 2*p or 2*p+1 in a(n), according as which of those is odious.
Every integer k>=0 corresponds to a unique pair i,j with k = x(i) + y(j), with x(i)=a(i) and y(j)=A380009(j).
Sequences x(n) and y(n) have same growth rate and cross an infinite number of times.
Coordinate pairs (i,j), define a Morton space-filling curve, similar to Z-order curve.

Examples

			Considering the representation in base 4,
For n=11 = 1011_binary, a(11) -> 1021_base4 -> 2012_base4 = 134.
For n=12 = 1100_binary, a(12) -> 1200_base4 -> 2100_base4 = 144.
Considering all numbers are decomposed in binary, with exponents belonging to odious numbers: 1, 2, 4, 7,...
The sequence of terms together with their binary representation begins:
 n    a(n)      a(n)_bin
 0     0:         0 ~               0
 1     2:        10 ~             2^1
 2     4:       100 ~         2^2
 3     6:       110 ~         2^2+2^1
 4    16:     10000 ~     2^4
 5    18:     10010 ~     2^4   +2^1
 6    20:     10100 ~     2^4+2^2
 7    22:     10110 ~     2^4+2^2+2^1
 8   128:  10000000 ~ 2^7
 9   130:  10000010 ~ 2^7        +2^1
10   132:  10000100 ~ 2^7    +2^2
11   134:  10000110 ~ 2^7    +2^2+2^1
12   144:  10010000 ~ 2^7+2^4
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v = 0, e); while (n, n -= 2^e = exponent(n); v += 2^(2*e + if (hammingweight(e)%2, 0, 1));); return (v); } \\ Rémy Sigrist, Feb 02 2025
    
  • PARI
    isok(t) = my(b=Vecrev(binary(t))); for (i=1, #b, if (b[i] && !(hammingweight(i-1)%2), return(0))); return(1); \\ Michel Marcus, Feb 10 2025

A380009 Numbers t whose binary expansion Sum 2^e_i has exponents e_i which are evil numbers (A001969).

Original entry on oeis.org

0, 1, 8, 9, 32, 33, 40, 41, 64, 65, 72, 73, 96, 97, 104, 105, 512, 513, 520, 521, 544, 545, 552, 553, 576, 577, 584, 585, 608, 609, 616, 617, 1024, 1025, 1032, 1033, 1056, 1057, 1064, 1065, 1088, 1089, 1096, 1097, 1120, 1121, 1128, 1129, 1536, 1537, 1544, 1545, 1568, 1569, 1576, 1577, 1600, 1601, 1608, 1609, 1632, 1633, 1640, 1641
Offset: 0

Views

Author

Luis Rato, Jan 09 2025

Keywords

Comments

These t in binary representation have 1s only in positions with 0s in the Thue-Morse sequence (A010059) with beginning of that sequence corresponding to least significant bit. a(n) can be derived from n by placing the bits of n into a(n) at those permitted positions.
a(n) can be represented in base 4 equal to binary representation of n with each digit multiplied by 1 or 2 according to the 1-2 Thue-Morse sequence A001285 starting in the least significant digit.
Any pair 2*p and 2*p+1 has one evil and the other odious, so the bit at position p in n goes to either 2*p or 2*p+1 in a(n), according as which of those is evil.
Every integer k>=0 corresponds to a unique pair i,j with k = x(i) + y(j), with x(i)=a(i) and y(j)=A380008(j).
Sequences x(n) and y(n) have same growth rate and cross an infinite number of times.
Coordinate pairs (i,j), define a Morton space-filling curve, similar to Z-order curve.

Examples

			For n=11 = 1011_binary, a(11) = 1021_base4 = 41.
All numbers are also decomposed in binary, with exponents belonging to evil numbers: 0, 3, 5, 6, ...
The sequence of terms begins:
 n    a(n)      a(n)_bin
 0     0:         0 ~               0
 1     1:         1 ~             2^0
 2     8:      1000 ~         2^3
 3     9:      1001 ~         2^3+2^0
 4    32:    100000 ~     2^5
 5    33:    100001 ~     2^5    +2^0
 6    40:    101000 ~     2^5+2^3
 7    41:    101001 ~     2^5+2^3+2^0
 8    64:   1000000 ~ 2^6
 9    65:   1000001 ~ 2^6        +2^0
10    72:   1001000 ~ 2^6    +2^3
11    73:   1001001 ~ 2^6    +2^3+2^0
		

Crossrefs

Programs

  • PARI
    isok(k) = my(b=binary(k), v=apply(x->#b-x, Vec(select(x->x, b, 1)))); #v == #select(x->(hammingweight(x)%2==0), v); \\ Michel Marcus, Jan 11 2025

A005680 A squarefree ternary sequence.

Original entry on oeis.org

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

Views

Author

Keywords

References

  • G. Siebert, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A036582 (apparently essentially the same sequence).

A127243 Triangle whose k-th column is generated by (1+A010060(1+k)x)*x^k.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Paul Barry, Jan 10 2007

Keywords

Examples

			Triangle begins:
  1;
  1, 1;
  0, 1, 1;
  0, 0, 0, 1;
  0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 1;
  0, 0, 0, 0, 0, 0, 1;
  0, 0, 0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 0, 0, 1, 1;
  0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Inverse is A127244.
Row sums are 1+A010060(n) = A001285(n).

Programs

  • Mathematica
    T[n_, k_] := SeriesCoefficient[(1 + ThueMorse[1 + k]*x)*x^k, {x, 0, n}]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Amiram Eldar, Aug 04 2023 *)

Extensions

More terms from Amiram Eldar, Aug 04 2023

A143331 Lengths of successive runs of 0's in the Thue-Morse sequence A010060.

Original entry on oeis.org

1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2
Offset: 1

Views

Author

Ray Chandler, Aug 08 2008

Keywords

Comments

Also lengths of successive runs of 1's in the Thue-Morse sequence A010059.
Also lengths of successive runs of 1's in the Thue-Morse sequence A001285.

Examples

			A010060 begins 011010011001011010010110011010011... so the runs of 0's have lengths 1 1 2 2 1 1 2 1 2 1 2 2 1 2 1 2 1 1 ...
		

Crossrefs

Programs

  • Mathematica
    Map[Length,Most[Split[ThueMorse[Range[0,500]]]][[;;;;2]]] (* Paolo Xausa, Dec 19 2023 *)
  • Python
    def A143331(n):
        if n==1: return 1
        def iterfun(f,n=0):
            m, k = n, f(n)
            while m != k: m, k = k, f(k)
            return m
        def f(x):
            c, s = x, bin(x)[2:]
            l = len(s)
            for i in range(l&1^1,l,2):
                c -= int(s[i])+int('0'+s[:i],2)
            return c
        return iterfun(lambda x:f(x)+(n<<1)-1,(n<<1)-1)-iterfun(lambda x:f(x)+(n-1<<1),(n-1<<1)) # Chai Wah Wu, Jan 30 2025

Formula

a(n) = A026465(2n-1).

A161175 Triangle read by rows, modified Thue-Morse sequence (A010060 with offset 1): change 0 to 2, else 1.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2
Offset: 1

Views

Author

Gary W. Adamson, Jun 05 2009

Keywords

Comments

Row sums = A003945: (1, 3, 6, 12, 24,...).
Rows tend to A001285: (1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2,...).

Examples

			First few rows of the triangle =
  1;
  1, 2;
  1, 2, 2, 1;
  1, 2, 2, 1, 2, 1, 1, 2;
  1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1;
  ...
Given A010060 starting with 1 (below, top row); 0->2, else 1:
  A010060: (1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1,...)
  A161175: (1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1,...)
Triangle read by rows, row 4 = (1, 2, 2, 1, 2, 1, 1, 2) = (2, 1, 1, 2) appended to the right of (1, 2, 2, 1).
		

Crossrefs

Programs

  • Mathematica
    ReplaceAll[ThueMorse[Range[127]],0->2] (* Paolo Xausa, Dec 18 2023 *)

Formula

Given A010060 starting with offset 1, change zeros to 2, retain 1's.
By rows, (n+1)-th row = n-th row with n-th row appended under morphism 1->2, 2->1.

A171900 Backwards van Eck transform of A010060.

Original entry on oeis.org

0, 0, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 1, 3, 1, 3, 2, 2, 1, 3, 1
Offset: 1

Views

Author

N. J. A. Sloane, Oct 22 2010

Keywords

Comments

See A171898 for definition. This assumes the offset of A010060 is taken to be 1.
A161916 gives the forwards van Eck transform of A010060.
Since A001285(n) = 1+A010060(n) differ only by a constant, this is also the Backwards van Eck Transform of A001285. - R. J. Mathar, Jun 24 2021

Crossrefs

Cf. A010060, A161916, A171898. See also A026491.

Formula

A026491(n-1)-A026491(n-2) = a(n) for n>=3. - Michel Dekking, Apr 11 2019

A285951 Positions of 1's in A285949; complement of A285950.

Original entry on oeis.org

2, 6, 9, 11, 15, 17, 20, 24, 27, 29, 32, 36, 38, 42, 45, 47, 51, 53, 56, 60, 62, 66, 69, 71, 74, 78, 81, 83, 87, 89, 92, 96, 99, 101, 104, 108, 110, 114, 117, 119, 122, 126, 129, 131, 135, 137, 140, 144, 146, 150, 153, 155, 159, 161, 164, 168, 171, 173, 176
Offset: 1

Views

Author

Clark Kimberling, May 02 2017

Keywords

Comments

Conjecture: 3n - a(n) is in {0, 1} for all n >= 1.
From Michel Dekking, Sep 03 2019: (Start)
Proof of the conjecture by Kimberling: more is true. Here follows a proof of the formula below. Let T be the transform T(01)=0, T(1)=0.
Consider the return word structure of A285949 for the word 1:
A285949 = 0|1000|100|10|1000|10|100| ....
[See Justin & Vuillon (2000) for definition of return word. - N. J. A. Sloane, Sep 23 2019]
The three return words are u:=10, v:=100 and w:=1000. These words uniquely correspond to the conjugated three words u'=01, v'=010, w'=0100 in A285949, which are the unique images u'=T(0), v'=T(01) and w'=T(011) of the words 0, 01 and 011 in the Thue-Morse word A010060. The images of these three words under the Thue-Morse morphism 0->01, 1->10 are 01, 0110 and 011010, and we have
T(01)=010, T(0110)=010001, T(011010)=010001001.
Shifting by 1 in A285949, these correspond uniquely to the conjugated words 100, 100010, and 100010010. It follows that the Thue-Morse morphism induces the morphism u->v, v->wu, w->wvu on the return words.
This morphism is modulo a change of alphabet equal to the ternary Thue-Morse morphism with fixed point A007413.
Note that on the alphabet {4,3,2} of the respective lengths of w, v, and u we obtain the sequence (a(n+1)-a(n)) = 4,3,2,4,2,3,4,3,2,... of first differences of the positions of the 1's in A285949.
To prove the formula a(n) = A010060(n)+ 3n-1, it suffices to show that a(n+1)-a(n) = A010060(n+1)-A010060(n)+3.
That this indeed is true: see the Comments of A029883, the first differences of the standard form of the Thue-Morse sequence A001285.
(End)

Examples

			As a word, A285949 = 0100010010100010100100010..., in which 1 is in positions  2,6,9,11,...
		

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 7]  (* Thue-Morse, A010060 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"0" -> "01", "1" -> "0"}]  (* A284949, word *)
    st = ToCharacterCode[w1] - 48 (* A284949, sequence *)
    Flatten[Position[st, 0]] (* A285950 *)
    Flatten[Position[st, 1]] (* A285951 *)
  • Python
    def A285951(n): return ((n-1).bit_count()&1)+3*n-1 # Chai Wah Wu, May 21 2025

Formula

a(n) = A010060(n) + 3n-1. - Michel Dekking, Sep 03 2019

A003270 A nonrepetitive sequence.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Probably the same as A099054. - R. J. Mathar, Jun 06 2014

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. M. Yaglom and I. M. Yaglom, Challenging Mathematical Problems with Elementary Solutions. Vols. 1-2, Holden-Day, San Francisco, 1964-1967, vol. 2, p. 204.

Crossrefs

Cf. A099054.

A194923 The (finite) list of ternary abelian squarefree words.

Original entry on oeis.org

0, 1, 2, 0, 1, 0, 2, 1, 0, 1, 2, 2, 0, 2, 1, 0, 1, 0, 0, 1, 2, 0, 2, 0, 0, 2, 1, 1, 0, 1, 1, 0, 2, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 0, 2, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 2, 0, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2, 1, 0, 0, 2, 1, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2, 1, 1, 2, 0, 1, 1, 2, 0, 2, 1, 2, 1, 0, 2, 0, 1, 0, 2, 0
Offset: 1

Views

Author

M. F. Hasler, Sep 04 2011, based on deleted sequence A138036 from Roger L. Bagula, May 02 2008

Keywords

Comments

Lexicographically ordered list of words of increasing length L=1,2,3,... over the alphabet {0,1,2}, excluding those which contain two adjacent subsequences with the same multiset of symbols regardless of internal order. E.g., 0,0 or 1,1 or 2,2 or 0,1,0,1 or 0,1,2,1,0,2, etc.
Peter Lawrence, Sep 06 2011: In other words, this is the sequence of all possible lists over the letters "0", "1", "2", such that within a list no two adjacent segments of any length contain the same multiset of symbols, first sorted by length of list, second lists of same length are sorted lexicographically. Recursively, to each list of length N create up to two lists of length N+1 by appending the two letters that are different from the last letter of the first list, and then check for and eliminate longer abelian squares; keeping all the lists sorted as in the previous description.
The number of sequences of the successive lengths are 3, 6, 12, 18, 30, 30, 18, for total row lengths of 3, 12, 36, 72,150, 180, 126.

Examples

			Starting with words of length 1, the allowed ones are:
{{0}, {1}, {2}};
{{0, 1}, {0, 2}, {1, 0}, {1, 2}, {2, 0}, {2, 1}};
{{0, 1, 0}, {0, 1, 2}, {0, 2, 0}, {0, 2, 1}, {1, 0, 1}, {1, 0, 2}, {1, 2, 0}, {1, 2, 1}, {2, 0, 1}, {2, 0, 2}, {2, 1, 0}, {2, 1, 2}};
{{0, 1,0, 2}, {0, 1, 2, 0}, {0, 1, 2, 1}, {0, 2, 0, 1}, {0, 2, 1, 0}, {0, 2, 1, 2}, {1, 0, 1, 2}, {1, 0, 2, 0}, {1, 0, 2, 1}, {1, 2, 0, 1}, {1, 2, 0, 2}, {1, 2, 1, 0}, {2, 0, 1, 0}, {2, 0, 1, 2}, {2, 0, 2, 1}, {2, 1, 0, 1}, {2, 1, 0, 2}, {2, 1, 2, 0}},
{{0, 1, 0, 2, 0}, {0, 1, 0, 2, 1}, {0, 1, 2, 0, 1}, {0, 1, 2, 0, 2}, {0, 1, 2, 1, 0}, {0, 2, 0,1, 0}, {0, 2, 0, 1, 2}, {0, 2, 1, 0, 1}, {0, 2, 1, 0,2}, {0, 2, 1, 2, 0}, {1, 0,1, 2, 0}, {1, 0, 1, 2, 1}, {1, 0, 2, 0, 1}, {1, 0, 2, 1, 0}, {1, 0, 2, 1, 2}, {1, 2, 0, 1, 0}, {1, 2, 0, 1, 2}, {1, 2, 0, 2, 1}, {1, 2, 1, 0, 1}, {1, 2, 1, 0, 2}, {2, 0,1, 0, 2}, {2, 0, 1, 2, 0}, {2, 0, 1, 2, 1}, {2, 0, 2,1, 0}, {2, 0, 2, 1, 2}, {2,1, 0, 1, 2}, {2, 1, 0, 2, 0}, {2, 1, 0, 2, 1}, {2, 1, 2, 0, 1}, {2, 1, 2, 0, 2}},
{{0, 1, 0, 2, 0, 1}, {0, 1, 0, 2, 1, 0}, {0, 1,0, 2, 1, 2}, {0, 1, 2, 0, 1, 0}, {0, 1, 2, 1, 0, 1}, {0, 2, 0, 1, 0, 2}, {0, 2, 0, 1, 2, 0}, {0, 2, 0, 1, 2, 1}, {0, 2, 1, 0, 2, 0}, {0, 2, 1, 2, 0, 2}, {1, 0, 1, 2, 0, 1}, {1, 0, 1, 2, 0, 2}, {1, 0, 1, 2, 1, 0}, {1, 0, 2, 0, 1, 0}, {1, 0, 2, 1, 0, 1}, {1, 2, 0, 1, 2, 1}, {1, 2, 0, 2, 1, 2}, {1, 2, 1, 0, 1, 2}, {1, 2, 1, 0, 2, 0}, {1, 2, 1, 0, 2, 1}, {2, 0, 1, 0, 2, 0}, {2, 0, 1, 2, 0, 2}, {2, 0, 2, 1, 0, 1}, {2, 0, 2, 1, 0, 2}, {2, 0, 2, 1, 2, 0}, {2, 1, 0, 1, 2, 1}, {2, 1, 0, 2, 1, 2}, {2, 1, 2, 0, 1, 0}, {2, 1, 2, 0, 1, 2}, {2, 1, 2, 0, 2, 1}},
{{0, 1, 0, 2, 0, 1, 0}, {0,1, 0, 2, 1, 0, 1}, {0, 1, 2, 1, 0, 1, 2}, {0, 2, 0, 1, 0, 2, 0}, {0, 2, 0, 1, 2, 0, 2}, {0, 2, 1, 2, 0, 2, 1}, {1, 0, 1, 2, 0, 1, 0}, {1, 0, 1, 2, 1, 0, 1}, {1, 0, 2, 0, 1, 0, 2}, {1, 2, 0, 2, 1, 2, 0}, {1, 2, 1, 0, 1, 2, 1}, {1, 2, 1, 0, 2, 1, 2}, {2, 0, 1, 0, 2, 0, 1}, {2, 0, 2,1, 0, 2, 0}, {2, 0, 2, 1, 2, 0, 2}, {2,1, 0, 1, 2, 1, 0}, {2, 1, 2, 0, 1, 2, 1}, {2, 1, 2, 0, 2, 1, 2}}
		

Crossrefs

Programs

  • Mathematica
    f[n_, k_] := NestList[ DeleteCases[ Flatten[ Map[ Table[ Append[#, i - 1], {i, k}] &, #], 1], {_, u__, v__} /; Sort[{u}] == Sort[{v}]] &, {{}}, n]; f[7, 3] // Flatten (* initially from Roger L. Bagula and modified by Robert G. Wilson v, Sep 06 2011 *)

Extensions

Edited by Franklin T. Adams-Watters, Sep 05 2011
Previous Showing 51-60 of 67 results. Next