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-10 of 20 results. Next

A014601 Numbers congruent to 0 or 3 mod 4.

Original entry on oeis.org

0, 3, 4, 7, 8, 11, 12, 15, 16, 19, 20, 23, 24, 27, 28, 31, 32, 35, 36, 39, 40, 43, 44, 47, 48, 51, 52, 55, 56, 59, 60, 63, 64, 67, 68, 71, 72, 75, 76, 79, 80, 83, 84, 87, 88, 91, 92, 95, 96, 99, 100, 103, 104, 107, 108, 111, 112, 115, 116, 119, 120, 123, 124
Offset: 0

Views

Author

Eric Rains (rains(AT)caltech.edu)

Keywords

Comments

Discriminants of orders in imaginary quadratic fields (negated). [Comment corrected by Christopher E. Thompson, Dec 11 2016]
Numbers such that Langford-Skolem problem has a solution - see A014552.
Complement of A042963. - Reinhard Zumkeller, Oct 04 2004
Also called skew amenable numbers; a number k is skew amenable if there exist a set {a(i)} of integers satisfying the relations k = Sum_{i=1..k} a(i) = -Product_{i=1..k} a(i). Thus we have 8 = 1 + 1 + 1 + 1 + 1 + 1 - 2 + 4 = -(1*1*1*1*1*1*(-2)*4). - Lekraj Beedassy, Jan 07 2005
Possible nonpositive discriminants of quadratic equation a*x^2 + b*x + c or discriminants of binary quadratic forms a*x^2 + b*x*y + c*y^2. - Artur Jasinski, Apr 28 2008
Also, disregarding the 0 term, positive integers m such that, equivalently,
(i) +-1 +-2 +-... +-m is even for all choices of signs,
(ii) +-1 +-2 +-... +-m = 0 for some choices of signs,
(iii) for all -m <= k <= m, k = +-1 +-2 +-... +-(k-1) +-(k+1) +-(k+2) +-... +-m for at least one choice of signs. - Rick L. Shepherd, Oct 29 2008
A145768(a(n)) is even. - Reinhard Zumkeller, Jun 05 2012
Multiples of 4 interleaved with 1 less than multiples of 4. - Wesley Ivan Hurt, Nov 08 2013
((2*k+0) + (2*k+1) + ... + (2*k+m-1) + (2*k+m)) is even if and only if m = a(n) for some n where k is any nonnegative integer. - Gionata Neri, Jul 24 2015
Numbers whose binary reflected Gray code (A014550) ends with 0. - Amiram Eldar, May 17 2021

Examples

			G.f. = 3*x + 4*x^2 + 7*x^3 + 8*x^4 + 11*x^5 + 12*x^6 + 15*x^7 + 16*x^8 + ...
		

References

  • H. Cohen, Course in Computational Alg. No. Theory, Springer, 1993, pp. 514-5.
  • A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, 5. Aufl., de Gruyter, Berlin, New York, 1973, p. 108.

Crossrefs

Cf. A274406. - Bruno Berselli, Jun 26 2016

