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.
%I A100002 #38 Dec 14 2024 03:59:55 %S A100002 1,2,1,2,3,3,1,2,4,4,3,4,1,2,5,5,3,5,1,2,4,5,3,4,6,6,1,2,6,3,7,7,6,4, %T A100002 7,7,5,6,1,2,5,3,8,8,7,4,8,8,1,2,6,7,3,6,5,8,4,8,5,6,9,9,1,2,9,3,10, %U A100002 10,9,4,10,10,7,8,9,5,7,10,1,2,9,7,3,4,9,6,11,11,10,11 %N A100002 Start with a sequence of 1's, then replace every other 1 with a 2; then replace every third of the remaining 1's with a 3 and every third of the remaining 2's with a 3; then replace every fourth remaining 1, 2 or 3 with a 4; and so on. The limiting sequence is shown here. %C A100002 The position of the 1's is given by A000960. - _T. D. Noe_, Oct 26 2004 %H A100002 T. D. Noe, <a href="/A100002/b100002.txt">Table of n, a(n) for n = 1..10000</a> %H A100002 T. D. Noe, <a href="/A098119/a098119.gif">Plot of first 5000 terms</a> %H A100002 A <a href="http://www.google.com/groups?selm=clhfm9%243eu%241%40news.ks.uiuc.edu">post</a> on sci.math.research newsgroup. %F A100002 a(1, j)=1 for all j>=1; a(n, j)=a(n-1, j) except when #{i<=j s.t. a(n-1, i)=a(n-1, j)} is multiple of n, in which case a(n, j)=n; a(j) is the limit of the (stationary) a(n, j) when n tends to infinity. %F A100002 It appears that the maximal value among the first n terms grows like sqrt(4n/3). %F A100002 Note that the first occurrence of n is bounded by A000960; that is, A100287(n) <= A000960(n), with equality only for n=1. - _T. D. Noe_, Nov 12 2004 %e A100002 Here are the first 6 stages in the construction: %e A100002 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1... %e A100002 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2... %e A100002 1 2 1 2 3 3 1 2 1 2 3 3 1 2 1 2 3 3 1 2 1 2 3 3 1 2 1 2 3 3... %e A100002 1 2 1 2 3 3 1 2 4 4 3 4 1 2 1 2 3 3 1 2 4 4 3 4 1 2 1 2 3 3... %e A100002 1 2 1 2 3 3 1 2 4 4 3 4 1 2 5 5 3 5 1 2 4 5 3 4 1 2 1 2 3 3... %e A100002 1 2 1 2 3 3 1 2 4 4 3 4 1 2 5 5 3 5 1 2 4 5 3 4 6 6 1 2 6 3... %e A100002 ... %t A100002 nn=100; t=Table[1, {nn}]; done=False; k=1; While[ !done, k++; cnt=Table[0, {k-1}]; Do[If[t[[i]]<k, cnt[[t[[i]]]]++; If[Mod[cnt[[t[[i]]]], k]==0, t[[i]]=k]], {i, nn}]; done=(Max[cnt]<k)]; t (* _T. D. Noe_ *) %t A100002 a[n_] := Fold[Function[{b1, b2},Fold[Function[{a1, a2},ReplacePart[a1, Pick[Position[a1, a2], Take[Flatten[Array[{Array[0 &, b2 - 1], 1} &, Length[a1]]], Length[Position[a1, a2]]], 1] -> b2]], b1, Range[b2 - 1]]], Array[1 &, n], Range[2, 2 Sqrt[n/Pi] + 1]]; a[100] (* _Birkas Gyorgy_, Feb 06 2011 *) %o A100002 (C) %o A100002 #define MAXVAL 2048 /* Large enough... */ %o A100002 unsigned int counts[MAXVAL][MAXVAL]; /* Initialized at all 0 */ unsigned int seq_value (void) /* Successive calls return values in the sequence, in order. */ { unsigned int value; unsigned int i; value = 1; for ( i=2; i<MAXVAL; i++ ) if ( ++counts[i][value] >= i ) { counts[i][value] = 0; value = i; } return value; } %Y A100002 Cf. A100287 (first occurrence of n). %K A100002 easy,nice,nonn %O A100002 1,2 %A A100002 _David A. Madore_, Oct 25 2004