login

Revision History for A330407

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of ordered integer pairs (b,c) with -n <= b <= n and -n <= c <= n such that both roots of x^2 + b*x + c = 0 are distinct integers.
(history; published version)
#28 by Alois P. Heinz at Thu Jan 30 17:45:54 EST 2020
STATUS

reviewed

approved

#27 by Hugo Pfoertner at Thu Jan 30 13:33:11 EST 2020
STATUS

proposed

reviewed

#26 by Michel Marcus at Thu Jan 30 13:23:06 EST 2020
STATUS

editing

proposed

#25 by Michel Marcus at Thu Jan 30 13:22:06 EST 2020
DATA

0, 3, 7, 13, 20, 26, 36, 42, 52, 59, 69, 75, 89, 95, 105, 115, 126, 132, 146, 152, 166, 176, 186, 192, 210, 217, 227, 237, 251, 257, 275, 281, 295, 305, 315, 325, 344, 350, 360, 370, 388, 394, 412, 418, 432, 446, 456, 462, 484, 491, 505, 515, 529, 535, 553, 563, 581

OFFSET

1,1

0,2

MATHEMATICA

ok[b_, c_] := Block[{d = b^2 - 4 c}, d > 0 && IntegerQ@ Sqrt@ d]; a[n_] := Sum[ Boole@ ok[b, c], {b, -n, n}, {c, -n, n}]; Array[a, 5057, 0] (* Giovanni Resta, Jan 28 2020 *)

PROG

(Python 3.7) [sum([1 for b in range(-n, n+1) for c in range(-n, n+1) if b**2-4*c > 0 and int((-b+(b**2-4*c)**0.5)/2) == (-b+(b**2-4*c)**0.5)/2]) for n in range(1, 0, 101)]

EXTENSIONS

a(0)=0 prepended by Michel Marcus, Jan 30 2020

STATUS

approved

editing

Discussion
Thu Jan 30
13:23
Michel Marcus: when n=0, x^2 has both roots 0, so not distinct , so a(0)=0
#24 by Giovanni Resta at Wed Jan 29 16:01:38 EST 2020
STATUS

reviewed

approved

#23 by Andrey Zabolotskiy at Wed Jan 29 12:24:31 EST 2020
STATUS

proposed

reviewed

#22 by Andrey Zabolotskiy at Wed Jan 29 12:24:28 EST 2020
STATUS

editing

proposed

#21 by Andrey Zabolotskiy at Wed Jan 29 12:24:19 EST 2020
FORMULA

a(n) = A067274(n) - A001650(n+1) for n > 1.

STATUS

proposed

editing

#20 by Michel Marcus at Tue Jan 28 13:22:57 EST 2020
STATUS

editing

proposed

#19 by Michel Marcus at Tue Jan 28 13:22:42 EST 2020
PROG

(PARI) isok(b, c) = my(q); (b^2 > 4*c) && issquare(b^2-4*c);

STATUS

proposed

editing