Programs

  • Haskell
    a014601 n = a014601_list !! n
    a014601_list = [x | x <- [0..], mod x 4 `elem` [0, 3]]
    -- Reinhard Zumkeller, Jun 05 2012
  • Magma
    [n: n in [0..200]|n mod 4 in {0,3}]; // Vincenzo Librandi, Dec 24 2010
    
  • Maple
    A014601:=n->3*n-2*floor(n/2); seq(A014601(k), k=0..100); # Wesley Ivan Hurt, Nov 08 2013
  • Mathematica
    aa = {}; Do[Do[Do[d = b^2 - 4 a c; If[d <= 0, AppendTo[aa, -d]], {a, 0, 50}], {b, 0, 50}], {c, 0, 50}]; Union[aa] (* Artur Jasinski, Apr 28 2008 *)
    Select[Range[0, 124], Or[Mod[#, 4] == 0, Mod[#, 4] == 3] &] (* Ant King, Nov 18 2010 *)
    CoefficientList[Series[2 x/(1 - x)^2 + (1/(1 - x) + 1/(1 + x)) x/2, {x, 0, 100}], x] (* Vincenzo Librandi, May 18 2014 *)
    a[ n_] := 2 n + Mod[n, 2]; (* Michael Somos, Jul 24 2015 *)
  • PARI
    {a(n) = 2*n + n%2}; /* Michael Somos, Dec 27 2010 */
    

Formula

a(n) = (n + 1)*2 + 1 - n mod 2. - Reinhard Zumkeller, Apr 21 2003
A014494(n) = A000217(a(n)). - Reinhard Zumkeller, Oct 04 2004
a(n) = Sum_{k=1..n} (2 - (-1)^k). - William A. Tedeschi, Mar 20 2008
A139131(a(n)) = A078636(a(n)). - Reinhard Zumkeller, Apr 10 2008
From R. J. Mathar, Sep 25 2009: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 2.
G.f.: x*(3+x)/((1+x)*(x-1)^2). (End)
a(n) = 2*n + (n mod 2). - Paolo Valzasina (p.valzasina(AT)gmail.com), Nov 24 2009
a(n) = (4*n - (-1)^n + 1)/2. - Bruno Berselli, Oct 06 2010
a(n) = 4*n - a(n-1) - 1 (with a(0) = 0). - Vincenzo Librandi, Dec 24 2010
a(n) = -A042948(-n) for all n in Z. - Michael Somos, Dec 27 2010
G.f.: 2*x / (1 - x)^2 + (1 / (1 - x) + 1 / (1 + x)) * x/2. - Michael Somos, Dec 27 2010
a(n) = Sum_{k>=0} A030308(n,k)*b(k) with b(0) = 3 and b(k) = 2^(k+1) for k > 0. - Philippe Deléham, Oct 17 2011
a(n) = ceiling((4/3)*ceiling(3*n/2)). - Clark Kimberling, Jul 04 2012
a(n) = 3n - 2*floor(n/2). - Wesley Ivan Hurt, Nov 08 2013
a(n) = A042948(n+1) - 1 for all n in Z. - Michael Somos, Jul 24 2015
a(n) + a(n+1) = A004767(n) for all n in Z. - Michael Somos, Jul 24 2015
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*log(2)/4 - Pi/8. - Amiram Eldar, Dec 05 2021
E.g.f.: ((4*x + 1)*exp(x) - exp(-x))/2. - David Lovler, Aug 04 2022

A026272 a(n) = smallest k such that k=a(n-k-1) is the only appearance of k so far; if there is no such k, then a(n) = least positive integer that has not yet appeared.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Daniel Joyce, Apr 13 2001: (Start)
This sequence displays every positive integer exactly twice and the gap between the two occurrences of n contains exactly n other values. The first occurrence of n precedes the first occurrence of n+1.
Also related to the Wythoff array (A035513) and the Para-Fibonacci sequence (A035513) where every positive integer is displayed exactly once in the whole array. Take any integer n in A026272 and let C = number of terms from the beginning of the sequence to the second occurrence of n. Then C = (2nd term after n in the applicable sequence for n in A035513).
Also in the second occurrence of n in A026272, let N=n ( - one term) = (first term value after n in the applicable sequence for n in A035513). In this format the second occurrence of n in A026272 will produce in A035513, n itself and two of the succeeding terms of n in the Wythoff array where every positive integer can only be displayed once.
In A026272 if |a(n)-a(n+1)| > 10 then phi ~ a(n)/|a(n)-a(n+1)|. When n -> infinity it will converge to phi. (End)
Or, put a copy of n in A000027 n places further along! - Zak Seidov, May 24 2008
Another version would prefix this sequence with two leading 0's (see the Angelini reference). If we use this form and write down the indices of the two 0's, the two 1's, the two 2's, the two 3's, etc., then we get A072061. - Jacques ALARDET, Jul 26 2008

References

  • Eric Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.

Crossrefs

Programs

  • Mathematica
    s=Range[1000];n=0;Do[n++;s=Insert[s,n,Position[s,n][[1]]+n+1],{500}];A026272=Take[s,1000] (* Zak Seidov, May 24 2008 *)
  • PARI
    A026272=apply(t->t-1,A026242[3..-1]) \\ Use vecextract(A026242,"3..") in PARI versions < 2.7. - M. F. Hasler, Sep 17 2014
    
  • Python
    from collections import Counter
    from itertools import count, islice
    def agen(): # generator of terms
        aset, alst, k, mink, counts = set(), [0], 0, 1, Counter()
        for n in count(1):
            for k in range(1, len(alst)-1):
                if k == alst[n-k-1] and counts[alst[n-k-1]] == 1: an = k; break
            else: an = mink
            yield an; aset.add(an); alst.append(an); counts.update([an])
            while mink in aset: mink += 1
    print(list(islice(agen(), 66))) # Michael S. Branicky, Jun 27 2022

Formula

a(n) = A026242(n+2) - 1 = A026350(n+3) - 2 = A026354(n+4) - 3.

Extensions

Edited by Max Alekseyev, May 31 2011

A002047 Number of 3 X (2n+1) zero-sum arrays with entries -n,...,0,...,n.

Original entry on oeis.org

1, 2, 6, 28, 244, 2544, 35600, 659632, 15106128, 425802176, 14409526080, 577386122880
Offset: 0

Views

Author

Keywords

Comments

This can be interpreted as the number of ways to choose 2n+1 cells in a hexagonal grid of side n+1 such that no two are in the same row or left diagonal or right diagonal. - Alex Fink (a00(AT)shaw.ca), Mar 16 2005
Also the number of transversals of a partial Latin square L of order 2n+1 in which L_{ij} = i+j if n+1 < i+j < 3n+3 and L_{ij} is empty otherwise. [Cavenagh-Wanless]
Also the number of arrangements of the numbers n+1, n+1, ..., 3n+1, 3n+1 such that there are n numbers between the pair of n+1's, ..., 3n numbers between the pair of 3n+1's. For each of these arrangements and its mirror image, there is a bijection with a pair of the 3 X (2n+1) zero-sum arrays. - Stephen J Scattergood, Jul 19 2013
Also the number of sigma-permutations of length 2n+1 [Kotzig-Laufer]. - N. J. A. Sloane, Jul 27 2015
An (m,2n+1)-zero-sum array is an m X (2n+1) matrix whose m rows are permutations of the 2n+1 integers -n..n, the sum of each column is zero and the first row of the matrix is -n,-n+1,...,0,...,n-1,n. - Gheorghe Coserea, Dec 29 2016
a(n-1) is also number of ways of placing 2*n-1 nonattacking rooks on a hexagonal board with edge-length n in Glinski's hexagonal chess. - Vaclav Kotesovec, Aug 15 2019

Examples

			a(2) = 6 corresponds to
..O.X.X.......X.X.O.......O.X.X.......X.O.X.......X.O.X.......X.X.O
.X.X.O.X.....X.O.X.X.....X.X.X.O.....X.X.X.O.....O.X.X.X.....O.X.X.X
X.X.X.X.O...O.X.X.X.X...X.O.X.X.X...O.X.X.X.X...X.X.X.X.O...X.X.X.O.X
.O.X.X.X.....X.X.X.O.....X.X.X.O.....X.O.X.X.....X.X.O.X.....O.X.X.X
..X.O.X.......X.O.X.......O.X.X.......X.X.O.......O.X.X.......X.X.O
The bijection with a pair of the 3 X (2n+1) zero-sum arrays:
n=1, a(1)=2 corresponds to
                           3 4 2 3 2 4
        and mirror image   4 2 3 2 4 3
element                  2  3  4  -(2n+1) --> -1  0  1
position, left element   3  1  2  -( n+1) -->  1 -1  0
position  in mirror      2  3  1  -( n+1) -->  0  1 -1
                          -------               -------
sum of column            7  7  7  -(4n+3)      0  0  0
Swapping rows 2,3 yields the other 3 X 3 zero sum array.
n=2, a(2)=6  an example and its mirror, so 2 of the 6 solutions:
                           5 6 7 3 4 5 3 6 4 7
            mirror image   7 4 6 3 5 4 3 7 6 5
            3  4  5  6  7  -(2n+1) --> -2 -1  0  1  2
            4  5  1  2  3  -( n+1) -->  1  2 -2 -1  0
            4  2  5  3  1  -( n+1) -->  1 -1  2  0 -2
            --------------              --------------
           11 11 11 11 11  -(4n+3) -->  0  0  0  0  0
Swapping rows 2,3 yields the other 3 X 5 zero sum array.
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A014552. A diagonal of the triangle in A260333.

Extensions

More terms from Alex Fink (a00(AT)shaw.ca), Mar 16 2005
a(10) and a(11) from Ian Wanless, Jul 30 2010, from the Cavenagh-Wanless paper

A004075 Number of Skolem sequences of order n.

Original entry on oeis.org

1, 0, 0, 6, 10, 0, 0, 504, 2656, 0, 0, 455936, 3040560, 0, 0, 1400156768, 12248982496, 0, 0, 11435578798976, 123564928167168, 0, 0, 204776117691241344, 2634563519776965376, 0, 0, 7064747252076429464064, 105435171495207196553472, 0, 0
Offset: 1

Views

Author

Keywords

Comments

Number of permutations of the multiset {1,1,2,2,...,n,n} such that the distance between the elements i equals i for every i=1,2,...,n.
Number of super perfect rhythmic tilings of [0,2n-1] with pairs. See A285698 and A285527 for the definition and tilings of triples and quadruples. - Tony Reix, Apr 25 2017

References

  • CRC Handbook of Combinatorial Designs, 1996, p. 460.

Crossrefs

Programs

  • Mathematica
    (* Program not suitable to compute a large number of terms. *)
    iter[n_] := Sequence @@ Table[{x[i], {-1, 1}}, {i, 1, 2n}];
    a[n_] := 1/2^(2n) Sum[Product[x[i], {i, 1, 2n}] Product[Sum[x[k] x[k+i], {k, 1, 2n-i}], {i, 1, n}], iter[n] // Evaluate];
    Table[Print[a[n]]; a[n], {n, 1, 10}] (* Jean-François Alcover, Sep 29 2018, from formula in Assarpour et al. *)

Formula

For n > 1, a(n) = A059106(n)*2 because A059106 ignores reflected solutions. - Martin Fuller, Mar 08 2007

Extensions

More terms (via A059106) from Martin Fuller, Mar 08 2007
Extended using results from the Assarpour et al. (2015) paper by N. J. A. Sloane, Feb 22 2016 at the suggestion of William Rex Marshall
a(28)-a(31) from Assarpour et al. (2015), added by Max Alekseyev, Sep 24 2023

A059106 Number of solutions to Nickerson variant of Langford (or Langford-Skolem) problem.

Original entry on oeis.org

1, 0, 0, 3, 5, 0, 0, 252, 1328, 0, 0, 227968, 1520280, 0, 0, 700078384, 6124491248, 0, 0, 5717789399488, 61782464083584, 0, 0, 102388058845620672, 1317281759888482688, 0, 0, 3532373626038214732032, 52717585747603598276736, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Feb 14 2001

Keywords

Comments

How many ways are of arranging the numbers 1,1,2,2,3,3,...,n,n so that there are zero numbers between the two 1's, one number between the two 2's, ..., n-1 numbers between the two n's?
For n > 1, a(n) = A004075(n)/2 because A004075 also counts reflected solutions. - Martin Fuller, Mar 08 2007
Because of symmetry, is a(5) = 5 the largest prime in this sequence? - Jonathan Vos Post, Apr 02 2011

Examples

			For n=4 the a(4)=3 solutions, up to reversal of the order, are:
1 1 3 4 2 3 2 4
1 1 4 2 3 2 4 3
2 3 2 4 3 1 1 4
From _Gheorghe Coserea_, Aug 26 2017: (Start)
For n=5 the a(5)=5 solutions, up to reversal of the order, are:
1 1 3 4 5 3 2 4 2 5
1 1 5 2 4 2 3 5 4 3
2 3 2 5 3 4 1 1 5 4
2 4 2 3 5 4 3 1 1 5
3 5 2 3 2 4 5 1 1 4
(End)
		

Crossrefs

Extensions

a(20)-a(23) from Mike Godfrey (m.godfrey(AT)umist.ac.uk), Mar 14 2002
Extended using results from the Assarpour et al. (2015) paper by N. J. A. Sloane, Feb 22 2016 at the suggestion of William Rex Marshall
a(28)-a(31) from Assarpour et al. (2015), added by Max Alekseyev, Sep 24 2023

A176127 The number of permutations of {1,2,...,n,1,2,...,n} with the property that there are k numbers between the two k's in the set for k=1,...,n.

Original entry on oeis.org

0, 0, 2, 2, 0, 0, 52, 300, 0, 0, 35584, 216288, 0, 0, 79619280, 653443600, 0, 0, 513629782560, 5272675722400, 0, 0, 7598911885030976, 93690316113031872, 0, 0, 223367222197529806464, 3214766521218764786304, 0, 0
Offset: 1

Views

Author

Andrew McFarland, Apr 09 2010

Keywords

Examples

			a(1)=0; a(2)=0; a(3)=a(4)=2 since {{2,3,1,2,1,3},{3,1,2,1,3,2}} and {{4,1,3,1,2,4,3,2},{2,3,4,2,1,3,1,4}} are the only ways to permute {1,2,3,1,2,3} and {1,2,3,4,1,2,3,4}, respectively, such that there is one number between the 1's, two numbers between the 2's,..., n numbers between the n's.
		

References

Crossrefs

Programs

  • Sage
    a=lambda n:sum(1 for i in DLXCPP([(i-1,j+n,i+j+n+1)for i in[1..n]for j in[0..n+n-i-2]]+[(i,)for i in[n..n+n-1]]))if n%4 in[0,3] else 0
    # Tomas Boothby, Jun 14 2013

Formula

a(n) = 2 * A014552(n).

Extensions

Edited and more terms added from A014552 by Max Alekseyev, May 31 2011, May 19 2015
Corrected and extended using results from the Assarpour et al. (2015) paper by N. J. A. Sloane, Feb 22 2016 at the suggestion of William Rex Marshall.

A337226 Lexicographically earliest sequence of positive integers with the property that, for all k > 0, there is at most one j such that a(j) = a(j+k).

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 2, 5, 1, 6, 3, 7, 8, 9, 4, 10, 2, 11, 5, 12, 1, 13, 6, 14, 15, 3, 16, 7, 17, 18, 8, 19, 20, 21, 22, 9, 23, 4, 24, 10, 25, 2, 26, 11, 27, 5, 28, 12, 29, 1, 30, 13, 31, 6, 32, 33, 14, 34, 15, 35, 36, 3, 37, 16, 38, 39, 40, 7, 41, 42, 17, 43, 18, 44, 45, 8
Offset: 1

Views

Author

Samuel B. Reid, Aug 19 2020

Keywords

Comments

The sequence initially appears to be trivially fractal in that the removal of the first occurrence of each value seems to yield the original sequence. This pattern continues until a(121) where, if the sequence were fractal in this way, the value would be 72 or 1. The actual value is 13, so the pattern is broken.
Conjecture: For all k > 0, there is exactly one j such that a(j) = a(j+k). For 0 < k < 11911, this conjecture holds.

Examples

			  1 1 2 1 3 4 2
   (1)1 2 1 3 4   k = 1
      1(1)2 1 3   k = 2
       (1)1 2 1   k = 3
          1 1(2)  k = 4
            1 1   k = 5
              1   k = 6
Coincidences are circled. There can only be one coincidence per row.
a(3) cannot be 1 because that would result in two coincidences for k = 1.
a(5) cannot be 1 or 2 because those values would result in two coincidences for k = 1 and k = 2, respectively.
a(7) cannot be 1, 3, or 4 because those values would result in two coincidences for k = 3, k = 2, and k = 1, respectively. It can, however, be 2 because this results in no double coincidences.
		

Crossrefs

Programs

  • Python
    # See Links section.

A059108 Number of solutions to variant of triples version of Langford (or Langford-Skolem) problem.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 0, 0, 9, 20, 33, 0, 0, 0, 0, 0, 0, 200343, 869006, 4247790, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

N. J. A. Sloane, Feb 14 2001

Keywords

Comments

How many ways are of arranging the numbers 1,1,1,2,2,2,3,3,3,...,n,n,n so that there are zero numbers between the first and second 1's and zero numbers between the second and third 1's; one number between the first and second 2's and one number between the second and third 2's; ... n-1 numbers between the first and second n's and n-1 numbers between the second and third n's?
a(n)=0 for n mod 9 not in {0,1,2}. - Gheorghe Coserea, Aug 23 2017

Examples

			From _Gheorghe Coserea_, Jul 14 2017: (Start)
For n=9 the a(9)=9 solutions, up to reversal of the order, are:
2 4 2 8 2 4 6 7 9 4 3 8 6 3 7 5 3 9 6 8 5 7 1 1 1 5 9
2 4 2 9 2 4 5 6 7 4 8 5 9 6 3 7 5 3 8 6 3 9 7 1 1 1 8
4 2 5 2 4 2 9 5 4 7 8 3 5 6 3 9 7 3 8 6 1 1 1 7 9 6 8
5 1 1 1 7 5 8 6 9 3 5 7 3 6 8 3 4 9 7 6 4 2 8 2 4 2 9
5 6 1 1 1 5 8 6 9 3 5 7 3 6 8 3 4 9 7 2 4 2 8 2 4 7 9
6 7 9 2 5 2 6 2 7 5 8 9 6 3 5 7 3 4 8 3 9 4 1 1 1 4 8
6 7 9 2 5 2 6 2 7 5 8 9 6 4 5 7 3 4 8 3 9 4 3 1 1 1 8
7 4 2 8 2 4 2 7 9 4 3 8 6 3 7 5 3 9 6 8 5 1 1 1 6 5 9
7 5 3 6 9 3 5 7 3 6 8 5 4 9 7 6 4 2 8 2 4 2 9 1 1 1 8
(End)
		

Crossrefs

Extensions

Fausto A. C. Cariboni has confirmed the values a(1) to a(20). - N. J. A. Sloane, Mar 27 2017
a(21) from Fausto A. C. Cariboni, Mar 28 2017

A050998 Inequivalent solutions to Langford (or Langford-Skolem) problem of arranging the numbers 1,1,2,2,3,3,...,n,n so that there is one number between the two 1's, two numbers between the two 2's, ..., n numbers between the two n's, listed by length and lexicographic order.

Original entry on oeis.org

231213, 23421314, 14156742352637, 14167345236275, 15146735423627, 15163745326427, 15167245236473, 15173465324726, 16135743625427, 16172452634753, 17125623475364, 17126425374635, 23627345161475
Offset: 1

Views

Author

Keywords

Comments

Entries are indexed by numbers n == -1 or 0 mod 4 (A014601).
More precisely, for each given n = (3, 4, 7, 8, ...) in A014601, all of the A014552(n) inequivalent solutions are listed in lexicographic order. For example, a(1), a(2) and a(3) correspond to n=3, 4 and 7, but a(4) is not the first solution for n=8 but the second solution for n=7. - M. F. Hasler, Nov 12 2015
"Inequivalent" means that for two solutions related by symmetry (reading the digits backwards), only the (lexicographic) smaller one is listed. - M. F. Hasler, Nov 15 2015
It is unclear how the sequence goes on after the first 1+1+26+150 terms, with the solutions for n >= 11. Will a solution s=(s[1],...,s[n]) be coded again by Sum_{i=1..n} s[i]*b^(n-i) in base b=10, or in some larger base b >= n+1? Maybe using as many decimal digits as needed, i.e., b=100 for 11 <= n <= 99? - M. F. Hasler, Nov 16 2015

Examples

			The first n which allows a solution (A014552(n) > 0; n in A014601) is n=3, the solutions are a(1) = 231213 and the same read backwards, 312132.
The next solutions are given for n=4, again there is only A014552(4)=1 solution a(2) = 23421314 up to reversal (41312432, not listed).
Then follow the A014552(7)=26 (inequivalent) solutions for n=7, viz. a(3)-a(28).
		

References

  • M. Gardner, Mathematical Magic Show, New York: Vintage, pp. 70 and 77-78, 1978.

Crossrefs

See A014552 (the main entry for this problem) for number of solutions.

Extensions

Definition clarified by M. F. Hasler, Nov 15 2015

A059107 Number of solutions to triples version of Langford (or Langford-Skolem) problem.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 0, 0, 0, 0, 0, 0, 13440, 54947, 249280, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Feb 14 2001

Keywords

Comments

How many ways are there of arranging the numbers 1,1,1,2,2,2,3,3,3, ...,n,n,n so that there is one number between the first and second 1's and one number between the second and third 1's; two numbers between the first and second 2's and two numbers between the second and third 2's; ... n numbers between the first and second n's and n numbers between the second and third n's?
a(n)=0 for n mod 9 not in {-1,0,1}. - Gheorghe Coserea, Aug 23 2017

Examples

			For n=9 the a(9)=3 solutions, up to reversal of the order, are:
1 8 1 9 1 5 2 6 7 2 8 5 2 9 6 4 7 5 3 8 4 6 3 9 7 4 3
1 9 1 2 1 8 2 4 6 2 7 9 4 5 8 6 3 4 7 5 3 9 6 8 3 5 7
1 9 1 6 1 8 2 5 7 2 6 9 2 5 8 4 7 6 3 5 4 9 3 8 7 4 3
From _Gheorghe Coserea_, Aug 26 2017: (Start)
For n=10 the a(10)=5 solutions, up to reversal of the order, are:
1 3 1 10 1 3 4 9 6 3 8 4 5 7 10 6 4 9 5 8 2 7 6 2 5 10 2 9 8 7
1 10 1 2 1 4 2 9 7 2 4 8 10 5 6 4 7 9 3 5 8 6 3 10 7 5 3 9 6 8
1 10 1 6 1 7 9 3 5 8 6 3 10 7 5 3 9 6 8 4 5 7 2 10 4 2 9 8 2 4
4 10 1 7 1 4 1 8 9 3 4 7 10 3 5 6 8 3 9 7 5 2 6 10 2 8 5 2 9 6
5 2 7 9 2 10 5 2 6 4 7 8 5 9 4 6 10 3 7 4 8 3 6 9 1 3 1 10 1 8
(End)
		

Crossrefs

Showing 1-10 of 20 results. Next