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 A128218 #12 Jan 16 2025 08:47:37 %S A128218 1,3,1,3,1,1,5,1,1,1,5,1,1,1,1,7,1,1,1,1,1,7,1,1,1,1,1,1,9,1,1,1,1,1, %T A128218 1,1,9,1,1,1,1,1,1,1,1,11,1,1,1,1,1,1,1,1,1,11,1,1,1,1,1,1,1,1,1,1,13, %U A128218 1,1,1,1,1,1,1,1,1,1,1,13,1,1,1,1,1,1,1,1,1,1,1,1,15,1,1,1,1,1,1,1,1,1,1,1 %N A128218 First differences of A128217. %C A128218 a(A130883(n-1)) = 2*n-1 and a(m) != 2*n-1 for m < A130883(n-1). - _Reinhard Zumkeller_, Jun 20 2015 %H A128218 Antti Karttunen, <a href="/A128218/b128218.txt">Table of n, a(n) for n = 1..20000</a> %F A128218 Let A(1)={1}. Then, for k=2,3,4,..., form A(k) by appending to A(k-1) the term k-1 followed by k-1 1's, if k is even, or by appending to A(k-1) the term k followed by k-1 1's, if k is odd. {a(n)} appears to be the limit of {A(k)} as k->infinity. %t A128218 nsrQ[n_]:=Module[{sr=Sqrt[n]},Abs[First[sr-Nearest[{Floor[sr], Ceiling[ sr]}, sr]]]<1/4];Differences[Select[Range[0,250],nsrQ]] (* _Harvey P. Dale_, May 02 2012 *) %o A128218 (Haskell) %o A128218 a128218 n = a128218_list !! (n-1) %o A128218 a128218_list = zipWith (-) (tail a128217_list) a128217_list %o A128218 -- _Reinhard Zumkeller_, Jun 20 2015 %o A128218 (PARI) %o A128218 default(realprecision, 10000); %o A128218 is_A128217(n) = ((abs(sqrt(n)-sqrtint(n))<(1/4)) || (abs(sqrt(n)-(1+sqrtint(n)))<(1/4))); %o A128218 k=0; n=0; prevm=0; while(k<20000, n++; if(is_A128217(n), k++; write("b128218.txt", k, " ", (n-prevm)); prevm = n)); \\ _Antti Karttunen_, Jan 16 2025 %Y A128218 Cf. A128127. %Y A128218 Cf. A130883, A152271 (run lengths after initial term). %K A128218 nonn %O A128218 1,2 %A A128218 _John W. Layman_, Feb 19 2007 %E A128218 Offset changed by _Reinhard Zumkeller_, Jun 20 2015