[go: up one dir, main page]

login
A028920
Pit harvesting sequence for winning solitaire Tchoukaillon (or Mancala).
10
1, 2, 1, 3, 1, 4, 1, 2, 1, 5, 1, 6, 1, 2, 1, 3, 1, 7, 1, 2, 1, 8, 1, 4, 1, 2, 1, 3, 1, 9, 1, 2, 1, 10, 1, 5, 1, 2, 1, 3, 1, 11, 1, 2, 1, 4, 1, 12, 1, 2, 1, 3, 1, 6, 1, 2, 1, 13, 1, 14, 1, 2, 1, 3, 1, 4, 1, 2, 1, 5, 1, 7, 1, 2, 1, 3, 1, 15, 1, 2, 1, 16, 1, 4, 1, 2, 1, 3, 1, 8, 1, 2, 1, 6, 1, 5, 1, 2, 1, 3, 1, 17, 1
OFFSET
0,2
COMMENTS
From Benoit Cloitre, Mar 09 2007: (Start)
The sequence can be constructed as follows using parentheses (NP means "term not in parentheses"):
Start from the positive integers:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
Step 1: put the least NP "1" in parentheses and every 2 terms giving:
(1),2,(3),4,(5),6,(7),8,(9),10,(11),12,(13),14,(15),16,(17),18,(19),...
Step 2: put the least NP "2" in 2 parentheses and every 3 NP giving:
(1),((2)),(3),4,(5),6,(7),((8)),(9),10,(11),12,(13),((14)),(15),16,(17),...
so that between 2 consecutives ((x)) there are 2 NP.
Step 3: put the least NP "4" in 3 parentheses and every 4 NP giving:
(1),((2)),(3),(((4))),(5),6,(7),((8)),(9),10,(11),12,(13),((14)),(15),(((16))),...
so that between 2 consecutives (((x))) there are 3 NP.
Step 4: put the least NP "6" in 4 parentheses and every 5 NP giving:
(1),((2)),(3),(((4))),(5),((((6)))),(7),((8)),(9),10,(11),12,(13),((14)),(15),(((16))),...
so that between 2 consecutives ((((x)))) there are 4 NP.
Iterating the process indefinitely yields:
(1),((2)),(3),(((4))),(5),((((6)))),(7),((8)),(9),(((((10))))),(11),...
Count the parentheses:
1,2,1,3,1,4,1,2,1,5,1,... - this is the sequence.
(End)
From Benoit Cloitre, Jul 26 2007: (Start)
A simpler way to construct the sequence: start from
1,_,1,_,1,_,1,_,1,_,1,_,1,_,1,... where 1's are spaced by one hole;
fill first hole with 2 and leave 2 holes between two 2's giving
1,2,1,_,1,_,1,2,1,_,1,_,1,2,1,...;
fill new first hole with 3 and leave 3 holes between two 3's giving
1,2,1,3,1,_,1,2,1,_,1,_,1,2,1,3...;
iterating the process indefinitely yields the sequence.
(End)
Ordinal transform of A130747. - Benoit Cloitre, Aug 03 2007
Although this sequence and A130747 are not fractal sequences (according to Kimberling's definition), we say they are "mutual fractal sequences" since the ordinal transform of one gives the other. - Benoit Cloitre, Aug 03 2007
The smallest n with a(n) = k is circa k^2/Pi.
The element n >= 0 occurs in this sequence with limiting density 1/(n*(n+1)).
LINKS
D. M. Broline and Daniel E. Loeb, The combinatorics of Mancala-Type games: Ayo, Tchoukaillon and 1/Pi, arXiv:math/9502225 [math.CO], 1995; J. Undergrad. Math. Applic., vol. 16 (1995), pp. 21-36.
N. J. A. Sloane, My favorite integer sequences, in Sequences and their Applications (Proceedings of SETA '98).
FORMULA
a(2n+1) = 1 + A104706(n+1), a(2n) = 1. - Benoit Cloitre, Mar 09 2007
The sieve of A007952 processes n in the a(n)-th pass. a(A007952(n)) = n+1.
MATHEMATICA
n = 15; Fold[If[Length@Position[#1, 0] > 0, ReplacePart[#1, First /@ Partition[Position[#1, 0], #2 + 1, #2 + 1, {1, 1}] -> #2], #1] &, Flatten@Array[{1, 0} &, n], Range[2, 2 n]] (* Birkas Gyorgy, Feb 26 2011 *)
PROG
(C++)
int A028920(int n) {
for (int m = 1; ; m++) {
if (n%(m+1) == 0)
return m;
n = n*m/(m+1);
}
} /* David W. Wilson, Feb 25 2010 */
(PARI) a(n) = {ok = 0; m = 1; while (!ok, if ((n%(m+1) == 0), ok = 1, n = n*m\(m+1); m++); ); m; } \\ Michel Marcus, Dec 06 2015
CROSSREFS
KEYWORD
nonn
EXTENSIONS
Additional comments from David W. Wilson, Feb 25 2010
STATUS
approved