%I #69 Jan 26 2024 06:52:59
%S 0,1,2,2,3,3,4,4,4,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,9,9,9,9,9,10,10,10,
%T 10,10,10,11,11,11,11,11,11,12,12,12,12,12,12,12,13,13,13,13,13,13,13,
%U 14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16
%N n appears 1+[n/2] times.
%C The PARI functions t1, t2 can be used to read a triangular array T(n,k) (n >= 0, 0 <= k <= floor(n/2)) by rows from left to right: n -> T(t1(n), t2(n)).
%C a(n) gives the number of distinct positive values taken by [n/k]. E.g., a(5)=3: [5/{1,2,3,4,5}]={5,2,1,1,1}. - _Marc LeBrun_, May 17 2001
%C This sequence gives the elements in increasing order of the set {i+2j} where i>=0, j>=0. - _Benoit Cloitre_, Sep 22 2012
%H Vincenzo Librandi, <a href="/A055086/b055086.txt">Table of n, a(n) for n = 0..1000</a>
%H Randell Heyman, <a href="https://arxiv.org/abs/1905.00533">Cardinality of a floor function set</a>, arXiv:1905.00533 [math.NT], 2019.
%H Michael Somos, <a href="/A073189/a073189.txt">Sequences used for indexing triangular or square arrays</a>, 2003.
%F a(n) = [sqrt(4*n + 1)] - 1 = A000267(n) - 1.
%F a(n) = Sum_{k=1..n} A063524(A075993(n, k)), for n>0. - _Reinhard Zumkeller_, Apr 06 2006
%F a(n) = ceiling(2*sqrt(n+1)) - 2. - _Mircea Merca_, Feb 05 2012
%F a(0) = 0, then for n>=1 a(n) = 1 + a(n-1-floor(a(n-1)/2)). - _Benoit Cloitre_, May 08 2017
%F a(n) = floor(b) + floor(n/(floor(b)+1)) where b = (sqrt(4*n+1)-1)/2. - _Randell G Heyman_, May 08 2019
%F Sum_{k>=1} (-1)^(k+1)/a(k) = Pi/8 + 3*log(2)/4. - _Amiram Eldar_, Jan 26 2024
%t Flatten[Table[Table[n,{Floor[n/2]+1}],{n,0,20}]] (* _Harvey P. Dale_, Mar 07 2014 *)
%o (PARI) {a(n) = floor(sqrt(4*n + 1)) - 1}
%o (PARI) t1(n)=floor(sqrt(1+4*n)-1) /* A055086 */
%o (PARI) t2(n)=(1+4*n-sqr(floor(sqrt(1+4*n))))\4 /* A055087 */
%o (PARI) a(n)=if(n<1,0,a(n-1-a(n-1)\2)+1) \\ _Benoit Cloitre_, May 09 2017
%Y Cf. A000267, A055087, A063524, A075993.
%Y Cf. A067514.
%K nonn,easy
%O 0,3
%A _Michael Somos_, Jun 13 2000