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.

A006852 Step at which n is expelled in Kimberling's puzzle (A035486).

Original entry on oeis.org

1, 25, 2, 4, 3, 22, 6, 8, 10, 5, 32, 83, 44, 14, 7, 66, 169, 11, 49595, 9, 69, 16, 24, 12, 43, 47, 7598, 15, 133, 109, 13, 198, 19, 33, 18, 23, 58, 65, 60, 93167, 68, 17, 1523, 39, 75, 20, 99, 34, 117, 123
Offset: 1

Views

Author

Keywords

References

  • R. K. Guy, Unsolved Problems Number Theory, Sect E35.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A007063.
Cf. A175312. - Enrique Pérez Herrero, Mar 28 2010

Programs

  • Mathematica
    L[n_] := L[n] = (
    i = Floor[(n + 4)/3];
    j = Floor[(2*n + 1)/3];
    While[(i != j), j = Max[2*(i - j), 2*(j - i) - 1]; i++ ];
    Return[i];
    ) A006852[n_] := L[n]
    (* Enrique Pérez Herrero, Mar 28 2010 *)
  • PARI
    A006852(n)=
    {
    my(i,j);
    i=floor((n+4)/3);
    j=floor((2*n+1)/3);
    while((i!=j),
    j=max(2*i-2*j,-1-2*i+2*j);
    i++;
    ); return(i); }
    \\ Enrique Pérez Herrero, Feb 25 2010

Formula

a(n) >= floor((n+4)/3), n is expulsed from the unshuffled zone. - Enrique Pérez Herrero, Feb 25 2010

Extensions

7593 corrected to 7598 by Hans Havermann, July 1998

A007063 Main diagonal of Kimberling's expulsion array (A035486).

Original entry on oeis.org

1, 3, 5, 4, 10, 7, 15, 8, 20, 9, 18, 24, 31, 14, 28, 22, 42, 35, 33, 46, 53, 6, 36, 23, 2, 55, 62, 59, 76, 65, 54, 11, 34, 48, 70, 79, 99, 95, 44, 97, 58, 84, 25, 13, 122, 83, 26, 115, 82, 91, 52, 138, 67, 90, 71, 119, 64, 37, 81, 39, 169, 88, 108, 141, 38, 16, 146, 41, 21
Offset: 1

Views

Author

Keywords

Comments

From Clark Kimberling Aug 05 2022, Oct 24 2022: (Start)
Eight such arrays (including A035486 and A356026) have been coded by Peter J. C. Moses using
R for "right side of expelled (number)",
L for "left side",
I for "inner", i.e., next to expelled, and
O for "outer", i.e., farthest from expelled. For example, the array A035486 (and diagonal A007063) are coded as RILI. For the eight codes see Example and Mathematica. It is conjectured that six of the eight diagonal sequences are permutations of the positive integers. (End)

Examples

			The eight diagonals described in Comments:
A007063 = RILI = (1, 3, 5, 4, 10,  7, 15,  8, 20,  9, 18, 24, 31, 14, ... )
A282348 = ROLO = (1, 3, 5, 2,  8,  9,  4, 10,  7, 20, 12, 24, 14, 23, ... )
A356376 = LORO = (1, 3, 5, 6,  4, 11, 12,  9, 13, 15, 23,  7, 27, 16, ... )
A356026 = LIRI = (1, 3, 5, 7,  4, 12, 10, 17,  6, 22, 15, 19, 24, 33, ... )
A356377 = ROLI = (1, 3, 5, 4,  8,  6, 10, 15,  2,  9, 13, 26, 11, 12, ... )
A356378 = RILO = (1, 3, 5, 2, 10,  9, 15,  8, 20, 19,  7, 21, 31,  6, ... )
A356379 = LORI = (1, 3, 5, 7,  4, 12, 11, 17, 10, 22, 21,  9, 23, 33, ... )
A356380 = LIRO = (1, 3, 5, 6,  4, 11, 13,  2,  7, 14, 24,  9, 10, 31, ... )
		

