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 16 results. Next

A356026 Main diagonal of right-and-left variant of Kimberling expulsion array, A007063.

Original entry on oeis.org

1, 3, 5, 7, 4, 12, 10, 17, 6, 22, 15, 19, 24, 33, 31, 18, 8, 44, 35, 9, 39, 55, 26, 42, 29, 20, 14, 32, 58, 78, 76, 52, 38, 68, 74, 59, 67, 101, 27, 47, 88, 75, 61, 109, 50, 124, 54, 113, 41, 102, 119, 84, 34, 40, 136, 105, 71, 92, 131, 108, 28, 171, 169
Offset: 1

Views

Author

Clark Kimberling, Jul 23 2022

Keywords

Comments

This array appears in Guy, p. 360.
Conjectures involving a = A007063 and b = A356026:
(1) Every positive integer is eventually expelled in a and in b.
(2) a(n) < b(n) for infinitely many n.
(3) a(n) > b(n) for infinitely many n.
(4) a(n) = b(n) for infinitely many n; see A355323.

Examples

			Corner of the array (with terms of A356026 bracketed):
  [1]  2    3    4    5     6
   2  [3]   4    5    6     7
   2   4   [5]   6    7     8
   4   6    2   [7]   8     9
   2   8    6    9   [4]   10
   9  10    6   11    8   [12]
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd ed., Springer, 2004; Section E35.

Crossrefs

