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

A002491 Smallest number of stones in Tchoukaillon (or Mancala, or Kalahari) solitaire that make use of n-th hole.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 18, 22, 30, 34, 42, 48, 58, 60, 78, 82, 102, 108, 118, 132, 150, 154, 174, 192, 210, 214, 240, 258, 274, 282, 322, 330, 360, 372, 402, 418, 442, 454, 498, 510, 540, 570, 612, 622, 648, 672, 718, 732, 780, 802, 840, 870, 918
Offset: 1

Views

Author

Keywords

Comments

To get n-th term, start with n and successively round up to next multiple of n-1, n-2, ..., 1.
Generated by a sieve: start with [ 1..n ]; keep first number, drop every 2nd, keep first, drop every 3rd, keep first, drop every 4th, etc.
Comment from Don Knuth, Jun 08 2021, added by N. J. A. Sloane, Jun 09 2021: (Start)
I have put together a preliminary exposition of the results of Broline and Loeb (1995), in what's currently called Exercise 11 (on page 7) and its answer (on pages 9 and 10) of the Bipartite Matching document.
Unfortunately, I believe this paper erred when it claimed to have proved the conjecture of Erdős and Jabotinsky about the sharpness of approximation to n^2/pi. When they computed the sum of I_M in the proof of Theorem 9, they expressed it as f(M-1)^2/4M + O(f(M-1)). That's correct; but the error gets quite large, and when summed gives O(n^(3/2)), not O(n).
By summing over only part of the range, and using another estimate in the rest, I believe one can get an overall error bound O(n^(4/3)), thus matching the result of Erdős and Jabotinsky but not improving on it. (End)

Examples

			To get 10th term: 10->18->24->28->30->30->32->33->34->34.
		

