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 A095114 #38 Oct 08 2015 09:09:02 %S A095114 1,2,4,6,9,12,16,20,24,29,34,39,45,51,57,63,70,77,84,91,99,107,115, %T A095114 123,132,141,150,159,168,178,188,198,208,218,229,240,251,262,273,285, %U A095114 297,309,321,333,345,358,371,384,397,410,423,437,451,465,479,493,507,522 %N A095114 a(1)=1. a(n) = a(n-1) + (number of elements of {a(1),...,a(n-1)} that are <= n-1). %C A095114 Every positive integer is either of the form a(n)+n-1 or of the form a(n+1)-a(n)+n, but not both. %C A095114 The sequence a(n)+n-1 is A109512. - _Robert Price_, Apr 16 2013 %C A095114 The sequence a(n+1)-a(n)+n is A224731. - _Robert Price_, Apr 16 2013 %C A095114 Equals A001463 + 1, the partial sums of Golomb's sequence A001462. - _Ralf Stephan_, May 28 2004 %C A095114 a(n) is the position of the first occurrence of n in A001462, i.e., A001462(a(n)) = n and A001462(m) < n for m < a(n). - _Reinhard Zumkeller_, Feb 09 2012 [Explanation added and first inequality corrected from A001462(m) < m by _Glen Whitney_, Oct 06 2015] %H A095114 Reinhard Zumkeller, <a href="/A095114/b095114.txt">Table of n, a(n) for n = 1..10000</a> %e A095114 3 elements of {a(1),...,a(4)} are <= 4, so a(5) = a(4) + 3 = 9. %p A095114 a[1]:= 1; m:= 0; %p A095114 for n from 2 to 100 do %p A095114 if a[m+1] <= n-1 then m:= m+1 fi; %p A095114 a[n]:= a[n-1]+m; %p A095114 od: %p A095114 seq(a[i],i=1..100); # _Robert Israel_, Oct 07 2015 %t A095114 a[1]=1; a[n_]:=a[n]=a[n-1]+Length[Select[a/@Range[n-1], #<n&]] %o A095114 (PARI) a(n) = sum(k=1, n-1, t(k)) + 1; %o A095114 t(n)=local(A, t, i); if(n<3, max(0, n), A=vector(n); t=A[i=2]=2; for(k=3, n, A[k]=A[k-1]+if(t--==0, t=A[i++ ]; 1)); A[n]); %o A095114 vector(100, n, a(n)) \\ _Altug Alkan_, Oct 06 2015 %o A095114 (Haskell) %o A095114 a095114 n = a095114_list !! (n-1) %o A095114 a095114_list = 1 : f [1] 1 where %o A095114 f xs@(x:_) k = y : f (y:xs) (k+1) where %o A095114 y = x + length [z | z <- xs, z <= k] %o A095114 -- _Reinhard Zumkeller_, Feb 09 2012 %Y A095114 Equals A001463(n) + 1. %Y A095114 Cf. A109512, A224731. %K A095114 nonn %O A095114 1,2 %A A095114 _Dean Hickerson_, following a suggestion of _Leroy Quet_, May 28 2004