Programs

  • Mathematica
    a = Join[{{1}},
       NestList[
        Flatten[{#, Range[Last[#] + 1, Last[#] + 3]} &[
           Flatten[Transpose[{Reverse[#[[1]]], #[[2]]} &[
              Partition[#, Length[#]/2] &[
               Drop[#, {(Length[#] + 1)/2}] &[#]]]]]]] &, {2, 3, 4}, 200]];
    Take[a, 9] // TableForm;  (* the array, right-abbreviated *)
    Flatten[Map[Take[#, {(Length[#] + 1)/2}] &, a]] (* A356026 *)
    (* Peter J. C. Moses, Jul 23 2022 *)
    (* Alternate recursive code *)
    KL[i_, j_] := i + j - 1 /; (j >= 2 i - 3);
    KL[i_, j_] := KL[i - 1, i + (j - 2)/2] /; (EvenQ[j] && (j < 2 i - 3));
    KL[i_, j_] := KL[i - 1, i - (j + 3)/2] /; (OddQ[j] && (j < 2 i - 3));
    KL[i_] := KL[i] = KL[i, i]; SetAttributes[KL, Listable];
    A356026[n_] := KL[n];
    Array[A356026, 30]
    (* Enrique Pérez Herrero, Jan 12 2023 *)
  • PARI
    KL(i,j) =
    {
    my(i1,j1);
    i1=i;
    j1=j;
    while(j1<(2*i1-3),
          if(j1%2,
             j1=i1-((j1+3)/2),
             j1=i1+((j1-2)/2)
           );
           i1--;
    );
    return(i1+j1-1);
    }
    A356026(i)=KL(i,i);
    \\ Enrique Pérez Herrero, Jan 12 2023

A356379 Main diagonal of the LORI variant of the array A035486; this is one of eight such sequences discussed in A007063.

Original entry on oeis.org

1, 3, 5, 7, 4, 12, 11, 17, 10, 22, 21, 9, 23, 33, 8, 27, 16, 44, 26, 18, 30, 55, 41, 35, 14, 25, 65, 20, 67, 78, 43, 64, 49, 66, 76, 61, 85, 101, 60, 100, 32, 62, 111, 52, 68, 124, 80, 93, 86, 102, 92, 131, 115, 51, 110, 58, 77, 73, 72, 15, 134, 171, 29, 151
Offset: 1

Views

Author

Clark Kimberling, Oct 21 2022

Keywords

Comments

Conjecture: every positive integer except 2 occurs exactly once.

Crossrefs

Programs

  • Mathematica
    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}, 200]];
    s = Map[{#, Take[Flatten[Map[Take[#, {(Length[#] + 1)/2}] &, #]], 150] &[
          ToExpression[#]]} &, {"lori"}];
    Last[First[s]]   (* A356379 *)
    (* Peter J. C. Moses, Jul 26 2022 *)
    (* The next program generates the LORI array. *)
    len = 8; 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]];
    Grid[Map[Flatten, Transpose[{#, Range[3 Range[Length[#]] - 1,
           4 (Length[#] - 2) - 1 + Range[Length[#]]]}]] &[lori]]
    (* Peter J. C. Moses, Aug 02 2022 *)

A356377 Main diagonal of the ROLI variant of the array A035486; this is one of eight such sequences discussed in A007063.

Original entry on oeis.org

1, 3, 5, 4, 8, 6, 10, 15, 2, 9, 13, 26, 11, 12, 33, 34, 35, 29, 22, 37, 44, 48, 56, 39, 43, 54, 36, 16, 23, 25, 76, 81, 47, 30, 42, 14, 72, 38, 74, 71, 68, 92, 77, 46, 69, 94, 78, 128, 45, 110, 89, 73, 135, 90, 62, 115, 101, 104, 85, 153, 113, 158, 171, 172
Offset: 1

Views

Author

Clark Kimberling, Oct 21 2022

Keywords

Comments

Conjecture: every positive integer occurs exactly once.

Crossrefs

Programs

  • Mathematica
    len = 8; 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}, 200]];
    s = Map[{#, Take[Flatten[Map[Take[#, {(Length[#] + 1)/2}] &, #]], 150] &[
          ToExpression[#]]} &, {"roli"}];
    Last[First[s]]   (* A356377 *)
    (* Peter J. C. Moses, Jul 26 2022 *)
    (* The next program generates the ROLI array. *)
    len = 8; 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]];
    Grid[Map[Flatten, Transpose[{#, Range[3 Range[Length[#]] - 1,
           4 (Length[#] - 2) - 1 + Range[Length[#]]]}]] &[roli]]
    (* Peter J. C. Moses, Aug 02 2022 *)

A356378 Main diagonal of the RILO variant of the array A035486; this is one of eight such sequences discussed in A007063.

Original entry on oeis.org

1, 3, 5, 2, 10, 9, 15, 8, 20, 19, 7, 21, 31, 6, 25, 14, 42, 24, 16, 28, 53, 39, 33, 12, 23, 63, 18, 65, 76, 41, 62, 47, 64, 74, 59, 83, 99, 58, 98, 30, 60, 109, 50, 66, 122, 78, 91, 84, 100, 90, 129, 113, 49, 108, 56, 75, 71, 70, 13, 132, 169, 27, 149, 43
Offset: 1

Views

Author

Clark Kimberling, Oct 21 2022

Keywords

Comments

Conjecture: every positive integer occurs exactly once.

Crossrefs

Programs

  • Mathematica
    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}, 200]]; (* A356378 *)
    s = Map[{#, Take[Flatten[Map[Take[#, {(Length[#] + 1)/2}] &, #]], 150] &[
          ToExpression[#]]} &, {"rilo"}];
    Last[First[s]]   (* A356378 *)
    (* Peter J. C. Moses,Jul 26 2022 *)
    (* The next program generates the RILO array. *)
    len = 8; 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]];
    Grid[Map[Flatten, Transpose[{#, Range[3 Range[Length[#]] - 1,
           4 (Length[#] - 2) - 1 + Range[Length[#]]]}]] &[rilo]]
    (* Peter J. C. Moses, Aug 02 2022 *)

A356376 Main diagonal of the LORO variant of the array A035486; this is one of eight such sequences discussed in A007063.

Original entry on oeis.org

1, 3, 5, 6, 4, 11, 12, 9, 13, 15, 23, 7, 27, 16, 24, 25, 34, 36, 19, 14, 50, 41, 10, 40, 60, 32, 43, 35, 26, 20, 38, 63, 79, 81, 57, 44, 74, 80, 65, 72, 107, 28, 53, 93, 76, 66, 114, 56, 129, 55, 119, 47, 103, 125, 85, 39, 45, 141, 106, 77, 98, 137, 109, 33
Offset: 1

Views

Author

Clark Kimberling, Oct 21 2022

Keywords

Comments

Conjecture: every positive integer except 2 occurs exactly once.

Crossrefs

Programs

  • Mathematica
    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}, 200]];
    s = Map[{#, Take[Flatten[Map[Take[#, {(Length[#] + 1)/2}] &, #]], 150] &[
          ToExpression[#]]} &, {"loro"}]; u = Last[First[s]]
    (* Peter J. C. Moses, Jul 26 2022 *)
    (* The next program generates the LORO array. *)
    len = 8; 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]];
    Grid[Map[Flatten, Transpose[{#, Range[3 Range[Length[#]] - 1,
           4 (Length[#] - 2) - 1 + Range[Length[#]]]}]] &[loro]]
    (* Peter J. C. Moses, Aug 02 2022 *)

A356380 Main diagonal of the LIRO variant of the array A035486; this is one of eight such sequences discussed in A007063.

Original entry on oeis.org

1, 3, 5, 6, 4, 11, 13, 2, 7, 14, 24, 9, 10, 31, 35, 33, 27, 23, 38, 42, 46, 54, 37, 44, 52, 34, 17, 21, 26, 77, 79, 45, 28, 40, 12, 70, 36, 72, 69, 66, 90, 75, 47, 67, 95, 76, 126, 43, 108, 87, 74, 133, 88, 60, 116, 99, 102, 86, 151, 111, 156, 169, 173, 171
Offset: 1

Views

Author

Clark Kimberling, Oct 24 2022

Keywords

Comments

Conjecture: every positive integer occurs exactly once.

Crossrefs

Programs

  • Mathematica
    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}, 200]];
    s = Map[{#, Take[Flatten[Map[Take[#, {(Length[#] + 1)/2}] &, #]], 150] &[
          ToExpression[#]]} &, {"lori"}];
    Last[First[s]]   (* A356379 *)
    (* Peter J. C. Moses, Jul 26 2022 *)
    (* The next program generates the LIRO array. *)
    len = 8; 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]];
    Grid[Map[Flatten, Transpose[{#, Range[3 Range[Length[#]] - 1,
           4 (Length[#] - 2) - 1 + Range[Length[#]]]}]] &[liro]]
    (* Peter J. C. Moses, Aug 02 2022 *)

A355323 Numbers k such that A007063(k) = A356026(k).

Original entry on oeis.org

1, 2, 3, 371, 5131, 9250, 26664
Offset: 1

Views

Author

Clark Kimberling, Jul 25 2022

Keywords

Comments

It is conjectured that this is an infinite sequence.
No more terms < 1000000. - Vaclav Kotesovec, Jan 26 2023

Crossrefs

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

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

A038807 Future of the smallest-perizeroin komet in Kimberling's expulsion array (A035486).

Original entry on oeis.org

2, 3, 5, 10, 9, 20, 46, 83, 12, 24, 23, 36, 79, 124, 172, 56, 119, 61, 169, 17, 42, 84, 232, 285, 596, 1186, 3190, 6857, 14225, 12495, 30482, 45827, 79090, 144112, 423486, 1087497, 2443796, 628733, 871389, 1199242, 2787410, 7975876
Offset: 0

Views

Author

Keywords

Comments

Could the komet be a planit?

References

  • D. Gale, Mathematical Entertainments: "Careful Card-Shuffling and Cutting Can Create Chaos," The Mathematical Intelligencer, vol. 14, no. 1, 1992, pages 54-56.
  • D. Gale, Tracking the Automatic Ant and Other Mathematical Explorations, A Collection of Mathematical Entertainments Columns from The Mathematical Intelligencer, Springer, 1998.
  • Hans Havermann, Algorithm, #4, 1992, p. 2.

Crossrefs

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];
    A007063[i_] := K[i];
    A038807[1] := 2;
    A038807[n_] := A007063[A038807[n - 1]];
    ReleaseHold[Table[A038807[n], {n, 1, 35}]]
    (* Enrique Pérez Herrero, Jan 11 2023 *)

Formula

a(0) = 2; a(n) = a(n-1)-th term in Kimberling's expulsion array (A007063).
Showing 1-10 of 16 results. Next