References

  • Y. David, On a sequence generated by a sieving process, Riveon Lematematika, 11 (1957), 26-31.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.4.7.
  • V. Gautheron, Chapter 3.II.5: La Tchouka, in Wari et Solo: le Jeu de calculs africain (Les Distracts), Edited by A. Deledicq and A. Popova, CEDIC, Paris, 1977, 180-187.
  • D. E. Knuth, Bipartite Matching, The Art of Computer Programming, Vol. 4, Pre-fascicle 14A, June 8, 2021, http://cs.stanford.edu/~knuth/fasc14a.ps.gz. See Sect. 7.5.1, Exercise 11.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a002491 n = a002491_list !! (n-1)
    a002491_list = sieve 1 [1..] where
       sieve k (x:xs) = x : sieve (k+1) (mancala xs) where
          mancala xs = us ++ mancala vs where (us,v:vs) = splitAt k xs
    -- Reinhard Zumkeller, Oct 31 2012
    
  • Maple
    # A002491
    # program due to B. Gourevitch
    a := proc(n)
    local x,f,i,y;
      x := n; f := n;
      for i from x by -1 to 2 do
         y := i-1;
         while y < f do
           y := y+i-1
         od;
      f := y
      od
    end:
    seq(a(n), n = 2 .. 53);
  • Mathematica
    f[n_] := Fold[ #2*Ceiling[ #1/#2 + 0] &, n, Reverse@Range[n - 1]]; Array[f, 56] (* Robert G. Wilson v, Nov 05 2005 *)
    del[list_, k_] := Delete[list, Table[{i}, {i, k, Length[list], k}]]; a[n_] := Last@NestWhile[{#[[1]] + 1, del[Rest@#[[2]], #[[1]] + 1], Append[#[[3]], First@#[[2]]]} &, {1,Range[n], {}}, #[[2]] =!= {} &]; a[1000] (* Birkas Gyorgy, Feb 26 2011 *)
    Table[1 + First@FixedPoint[{Floor[#[[1]]*(#[[2]] + 1/2)/#[[2]]], #[[2]] + 1} &, {n, 1}, SameTest -> (#1[[1]] == #2[[1]] &)], {n, 0, 30}] (* Birkas Gyorgy, Mar 07 2011 *)
    f[n_]:=Block[{x,p},For[x=p=1, p<=n, p++, x=Ceiling[(n+2-p)x/(n+1-p)]];x] (* Don Knuth, May 27 2021 *)
  • PARI
    a(n)=forstep(k=n-1,2,-1, n=((n-1)\k+1)*k); n \\ Charles R Greathouse IV, Mar 29 2016

Formula

Equals A007952(n) + 1 or equally A108696(n) - 1.
A130747(a(n)) = 1. - Reinhard Zumkeller, Jun 23 2009
a(n+1) = 1 + [..[[[[n*3/2]5/4]7/6]9/8]...(2k+1)/2k]...]. - Birkas Gyorgy, Mar 07 2011
Limit_{n -> oo} n^2/a(n) = Pi (see Brown). - Peter Bala, Mar 12 2014
It appears that a(n)/2 = A104738(n-1). - Don Knuth, May 27 2021

A007952 Generated by a sieve: keep first number, drop every 2nd, keep first, drop every 3rd, keep first, drop every 4th, etc.

Original entry on oeis.org

0, 1, 3, 5, 9, 11, 17, 21, 29, 33, 41, 47, 57, 59, 77, 81, 101, 107, 117, 131, 149, 153, 173, 191, 209, 213, 239, 257, 273, 281, 321, 329, 359, 371, 401, 417, 441, 453, 497, 509, 539, 569, 611, 621, 647, 671, 717, 731, 779, 801, 839, 869, 917, 929, 989, 1001, 1053, 1067
Offset: 0

Views

Author

N. J. A. Sloane, R. Muller

Keywords

Comments

Also called the sieve of Tchoukaillon (or Mancala, or Kalahari).
If k+1 occurs at rank i for the first time, then i is given by the program: i = 0: for j = k to 1 step -1: i = 1 + i + int ( i / j ): next: - Claude Lenormand (claude.lenormand(AT)free.fr), Jan 15 2001
A082447(n+1) = (number of terms <= n); see A141262 for primes. - Reinhard Zumkeller, Jun 21 2008

References

  • Y. David, On a sequence generated by a sieving process, Riveon Lematematika, 11 (1957), 26-31.
  • M. Le, On the Smarandache n-ary Sieve, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 146-147.

Crossrefs

Programs

  • Haskell
    a007952 n = a007952_list !! n
    a007952_list = f 1 [0..] where
       f k (x:xs) = x : f (k + 1) (g xs) where
         g ws = us ++ (g vs) where (us, _:vs) = splitAt k ws
    -- Reinhard Zumkeller, Jan 19 2014
    
  • Mathematica
    f[n_] := Fold[#2*Floor[#1/#2 + 1] &, n, Reverse@ Range[n - 1]]; Array[f, 55] (* From David Wilson *)
  • PARI
    a(n) = my(ret=0); forstep(k=n,1,-1, ret++; ret+=(-ret)%k); ret; \\ Kevin Ryde, Sep 30 2022

Formula

Equals A002491(n) - 1. Equals A108696 - 2.

Extensions

Corrected and extended by David W. Wilson

A028933 Table of winning positions in Tchoukaillon (or Mancala) solitaire.

Original entry on oeis.org

0, 1, 0, 2, 1, 2, 0, 1, 3, 1, 1, 3, 0, 0, 2, 4, 1, 0, 2, 4, 0, 2, 2, 4, 1, 2, 2, 4, 0, 1, 1, 3, 5, 1, 1, 1, 3, 5, 0, 0, 0, 2, 4, 6, 1, 0, 0, 2, 4, 6, 0, 2, 0, 2, 4, 6, 1, 2, 0, 2, 4, 6, 0, 1, 3, 2, 4, 6, 1, 1, 3, 2, 4, 6, 0, 0, 2, 1, 3, 5, 7, 1, 0, 2, 1, 3, 5, 7
Offset: 0

Views

Author

Keywords

Comments

Table read by rows where b(n,i) = the number of counters in the i-th position from the store of the unique winning Tchoukaillon board having n total counters.

Examples

			   The rows of b(n,i) begin
   n\i 1 2 3 4 5 6
   1   1
   2   0 2
   3   1 2
   4   0 1 3
   5   1 1 3
   6   0 0 2 4
   7   1 0 2 4
   8   0 2 2 4
   9   1 2 2 4
   10  0 1 1 3 5
   11  1 1 1 3 5
   12  0 0 0 2 4 6
   13  1 0 0 2 4 6
   14  0 2 0 2 4 6
   15  1 2 0 2 4 6
   16  0 1 3 2 4 6
   17  1 1 3 2 4 6
		

Crossrefs

Programs

  • Mathematica
    s[list_] := Module[{x = Append[list, 0], i = 1}, While[x[[i]] =!= 0, x[[i]] = x[[i]] - 1; i = i + 1]; x[[i]] = i; If[Last@x == 0, Most[x], x]]; Prepend[Flatten@NestList[s, {}, 20],0] (* Birkas Gyorgy, Feb 26 2011 *)

Formula

Let p(n) be the minimum j such that b(n,j) = 0. (This is A028920.)
Directly from the rules of Tchoukaillon, we find b(n+1,i) = (b(n,i) - 1 for 1 <= i < p(n), i for i = p(n), and b(n,i) for i > p(n)).
Also, b(n,i) = (n - Sum_{j=1..(i-1)} b(n,j)) mod (i+1).

Extensions

Formulas added by Brant Jones, Oct 14 2013

A028931 Strings giving winning positions in Tchoukaillon (or Mancala) solitaire.

Original entry on oeis.org

0, 1, 20, 21, 310, 311, 4200, 4201, 4220, 4221, 53110, 53111, 642000, 642001, 642020, 642021, 642310, 642311, 7531200, 7531201, 7531220, 7531221, 86420110, 86420111, 86424000, 86424001, 86424020, 86424021, 86424310, 86424311
Offset: 0

Views

Author

Keywords

Comments

a(n) gives string listing winning position for n stones.
Sum of numbers in a(n) is equal to n.
Using the chromatic (tet-12) scale, (if C=0, 12, 24...) all integers correspond to pitches C, C#, G#, A, Bb, B, a recursive pattern that evenly bisects the octave and avoids the tritone (IC6). - Nik Bizzell-Browning, Apr 27 2019

Examples

			For example, a(10) = 53111; rightmost 0 is in position 6, so get 653111 -> a(11) = 642000.
		

Crossrefs

Programs

  • Mathematica
    a[1] = {0};a[n_]:=a[n]=Module[{gs=a[n-1],len=Length[a[n-1]],pos},If[FreeQ[gs,0],Prepend[gs-1,1+len],pos=FirstPosition[Reverse[gs],0][[1]];(gs[[;;len-pos]])~Join~{pos}~Join~If[pos==1,{},(gs[[len-pos+2;;]]-1)]]];StringJoin/@Map[ToString, Array[a, 30], {2}] (* Shenghui Yang, Jun 06 2025 *)

Formula

To get the next term, if rightmost 0 is in position i, replace it by i and subtract 1 from all earlier entries.

Extensions

More terms from Erich Friedman

A028932 Triangular array of winning positions in Tchoukaillon (or Mancala) solitaire.

Original entry on oeis.org

0, 1, 2, 0, 2, 1, 3, 1, 0, 3, 1, 1, 4, 2, 0, 0, 4, 2, 0, 1, 4, 2, 2, 0, 4, 2, 2, 1, 5, 3, 1, 1, 0, 5, 3, 1, 1, 1, 6, 4, 2, 0, 0, 0, 6, 4, 2, 0, 0, 1, 6, 4, 2, 0, 2, 0, 6, 4, 2, 0, 2, 1, 6, 4, 2, 3, 1, 0, 6, 4, 2, 3, 1, 1, 7, 5, 3, 1, 2, 0, 0, 7, 5, 3, 1, 2, 0, 1
Offset: 0

Views

Author

Keywords

Comments

The 300 names of Mancala: Abalala'e, Abanga, Abangah, Abouga, Achara, Adi, Adita ta, Adito, Adji, Adjiboto, Adjika, Adji pre, Adjito, Aghi, Agi, Aji, Ajwa, Ale, Andot, Annana, Anywoli, Awale, Awale, Aware, Awari, Awele, Awele Ayo, Ayo Ayo, Azigo,
Ba-Awa, Banga, Bao, Bao kiswahili, Bao solo, Bare, Baruma, Bau, Bawo, Bechi, Boke, Bosh, Bouberoukou, Bouri, Chanka, Chisolo, Chongkak, Choro, Chouba, Chuba, Chunca, Cisolo, Congkak, Coo, Coro, Coro bawo,
Dabuda, dakon, Dakoun, Dara, Darra, Deka, Djonghok, Djonglak, Dwong, erherhe, Endodoi, Enkeshui, Eson xorgol, Esson, eu leu, Fangaya, Fuva, Gabata, Gabatta, Galatjang, Gamacha, Gbegele, Gebta, Gelo, Gepeta, Gesuwa, Gilberta, Giuthi,
Halusa, Hus, Igisoro, Ikiokoto, Imbelece, Imbwe, Impere, Isafu, Ise onzin egbe, Isofu, Isolo, J'erin, jodu, J'odu, Jukuru, Kachig, Ka ia, Kalah, Kalaha, Kalak, Kale, Kalimanta, Kasonko, Katra, Kboo, Kenji guki, Kiarabu, Kisolo, Kiswahilibao, Kiuthi, Kpo, !Krour, Kubuguza,
La'b hakim, La'b madjunni, La'b roseya, Lahemay walida, Lami, Lamlameta, Lamosh, Lam waladach, Langa holo, Layo, leka, Lela, Leyla gobale, Lien, Lizolo, L'ob akila, Lonbeu a cha, Lontu Holo, Luzolo,
Mancala, Mandiare, Manga, Mangala, Mangola, Mankala, Manqala, Manquala, Marabout, Marany, Maruba, Mazageb, Mbangi, Mbau, Mbelete, Mbere, Mbo, Mbothe, Mefuhva, Meusueb, Mewelad, Mofuba, Moro gbegele, Motiq, Msuwa, Mulabalaba, Mungala, Mutiteba, Mwambalula, Mweiso, Mweso,
Nakabile, Nambayi, Naranj, Ncholokoto, Nchomvwa, Nchuba, Nchuwa, Ndoto, Ngar, Njombwa, Nocholokoto, Nsolo, Nsumbi, Ntchuwa, Nummun,
Oko, Olinda, Okwe, Omweeso, Omweso, Otep, Otjitoko, Ot jun, Otra, Ot tjin, Otu, Oure, Ouri, Ourin, Ourre, Ourri, Oware, Owela, Palankuli, Pallamkurie, Pallam kuzhi, Pallanguli, Pallankuli, Pandi, Papadakon, Papandata, Pensur, Pereauni, Peresouni, Poo, Qaluta, Qasuta, Qelat, Ryakati,
Saddeka, Sadeka, Sadiqa, Schach, Serata, Sig, Solo, Sombi, Songo, Soro, Spreta, Sulus ni!shtaw, Sunca, Sungka, Tagega, Tamtam apachi, Tap, Tapata, Tchanka, Tchokajon, Tchonkkak, Tchoukaitlon, Tchukaruma, Tegre, Tjonglak, Toguz xorgol, Toi, Tonka, Topuz xorgol, Tchuba, Tchela, Tshuba, Tshi solo, Tsoro,
Ubao, Ugwasi, Um el bagara, Um el banat, Um el tuweisat, Urdy, Ure, Vai lung thlan, Wale, Walle, Walu, Walya, Ware, Wari, Warri, Wawee, Wawi, Weg, Woaley, Wori, Woribo, Woro, Wouri, Wuli, Wuri, Xorgol, Yada, Yit nuri, Yovodji.

Examples

			Triangle begins:
0,
1,
2, 0,
2, 1,
3, 1, 0,
3, 1, 1,
4, 2, 0, 0,
4, 2, 0, 1,
4, 2, 2, 0,
4, 2, 2, 1,
5, 3, 1, 1, 0,
5, 3, 1, 1, 1,
6, 4, 2, 0, 0, 0,
6, 4, 2, 0, 0, 1,
6, 4, 2, 0, 2, 0,
6, 4, 2, 0, 2, 1,
6, 4, 2, 3, 1, 0,
6, 4, 2, 3, 1, 1,
7, 5, 3, 1, 2, 0, 0,
7, 5, 3, 1, 2, 0, 1
...
		

References

  • Y. David, On a sequence generated by a sieving process, Riveon Lematematika, 11 (1957), 26-31.
  • C. Zaslavsky, Africa Counts: Number and Pattern in Traditional African Culture, Boston: Prindle, Weber and Schmidt, 1973.

Crossrefs

Programs

  • Mathematica
    s[list_] := Module[{x = Append[list, 0], i = 1}, While[x[[i]] =!= 0, x[[i]] = x[[i]] - 1; i = i + 1]; x[[i]] = i;If[Last@x == 0, Most[x], x]]; Flatten[Reverse /@ NestList[s, {}, 20]] (* Birkas Gyorgy, Feb 26 2011 *)

Formula

To get the next row in the triangle, find the rightmost zero entry in the current row (which may be to the left of the existing entries). In this zero is in position k (counting from the right), change it from 0 to k and subtract 1 from all the entries to its right.

Extensions

Additional references from Labos Elemer, Nov 07 2000
Revised by N. J. A. Sloane, Jul 16 2012

A104706 First terms in the rearrangements of integer numbers (see comments).

Original entry on oeis.org

1, 2, 3, 1, 4, 5, 1, 2, 6, 1, 7, 3, 1, 2, 8, 1, 9, 4, 1, 2, 10, 1, 3, 11, 1, 2, 5, 1, 12, 13, 1, 2, 3, 1, 4, 6, 1, 2, 14, 1, 15, 3, 1, 2, 7, 1, 5, 4, 1, 2, 16, 1, 3, 17, 1, 2, 8, 1, 18, 6, 1, 2, 3, 1, 4, 19, 1, 2, 5, 1, 9, 3, 1, 2, 20, 1, 21, 4, 1, 2, 7, 1, 3, 10, 1, 2, 22, 1, 5, 6, 1, 2, 3, 1, 4, 23, 1
Offset: 1

Views

Author

Zak Seidov, Mar 19 2005

Keywords

Comments

Take the sequence of natural numbers:
s0=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
Move the first term s(1)=1 to 2*1 places to the right:
s1=2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,
Move the first term s(1)=2 to 2*2 places to the right:
s2=3,1,4,5,2,6,7,8,9,10,11,12,13,14,15,16,
Repeating the procedure we get successively:
s3=1,4,5,2,6,7,3,8,9,10,11,12,13,14,15,16,
s4=4,5,1,2,6,7,3,8,9,10,11,12,13,14,15,16,
s5=5,1,2,6,7,3,8,9,4,10,11,12,13,14,15,16,
s6=1,2,6,7,3,8,9,4,10,11,5,12,13,14,15,16,
.......................................................................
s100=8,3,1,2,24,25,4,5,12,7,6,26,9,27,13,28,29,10,14,30,31,15,11,
32,33,16,34,35,17,36,37,18,38,39,19,40,41,20,42,43,21,44,45,22,
46,47,23,48,49,50,51,52,53,54,55,56,57,58,59,60,
The sequence A104706 gives the first terms in the rearrangements s0,s1,s2,...,s100. Cf. A104705

Crossrefs

Programs

  • Maple
    A104706:= proc(N) # to produce a(1) .. a(N)
        local A, R, n,M;
        M:= N;
        R:= $1..M;
        A[1]:= 1;
        for n from 2 to N do
           if 2*R[1]+1 > M then
             R:= R, [$M+1..M+N]
           fi;
           R:= R[2..2*R[1]+1],R[1],R[2*R[1]+2..N];
           A[n]:= R[1];
        od:
        seq(A[n], n=1..N);
    end proc:
    A104706(100); # Robert Israel, Dec 04 2015
  • Mathematica
    s=Range[100];bb={1};Do[s=Drop[Insert[s, s[[1]], 2+2s[[1]]], 1];bb=Append[bb, s[[1]]], {i, 100}];bb
    NestList[Rest[Insert[#, #[[1]], 2 + 2 #[[1]]]] &, Range[30], 30][[All, 1]] (* Birkas Gyorgy, Mar 03 2011 *)
  • Sage
    def A104706(n):
        m, N = 2, 2*n-1
        while true:
            if m.divides(N): return m-2
            N = N*(m-1)//m
            m += 1
    print([A104706(n) for n in (1..97)]) # Peter Luschny, Dec 04 2015

Formula

a(n) = A028920(2n-1)-1. - Benoit Cloitre, Mar 09 2007

A364448 Lexicographically earliest sequence where n is banned for n^2 terms after each appearance.

Original entry on oeis.org

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, 4, 1, 2, 1, 11, 1, 12, 1, 2, 1, 3, 1, 6, 1, 2, 1, 13, 1, 4, 1, 2, 1, 3, 1, 5, 1, 2, 1, 7, 1, 14, 1, 2, 1, 3, 1, 4, 1, 2, 1, 15, 1, 16, 1, 2, 1, 3, 1, 8, 1, 2, 1, 5, 1, 4
Offset: 1

Views

Author

Rok Cestnik, Jul 25 2023

Keywords

Comments

After 12427560 terms the sequence is periodic with period 2985984. The largest periodic term is 158.
The largest term is 159 which appears only 3 times: a(4942686), a(7756992) and a(9818928).
If banning for n terms the sequence just repeats [1,2,1,3] (A364447). If banning for n^3 terms the sequence continues growing forever (A364449).
The first 41 terms are shared with A028920.

Examples

			a(n)   ban 1  2  3  4  5  6  7  ...
 1         |  |  |  |  |  |  |
 2         x  |  |  |  |  |  |
 1         |  x  |  |  |  |  |
 3         x  x  |  |  |  |  |
 1         |  x  x  |  |  |  |
 4         x  x  x  |  |  |  |
 1         |  |  x  x  |  |  |
 2         x  |  x  x  |  |  |
 1         |  x  x  x  |  |  |
 5         x  x  x  x  |  |  |
 1         |  x  x  x  x  |  |
 6         x  x  x  x  x  |  |
 1         |  |  x  x  x  x  |
 2         x  |  |  x  x  x  |
 1         |  x  |  x  x  x  |
 3         x  x  |  x  x  x  |
 1         |  x  x  x  x  x  |
 7         x  x  x  x  x  x  |
 .
 .
 .
		

Crossrefs

Programs

  • C
    #include
    int main(void){
        int N = 1000;
        int *a = (int*)malloc((N+1)*sizeof(int));
        int *ban = (int*)malloc(160*sizeof(int));
        for(int n = 0; n < N; ++n){
            for(int can = 1; can < 160; ++can){
                if(ban[can] == 0){
                    a[n] = can;
                    ban[can] = can*can+1;
                    break;
                }
            }
            for(int can = 1; can < 160; ++can) if(ban[can]) --ban[can];
        }
        free(a); free(ban);
        return 0;
    }
  • Python
    a = []
    ban = [0 for n in range(160)]
    for i in range(1000):
        can = ban.index(0,1)
        ban = [max(b-1,0) for b in ban]
        a.append(can)
        ban[can] = can**2
    

Formula

a(n) = a(n-2985984) for n >= 15413545.

A130747 A self-referential sequence related to Mancala solitaire (see comment).

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 1, 7, 3, 8, 2, 9, 1, 10, 4, 11, 1, 12, 2, 13, 5, 14, 3, 15, 1, 16, 6, 17, 1, 18, 2, 19, 7, 20, 4, 21, 1, 22, 8, 23, 3, 24, 1, 25, 9, 26, 5, 27, 2, 28, 10, 29, 1, 30, 1, 31, 11, 32, 6, 33, 4, 34, 12, 35, 3, 36, 2, 37, 13, 38, 7, 39, 1, 40, 14, 41
Offset: 1

Views

Author

Benoit Cloitre, Jul 12 2007

Keywords

Comments

To build the sequence, start from:
1,,2,,3,,4,,5,,6,,7,,8,,9,,10,,11,,12,,...
At the n-th step use the rule: " fill a(n)-th hole with a(n) " (holes are numbered from 1 at each step)
So step 1 is "fill first hole with 1", giving:
1,1,2,,3,,4,,5,,6,,7,,8,,9,,10,,11,,12,_,...
Since a(2)=1, step 2 is still "fill first hole with 1", giving:
1,1,2,1,3,,4,,5,,6,,7,,8,,9,,10,,11,,12,,...
Since a(3)=2, step 3 is "fill second hole with 2", giving:
1,1,2,1,3,,4,2,5,,6,,7,,8,,9,,10,,11,,12,_,...
Since a(4)=1, step 4 is "fill first hole with 1", giving:
1,1,2,1,3,1,4,2,5,,6,,7,,8,,9,,10,,11,,12,,...
Since a(5)=3, step 5 is "fill third hole with 3", giving:
1,1,2,1,3,1,4,2,5,,6,,7,3,8,,9,,10,,11,,12,_,...
Iterating the process indefinitely yields:
1,1,2,1,3,1,4,2,5,1,6,1,7,3,8,2,9,1,10,4,11,1,12,2,13,5,...
Indices where 1's occur are n=1,2,4,6,10,... which are the smallest number of stones in Mancala solitaire which make use of the n-th hole. If f(k) denotes this sequence then lim_{k->oo} k^2/f(k) = Pi.
Ordinal transform of A028920. - Benoit Cloitre, Aug 03 2007
Although A028920 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
a(A002491(n)) = 1. - Reinhard Zumkeller, Jun 23 2009
A082447(n) = number of ones <= n. - Reinhard Zumkeller, Jul 01 2009
From Benoit Cloitre, Jul 17 2022: (Start)
Another way (less self-referent) to construct the sequence.
Step 1: Let's start from the integers separated by a hole:
1,,2,,3,,4,,5,,6,,7,,8,,9,,10,,11,,12,,...
Step 2: Put integers in the holes leaving 2 holes between each integer giving:
1,*1*,2,,3,,4,*2*,5,,6,,7,*3*,8,,9,,10,*4*,11,,12,,...
Step 3: Put integers in the holes leaving 3 holes between each integer giving:
1,1,2,*1*,3,,4,2,5,,6,,7,3,8,*2*,9,,10,4,11,,12,,...
Step 4: Put integers in the holes leaving 4 holes between each integer giving:
1,1,2,1,3,*1*,4,2,5,,6,,7,3,8,2,9,,10,4,11,,12,*2*,...
Iterating the process yields the sequence
1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 1, 7, 3, 8, 2, 9, 1, 10, 4, 11, 1, 12, 2,... (End)

References

  • Benoit Cloitre, Pi in a hole, in preparation, 2007
  • Y. David, On a sequence generated by a sieving process, Riveon Lematematika, 11(1957), 26-31.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.4.7.

Crossrefs

Cf. A002491.

Programs

A359027 A line of empty cells is filled by successive terms t >= 1 with t+1 copies of t and gaps of t empty cells between them.

Original entry on oeis.org

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

Views

Author

Tamas Sandor Nagy, Dec 12 2022

Keywords

Comments

We write 1 into the first cell, then by leaving a gap of one empty cell we write another 1 into the third cell.
Next, we write 2 into the first available empty cell, then write two more 2's by leaving gaps of two empty cells between them. And so on.
It appears that the absolute values of A166711 appear in order nicely embedded into this sequence. - Thomas Scheuerle, Dec 12 2022

Examples

			Cell filling begins, starting from an empty line:
  | | | | | | | | | | | | | | | | | | |
  .
  |1| |1| | | | | | | | | | | | | | | |
  .
  |1|2|1| | |2| | |2| | | | | | | | | |
  .
  |1|2|1|3| |2| | |2|3| | | |3| | | |3|
		

Crossrefs

Cf. A166711.
Cf. A028920 (with infinite copies).

Programs

  • MATLAB
    function a = A359027( max_n )
        a = zeros(1,max_n);
        f = 1:max_n; k = 1;
        while ~isempty(f)
            j = f(1:(k+1):end);
            a(j(j(1:min(k+1,length(j))) <= max_n )) = k;
            k = k+1;
            f = find(a == 0);
        end
    end % Thomas Scheuerle, Dec 12 2022
Showing 1-9 of 9 results.