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 11-19 of 19 results.

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

A288327 Decuple factorial, 10-factorial, n!10, n!!!!!!!!!!.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 24, 39, 56, 75, 96, 119, 144, 171, 200, 231, 528, 897, 1344, 1875, 2496, 3213, 4032, 4959, 6000, 7161, 16896, 29601, 45696, 65625, 89856, 118881, 153216, 193401, 240000, 293601, 709632, 1272843, 2010624, 2953125, 4133376
Offset: 0

Views

Author

Robert Price, Jun 07 2017

Keywords

Examples

			a(13) = 13 * 3 * 1 = 39.
		

Crossrefs

Programs

  • GAP
    a:= function(n)
        if n<1 then return 1;
        else return n*a(n-10);
        fi;
      end;
    List([0..50], n-> a(n) ); # G. C. Greubel, Aug 22 2019
  • Magma
    b:=func< n | n le 10 select n else n*Self(n-10) >;
    [1] cat [b(n): n in [1..50]]; // G. C. Greubel, Aug 22 2019
    
  • Maple
    a:= n-> `if`(n<1, 1, n*a(n-10)); seq(a(n), n=0..50); # G. C. Greubel, Aug 22 2019
  • Mathematica
    MultiFactorial[n_, k_]:=If[n<1, 1 ,n*MultiFactorial[n-k, k]];
    Table[MultiFactorial[i, 10], {i, 0, 100}]
    Table[Times@@Range[n,1,-10],{n,0,50}] (* Harvey P. Dale, Aug 11 2019 *)
  • PARI
    a(n)=if(n<1, 1, n*a(n-10));
    vector(40, n, n--; a(n) ) \\ G. C. Greubel, Aug 22 2019
    
  • Sage
    def a(n):
        if (n<1): return 1
        else: return n*a(n-10)
    [a(n) for n in (0..50)] # G. C. Greubel, Aug 22 2019
    

Formula

a(n)=1 for n < 1, otherwise a(n) = n*a(n-10).
Sum_{n>=0} 1/a(n) = A342033. - Amiram Eldar, May 23 2022

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).

A175312 Maximum value on Lower Shuffle Part of Kimberling's Expulsion Array (A035486).

Original entry on oeis.org

1, 3, 5, 7, 10, 12, 15, 17, 20, 22, 25, 28, 31, 33, 36, 39, 42, 44, 47, 50, 53, 55, 58, 61, 64, 67, 70, 73, 76, 78, 81, 84, 87, 90, 93, 96, 99, 101, 104, 107, 110, 113, 116, 119, 122, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154, 157, 160, 163, 166, 169, 171
Offset: 1

Views

Author

Enrique Pérez Herrero, Mar 28 2010

Keywords

Comments

a(n) is the maximum value on or below diagonal of Kimberling's Expulsion Array; this part could be called the Lower Shuffle.

References

  • D. Gale, Tracking the Automatic Ant: And Other Mathematical Explorations, ch. 5, p. 27. Springer, 1998
  • R. K. Guy, Unsolved Problems Number Theory, Sect E35.

Crossrefs

Programs

  • Mathematica
    (* By direct computation *)
    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];
    A175312[n_] := Max[Table[K[n, i], {i, 1, n}]]  (* Enrique Pérez Herrero, Mar 30 2010 *)
    (* By the Formula *)
    \[Lambda][n_] := Floor[Log[2, (n + 2)/3]];
    A175312[n_] := 1 + 3*(n - \[Lambda][n]) - Floor[(n + 2)/(2^\[Lambda][n])] (* Enrique Pérez Herrero, Mar 30 2010 *)
  • PARI
    lambda(n)= floor(log((n + 2)/3)/log(2));
    A175312(n)= 1 + 3*(n - lambda(n)) - floor((n + 2)/(2^lambda(n))); \\ Enrique Pérez Herrero, Mar 30 2010

Formula

a(n) = 1 + 3(n-lambda(n)) - floor((n+2)/2^lambda(n)), lambda(n) = floor(log_2((n+2)/3)).
a(n) >= A007063(n); a(n) = max(K(n,1),K(n,2),...,K(n,n)), where K(i,j) is an element of Kimberling's Array given by A035486.
From Enrique Pérez Herrero, Mar 30 2010: (Start)
a(theta(k)) = A007063(theta(k)), where theta(k) = Sum_{i=0..k-1} 2^floor(i/3).
At these values the maximum in the Lower Shuffle is the diagonal expelled element. (End)

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

A038834 Past of komet 'k2' (A038807).

Original entry on oeis.org

2, 25, 43, 1523, 1833, 1016, 105511, 39366, 19872, 163433, 576843397, 335121400, 338128753, 173216346, 792656991
Offset: 0

Views

Author

Keywords

Crossrefs

Formula

a(0) = 2; a(n) = a(n-1)-th term in Kimberling's sequence A006852.

A307536 Self referencing version of the "Kimberling shuffle" sequence (see Comments).

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 6, 8, 2, 2, 11, 2, 13, 14, 6, 6, 2, 11, 19, 2, 21, 6, 2, 2, 2, 26, 27, 6, 11, 26, 13, 11, 19, 19, 11, 2, 26, 26, 13, 40, 26, 2, 2, 13, 45, 2, 26, 19, 49, 50, 51, 51, 21, 13, 26, 2, 57, 26, 6, 13, 2, 27, 63, 57, 26, 6, 21, 26, 21, 11, 26, 40, 73, 74, 45, 11, 77, 78, 2, 80, 6, 49, 2, 2, 85, 73, 87, 27, 89
Offset: 1

Views

Author

David James Sycamore, Apr 12 2019

