|
|
A067274
|
|
Number of ordered integer pairs (b,c), with -n<=b<=n, -n<=c<=n, such that both roots of x^2+bx+c=0 are integers.
|
|
10
|
|
|
1, 4, 10, 16, 25, 31, 41, 47, 57, 66, 76, 82, 96, 102, 112, 122, 135, 141, 155, 161, 175, 185, 195, 201, 219, 228, 238, 248, 262, 268, 286, 292, 306, 316, 326, 336, 357, 363, 373, 383, 401, 407, 425, 431, 445, 459, 469, 475, 497, 506, 520, 530, 544, 550, 568
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Conjecture: The difference a(n)-a(n-1) is 6 if and only if n is a prime number. This has been checked up to about n=300 and may be easy to prove.
Preceding conjecture is a corollary of Jovovic's formula below. - Eric M. Schmidt, Aug 19 2012
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
a[n_] := If[n >= 1, 2 Sum[Length[Divisors[k]], {k, n}] + Floor[Sqrt[n]] + 2 n - 1]; Join[{1}, Table[a[n], {n, 50}]] (* Lorenz H. Menke, Jr., Apr 13 2016 *)
|
|
PROG
|
(Sage)
res = [1]
term = 4
for ii in range(1, max+1) :
res += [term]
term += 2 * (number_of_divisors(ii+1) + 1) + is_square(ii+1)
return res
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|