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 A196126 #26 Aug 07 2013 16:53:11 %S A196126 1,2,4,7,10,14,19,25,32,39,47,56,66,77,89,102,115,129,144,160,177,195, %T A196126 214,234,255,276,298,321,345,370,396,423,451,480,510,541,572,604,637, %U A196126 671 %N A196126 Let A = {(x,y): x, y positive natural numbers and y <= x <= y^2}. a(n) is the cardinality of the subset {(x,y) in A such that x <= n}. %C A196126 The set A locates integer points in the first quadrant above the parabola y=sqrt(x) up to the diagonal y=x. a(n) counts them up to a sliding right margin. %C A196126 The first differences of the sequence are 1, 2, 3, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, .... %C A196126 In that way the sequence is constructed from first differences which are the natural numbers and repetitions for 3, 7, 13, 21, 31, 43, 57, 73, 91,...., (apparently the elements of A002061 starting at 3). %F A196126 a(n) = u*(u+1)*(2*u+1)/6 - u*(u-1)/2 + (n-u)*(n-u+1)/2, where u = floor(sqrt(n)) = A000196(n). %e A196126 The set is A = {(1,1),(2,2),(3,2),(4,2),(3,3),(4,3),(5,3),(6,3),(7,3),(8,3),(9,3),(4,4),(5,4),...}. %e A196126 a(1) = 1 that is the number of elements in {(1,1)}, %e A196126 a(2) = 2 that is the number of elements in {(1,1),(2,2)} and %e A196126 a(3) = 4 that is the number of elements in {(1,1),(2,2),(3,2),(3,3)}, ... %t A196126 (* Calculates a(n) using the definition of the sequence. *) %t A196126 data = Flatten[Table[Table[{k, n}, {k, n, n^2}], {n, 1, 40}], 1]; %t A196126 Table[Length[Select[data, #[[1]] <= m &]], {m, 1, 40}] %t A196126 (* Calculates a(n) using a formula. *) %t A196126 ff[t_] := Block[{u}, u = Floor[Sqrt[t]]; u (u + 1) (2 u + 1)/6 - u (u - 1)/2 + (t - u) (t - u + 1)/2]; Table[ff[t], {t, 1, 40}] %o A196126 (PARI) a(n)=my(u=sqrtint(n));u*(u^2+2)/3+(n-u)*(n-u+1)/2 \\ _Charles R Greathouse IV_, Oct 05 2011 %K A196126 nonn,easy %O A196126 1,2 %A A196126 Taishi Inoue, Hiroshi Matsui, and _Ryohei Miyadera_, Sep 27 2011 %E A196126 Entry rewritten by _R. J. Mathar_, Jan 28 2012