References

  • D. Gale, Tracking the Automatic Ant: And Other Mathematical Explorations, ch. 5, p. 27. Springer, 1998.
  • R. K. Guy, Unsolved Problems in Number Theory, 3rd ed., Springer, 2004; Section E35, p. 359.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    K[i_, j_] := i + j - 1 /; (j >= 2 i - 3);
    K[i_, j_] := K[i - 1, i - j/2 - 1] /; (EvenQ[j] && (j < 2 i - 3));
    K[i_, j_] := K[i - 1, i + (j - 1)/2] /; (OddQ[j] && (j < 2 i - 3));
    A007063[i_] := A007063[i] = K[i, i]; SetAttributes[A007063, Listable] (* Enrique Pérez Herrero, Feb 09 2010 *)
    (* Next program generates the 8 arrays with highlighted diagonal sequences. *)
    len = 1000;
    roli = Join[{{1}},
       NestList[
        Join[#[[Riffle[Range[Length[#], (Length[#] + 3)/2, -1],
             Range[(Length[#] - 1)/2, 1, -1]]]],
          Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]];
    rili = Join[{{1}},
      NestList[Join[#[[Riffle[Range[(Length[#] + 3)/2, Length[#]],
            Range[(Length[#] - 1)/2, 1, -1]]]],
         Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4},
       len]];(*A007063*)
    rolo = Join[{{1}},
      NestList[Join[#[[Riffle[Range[Length[#], (Length[#] + 3)/2, -1],
            Range[1, (Length[#] - 1)/2]]]],
         Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4},
       len]];(*A282348*)
    rilo = Join[{{1}},
      NestList[Join[#[[Riffle[Range[(Length[#] + 3)/2, Length[#]],
            Range[1, (Length[#] - 1)/2, 1]]]],
         Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]];
    lori = Join[{{1}},
       NestList[
        Join[#[[Riffle[Range[1, (Length[#] - 1)/2],
             Range[(Length[#] + 3)/2, Length[#]]]]],
          Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]];
    liri = Join[{{1}},
      NestList[Join[#[[Riffle[Range[(Length[#] - 1)/2, 1, -1],
            Range[(Length[#] + 3)/2, Length[#]]]]],
         Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4},
       len]];(*A356026*)
    loro = Join[{{1}},
      NestList[Join[#[[Riffle[Range[1, (Length[#] - 1)/2],
            Range[Length[#], (Length[#] + 3)/2, -1]]]],
         Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]];
    liro = Join[{{1}},
       NestList[
        Join[#[[Riffle[Range[(Length[#] - 1)/2, 1, -1],
             Range[Length[#], (Length[#] + 3)/2, -1]]]],
          Range[#, # + 2] &[(3 Length[#] + 1)/2]] &, {2, 3, 4}, len]];
    (Map[{#, Take[Flatten[Map[Take[#, {(Length[#] + 1)/2}] &, #]], 200] &[
          ToExpression[#]]} &, {"rolo", "rilo", "roli", "rili", "loro",
        "liro", "lori", "liri"}]) // ColumnForm
    rows = 10; Map[{#,
       Grid[Map[Map[StringPadLeft[ToString[#], 2] &, #] &,
         Take[ToExpression[#], rows]],
        Frame -> {None, None, Map[{#, #} -> True &, Range[rows]]},
        FrameStyle -> Directive[Red]]} &, {"rolo", "rilo", "roli", "rili",
       "loro", "liro", "lori", "liri"}]
    (* Peter J. C. Moses, Oct 24 2022; Clark Kimberling, Oct 24 2022 *)
  • PARI
    K(i,j) = { my(i1,j1);i1=i; j1=j;
    while(j1<(2*i1-3),if(j1%2,j1=i1+((j1-1)/2),j1=i1-((j1+2)/2));i1--;);
    return(i1+j1-1);}
    A007063(i)=K(i,i); \\ Enrique Pérez Herrero, Feb 21 2010

Formula

a(theta(k)) = 3*theta(k)-(k+1), where theta(k) = Sum_{i=0..k-1} 2^floor(i/3). - Enrique Pérez Herrero, Feb 23 2010
From Connor Brown, May 05 2023 to Feb 01 2024: (Start)
14 sets of values which predictably appear within the sequence have been found, 1 by Richard Guy (1992) and 13 by Connor Brown (2023). Below, k is any positive integer unless otherwise specified.
a(3*2^k-3) = 9*2^k - 3*k - 10. (Guy, 1992)
a(5*2^k-3) = 15*2^k - 3*k - 12.
a(4*2^k-3) = 12*2^k - 3*k - 11.
a((20/3)*2^k-(4/3)) = 20*2^k - 3*k - 13 for odd k.
a((16/3)*2^k-(4/3)) = 16*2^k - 3*k - 12 for even k.
a((40/7)*2^k-(3/7)) = (120/7)*2^k - 3*k - (93/7) for k==1 (mod 3).
a((16/5)*2^k-(2/5)) = (48/5)*2^k - 3*k - (46/5) for k==1 (mod 4).
a((12/5)*2^k-(2/5)) = (36/5)*2^k - 3*k - (41/5) for k==0 (mod 4).
a((48/13)*2^k+(8/13)) = (144/13)*2^k - 3*k - (145/13) for k==1 (mod 12).
a((64/13)*2^k+(8/13)) = (192/13)*2^k - 3*k - (158/13) for k==3 (mod 12).
a((80/13)*2^k+(8/13)) = (240/13)*2^k - 3*k - (171/13) for k==8 (mod 12).
a((64/9)*2^k+(7/9)) = (64/3)*2^k - 3*k - (35/3) for k==1 (mod 6).
a((80/9)*2^k+(7/9)) = (80/3)*2^k - 3*k - (38/3) for k==4 (mod 6).
a((64/15)*2^k+(7/15)) = (64/5)*2^k - 3*k - (63/5) for k>4, k==1 (mod 4).
(End)
a(n) <= A175312(n). - Enrique Pérez Herrero, Dec 14 2024

Extensions

More terms from James Sellers, Dec 23 1999

A035486 Kimberling's expulsion array read by antidiagonals.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 4, 2, 6, 5, 5, 5, 2, 8, 6, 6, 6, 7, 7, 6, 7, 7, 7, 4, 9, 2, 13, 8, 8, 8, 8, 2, 11, 12, 2, 9, 9, 9, 9, 10, 9, 8, 11, 18, 10, 10, 10, 10, 6, 12, 9, 16, 17, 16, 11, 11, 11, 11, 11, 7, 14, 14, 12, 14, 23, 12, 12, 12, 12, 12, 13, 11, 6, 9, 21, 2, 13, 13, 13, 13, 13, 13, 8, 15
Offset: 1

Views

Author

Keywords

Comments

To get the next row, start with the first element to the right of the diagonal term, then take the first to the left of the diagonal, then the second to the right, then the second to the left, the third to the right, etc.
It is conjectured since 1992 that the main diagonal elements (A007063) are a permutation of the positive integers.

Examples

			The array starts (with elements of A007063 in brackets):
  [1]  2   3   4   5   6   7   8   9  10  11  12 ...
   2  [3]  4   5   6   7   8   9  10  11  12  13 ...
   4   2  [5]  6   7   8   9  10  11  12  13  14 ...
   6   2   7  [4]  8   9  10  11  12  13  14  15 ...
   8   7   9   2 [10]  6  11  12  13  14  15  16 ...
   6   2  11   9  12  [7] 13   8  14  15  16  17 ...
  13  12   8   9  14  11 [15]  2  16   6  17  18 ...
2 occurs as diagonal element in row 25, 27 in row 7598, and 19 in row 49595 (cf. A006852).
		

References

  • R. K. Guy, Unsolved Problems Number Theory, Sect E35.

Crossrefs

Cf. A006852 (positions), A007063 (main diagonal), A035505 (active part), A038807.
Cf. A175312 (maximum value on lower shuffle part).

Programs

  • Mathematica
    K[i_, j_] := i + j - 1 /; (j >= 2 i - 3);
    K[i_, j_] := K[i - 1, i - (j + 2)/2] /; (EvenQ[j] && (j < 2 i - 3));
    K[i_, j_] := K[i - 1, i + (j - 1)/2] /; (OddQ[j] && (j < 2 i - 3));
    K[i_] := K[i] = K[i, i]; SetAttributes[K, Listable];
    T[n_] := n*(n + 1)/2;
    S[n_] := Floor[1/2 (1 + Sqrt[1 + 8 (n - 1)])];
    AJ[n_] := 1 + T[S[n]] - n;
    AI[n_] := 1 + S[n] - AJ[n];
    A035486[n_] := K[AI[n], AJ[n]];
    (* Enrique Pérez Herrero, Mar 30 2010 *)
  • Python
    def A035486(n,k):
        if k >= 2*n-3: return n+k-1
        q,r = divmod(k+1,2)
        return A035486(n-1,n-1+(1-2*r)*q) # Pontus von Brömssen, Jan 28 2023

Extensions

More terms from James Sellers, Dec 23 1999
Edited by Georg Fischer, Jul 03 2020

A035505 Active part of Kimberling's expulsion array as a triangular array.

Original entry on oeis.org

4, 2, 6, 2, 7, 4, 8, 7, 9, 2, 10, 6, 6, 2, 11, 9, 12, 7, 13, 8, 13, 12, 8, 9, 14, 11, 15, 2, 16, 6, 2, 11, 16, 14, 6, 9, 17, 8, 18, 12, 19, 13, 18, 17, 12, 9, 19, 6, 13, 14, 20, 16, 21, 11, 22, 2, 16, 14, 21, 13, 11, 6, 22, 19, 2, 9, 23, 12, 24, 17, 25, 18, 23, 2, 12, 19, 24, 22, 17, 6
Offset: 1

Views

Author

Keywords

Comments

Active or shuffle part of Kimberling's expulsion array (A035486) is given by the elements K(i,j), where j < 2*i-3. [Enrique Pérez Herrero, Apr 14 2010]

Examples

			4 2; 6 2 7 4; 8 7 9 2 10 6; ...
		

References

  • R. K. Guy, Unsolved Problems Number Theory, Sect. E35.

Crossrefs

Programs

  • Mathematica
    A000194[n_] := Floor[(1 + Sqrt[4 n - 3])/2];
    A074294[n_] := n - 2*Binomial[Floor[1/2 + Sqrt[n]], 2];
    K[i_, j_] := i + j - 1 /; (j >= 2 i - 3);
    K[i_, j_] := K[i - 1, i - (j + 2)/2] /; (EvenQ[j] && (j < 2 i - 3));
    K[i_, j_] := K[i - 1, i + (j - 1)/2] /; (OddQ[j] && (j < 2 i - 3));
    A035505[n_] := K[A000194[n] + 2, A074294[n]]
    (* Enrique Pérez Herrero, Apr 14 2010 *)

Formula

From Enrique Pérez Herrero, Apr 14 2010: (Start)
a(n) = K(A000194(n)+2, A074294(n)), where
K(i,j) = i + j - 1; (j >= 2*i - 3)
K(i,j) = K(i-1, i-(j+2)/2) if j is even and j < 2*i - 3
K(i,j) = K(i-1, i+(j-1)/2); if j is odd and j < 2*i - 3.
(End)

Extensions

More terms from James Sellers, Dec 23 1999
Showing 1-4 of 4 results.