cp's OEIS Frontend

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.

A091626 Number of ordered integer pairs (b,c) with 0 <= b, c <= n such that both roots of x^2+bx+c=0 are integers.

This page as a plain text file.
%I A091626 #44 Feb 16 2025 08:32:52
%S A091626 1,2,4,6,9,11,14,16,19,22,25,27,31,33,36,39,43,45,49,51,55,58,61,63,
%T A091626 68,71,74,77,81,83,88,90,94,97,100,103,109,111,114,117,122,124,129,
%U A091626 131,135,139,142,144,150,153,157,160,164,166,171,174,179,182,185,187
%N A091626 Number of ordered integer pairs (b,c) with 0 <= b, c <= n such that both roots of x^2+bx+c=0 are integers.
%C A091626 Also number of ordered pairs of nonnegative integers (i, j) such that i+j <= n and i*j <= n. - _Seiichi Manyama_, Sep 04 2021
%H A091626 Griffin N. Macris, <a href="/A091626/b091626.txt">Table of n, a(n) for n = 0..9999</a>
%H A091626 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/QuadraticEquation.html">Quadratic Equation</a>
%F A091626 a(n) = a(n-1) + ceiling(tau(n)/2) + 1, n>1. - _Vladeta Jovovic_, Jun 12 2004
%F A091626 a(n) = n + floor(sqrt(n))/2 + A006218(n)/2, n>0. - _Griffin N. Macris_, Jun 14 2016
%e A091626 The six quadratics for a(3)=6 and their roots are as follows:
%e A091626 x^2 + 0*x + 0; x=0.
%e A091626 x^2 + 1*x + 0; x=0, x=-1.
%e A091626 x^2 + 2*x + 0; x=0, x=-2.
%e A091626 x^2 + 2*x + 1; x=-1.
%e A091626 x^2 + 3*x + 0; x=0, x=-3.
%e A091626 x^2 + 3*x + 2; x=-1, x=-2.
%t A091626 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_ *)
%o A091626 (PARI) a(n) = sum(i=0, n, sum(j=i, n-i, i*j<=n)); \\ _Seiichi Manyama_, Sep 04 2021
%o A091626 (Python)
%o A091626 from math import isqrt
%o A091626 def A091626(n):
%o A091626     m = isqrt(n)
%o A091626     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
%Y A091626 Cf. A000005, A006218, A038548, A067274, A091627.
%K A091626 nonn
%O A091626 0,2
%A A091626 _Eric W. Weisstein_, Jan 24 2004