Keywords

Comments

If the first row of the expulsion array is replaced by this sequence, and the rows are "shuffled" then the sequence reappears in the diagonal.
For integer n >= 1 define the set [n]={x; A^r(x)=n}U{y; B^r(y)=n}; (r=0,1,2,3..., A^0(n)=B^0(n)=n), where A=A007063 and B=A006852 (mutual inverses). This set includes n, together with all numbers linked to n by A and B. If a number m is in [n], then [m]=[n], therefore we name the set by its least element k, which takes the following values: 1,2,4,6,8,11,13,14,19,21,26,27,40,45,48,50,51,57,63,... Assuming every n is a term in A, the collection of distinct sets [k] is a partition of the natural numbers, and this sequence is constructed by replacing in the first row of the original array, every number n in [k], with k.
A lexicographically earliest version can be obtained from this sequence by replacing any term > all preceding terms by k+1, where k is the greatest term seen so far. Thus: 1,2,2,3,2,4,4,5,2,2,6,2,7,8,4,4,2,6,9,2,10,4,2,2,2,11,...
From Lars Blomberg, Apr 27 2019: (Start)
Starting with some k value and extending in both directions using A and B results in a "valley" with k at the bottom and often sub-valleys on the hillsides (larger than k). (See the document referenced in A038807 for an illustration.)
So the k sequence is computed by selecting the smallest value not yet seen and iterate as far as possible, then select the next value not seen, etc.
However, while it seems that A and B values goes toward infinity, it is not known whether a known valley will eventually connect to another known valley, leading to a different set of k values.
The DATA is based on iterating A and B until the value > 10^8. (End)

Examples

			Examples of [k] for the above list up to k=27:
[1]={1}; so a(1)=1
[2]={2,3,5,9,10,12,17,20,23,24,25,36,42,43,...}; so a(3)=a(5)=a(9)=...=a(43)=2, etc.
[4]={4}; a(4)=4
[6]={6,7,15,16,22,28,59,66,81,...}; a(6)=a(7)=a(15)=...a(81)=6, etc.
[8]={8}; a(8)=8
[11]={11,18,29,32,35,70,76,...}; a(18)=a(29)=...=a(76)=11, etc.
[13]={13,31,39,44,54,60,90,...}; a(31)=a(39)=...=a(90)=13, etc.
[14]={14}; a(14)=14
[19]={19,33,34,48,...}
[21]={21,53,67,69,...}
[26]={26,30,37,38,41,47,55,58,65,68,71,95,99,...}
[27]={27,62,88,...}
		

References

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

Crossrefs

Programs

  • PARI
    {A(z) = x=z; y=z; xx=2*x-4; while (y<=xx, x--; xx-=2; if (bittest(y,0)==1, y=x+((y+1)>>1), y=x-(y>>1))); return(x+y-1);};
    {B(z) = a=z; n=1; while (a!=n, if (a2*n, a--, a=2*(a-n)-1);n++); return(a);}; \\ Lars Blomberg, Apr 29 2019

A307797 Lexicographically earliest version of a self referencing "Kimberling shuffle" expulsion array sequence.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Start with this sequence, "shuffle" as in A007063 and the sequence reappears in the diagonal of the array. Terms are transformed from A307536 to this lexicofirst version by replacing the first and all subsequent occurrences of any term > all preceding terms by k+1, where k is the greatest (transformed) term seen so far. The records of this sequence is the natural numbers, A000027, starting point of the original Kimberling exclusion array.

Examples

			A307536(4)=4 > all preceding terms, the greatest of which is 2, so a(4)=3. Since 4 appears only once in A307536, 3 appears only once in this sequence.
A307536(21)=21 > all preceding terms, the greatest of which (in this sequence) is 9, so a(21)=10. Subsequent terms with the same value are a(53), a(67), a(69), ... because the corresponding terms (same indices) in A307536 all have value 21.
		

Crossrefs

Programs

  • PARI
    A(z) = {x=z; y=z; xx=2*x-4; while (y<=xx, x--; xx-=2; if (bittest(y, 0)==1, y=x+((y+1)>>1), y=x-(y>>1))); return(x+y-1); } \\ A007063
    B(z) = {a=z; n=1; while (a!=n, if (a2*n, a--, a=2*(a-n)-1); n++); return(a);} \\ A006852
    addgroup(group, n, fixed, v) = {my(ok = 1, m=v[n]); while(ok, listput(group, m); if (m==n, ok=0; break); if (m > #v, ok=0; break); n = m; m = v[n];); group;}
    makegroup(n, fixed, va, vb) = {my(group = List()); listput(group, n); group = addgroup(group, n, fixed, va); group = addgroup(group, n, fixed, vb); listsort(group, 1); Vec(group);}
    setgroup(v, n, group) = {my(gmin = vecmin(group)); for (i=1, #group, if ((group[i] <= #v) && !v[n], v[n] = gmin);); v;}
    lista() = {nn = 200; nout = 90; va = vector(nn, k, A(k)); vb = vector(nn, k, B(k)); vc = vector(nn); fixed = List(); for (n = 1, nn, if (va[n] == n, listput(fixed, n));); fixed = Vec(fixed); for (n=1, nn, group = makegroup(n, fixed, va, vb); vc = setgroup(vc, n, group);); vector(nout, k, vc[k]);} \\ A307536
    earliest(v) = {my(m = Map(), val=1); for (i=1, #v, if (!mapisdefined(m, v[i]), mapput(m, v[i], val); val++);); apply(x->mapget(m, x), v);}
    earliest(lista()) \\ Michel Marcus, Jun 14 2019
Previous Showing 11-19 of 19 results.