OFFSET
0,2
COMMENTS
Also number of ordered pairs of nonnegative integers (i, j) such that i+j <= n and i*j <= n. - Seiichi Manyama, Sep 04 2021
LINKS
Griffin N. Macris, Table of n, a(n) for n = 0..9999
Eric Weisstein's World of Mathematics, Quadratic Equation
FORMULA
a(n) = a(n-1) + ceiling(tau(n)/2) + 1, n>1. - Vladeta Jovovic, Jun 12 2004
a(n) = n + floor(sqrt(n))/2 + A006218(n)/2, n>0. - Griffin N. Macris, Jun 14 2016
EXAMPLE
The six quadratics for a(3)=6 and their roots are as follows:
x^2 + 0*x + 0; x=0.
x^2 + 1*x + 0; x=0, x=-1.
x^2 + 2*x + 0; x=0, x=-2.
x^2 + 2*x + 1; x=-1.
x^2 + 3*x + 0; x=0, x=-3.
x^2 + 3*x + 2; x=-1, x=-2.
MATHEMATICA
a[n_] := a[n] = a[n-1] + Ceiling[ DivisorSigma[0, n]/2] + 1; a[0]=1; a[1]=2; Table[a[n], {n, 0, 59}] (* Jean-François Alcover, Nov 08 2012, after Vladeta Jovovic *)
PROG
(PARI) a(n) = sum(i=0, n, sum(j=i, n-i, i*j<=n)); \\ Seiichi Manyama, Sep 04 2021
(Python)
from math import isqrt
def A091626(n):
m = isqrt(n)
return 1 if n == 0 else n+sum(n//k for k in range(1, m+1))-m*(m-1)//2 # Chai Wah Wu, Oct 07 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Jan 24 2004
STATUS
approved