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-2 of 2 results.

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

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)
Showing 1-2 of 2 results.