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.

A035486 Kimberling's expulsion array read by antidiagonals.

This page as a plain text file.
%I A035486 #40 Jul 02 2025 16:01:56
%S A035486 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,
%T A035486 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,
%U A035486 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
%N A035486 Kimberling's expulsion array read by antidiagonals.
%C A035486 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.
%C A035486 It is conjectured since 1992 that the main diagonal elements (A007063) are a permutation of the positive integers.
%D A035486 R. K. Guy, Unsolved Problems Number Theory, Sect E35.
%H A035486 Enrique Pérez Herrero, <a href="/A035486/b035486.txt">Table of n, a(n) for n = 1..10000</a>
%H A035486 D. Gale, <a href="http://dx.doi.org/10.1007/978-1-4612-2192-0">Tracking the Automatic Ant: And Other Mathematical Explorations</a>, ch. 5, p. 27. Springer, 1998.
%H A035486 Enrique Pérez Herrero, <a href="/wiki/User:Enrique_Pérez_Herrero/Kimberling">Formulas and programs for Kimberling's expulsion array</a>
%H A035486 Clark Kimberling, <a href="https://cms.math.ca/crux/backfile/Crux_v18n03_Mar.pdf">Problem 1615</a>, Crux Mathematicorum, Vol. 17 (2) 44 1991 and Vol. 18, March 1992, p. 82-83.
%H A035486 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/KimberlingSequence.html">Kimberling Sequence</a>
%e A035486 The array starts (with elements of A007063 in brackets):
%e A035486   [1]  2   3   4   5   6   7   8   9  10  11  12 ...
%e A035486    2  [3]  4   5   6   7   8   9  10  11  12  13 ...
%e A035486    4   2  [5]  6   7   8   9  10  11  12  13  14 ...
%e A035486    6   2   7  [4]  8   9  10  11  12  13  14  15 ...
%e A035486    8   7   9   2 [10]  6  11  12  13  14  15  16 ...
%e A035486    6   2  11   9  12  [7] 13   8  14  15  16  17 ...
%e A035486   13  12   8   9  14  11 [15]  2  16   6  17  18 ...
%e A035486 2 occurs as diagonal element in row 25, 27 in row 7598, and 19 in row 49595 (cf. A006852).
%t A035486 K[i_, j_] := i + j - 1 /; (j >= 2 i - 3);
%t A035486 K[i_, j_] := K[i - 1, i - (j + 2)/2] /; (EvenQ[j] && (j < 2 i - 3));
%t A035486 K[i_, j_] := K[i - 1, i + (j - 1)/2] /; (OddQ[j] && (j < 2 i - 3));
%t A035486 K[i_] := K[i] = K[i, i]; SetAttributes[K, Listable];
%t A035486 T[n_] := n*(n + 1)/2;
%t A035486 S[n_] := Floor[1/2 (1 + Sqrt[1 + 8 (n - 1)])];
%t A035486 AJ[n_] := 1 + T[S[n]] - n;
%t A035486 AI[n_] := 1 + S[n] - AJ[n];
%t A035486 A035486[n_] := K[AI[n], AJ[n]];
%t A035486 (* _Enrique Pérez Herrero_, Mar 30 2010 *)
%o A035486 (Python)
%o A035486 def A035486(n,k):
%o A035486     if k >= 2*n-3: return n+k-1
%o A035486     q,r = divmod(k+1,2)
%o A035486     return A035486(n-1,n-1+(1-2*r)*q) # _Pontus von Brömssen_, Jan 28 2023
%Y A035486 Cf. A006852 (positions), A007063 (main diagonal), A035505 (active part), A038807.
%Y A035486 Cf. A175312 (maximum value on lower shuffle part).
%K A035486 nonn,tabl,nice,look,easy
%O A035486 1,2
%A A035486 _N. J. A. Sloane_
%E A035486 More terms from _James Sellers_, Dec 23 1999
%E A035486 Edited by _Georg Fischer_, Jul 03 2020