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.

A335640 Numbers k of the form r^2 - t*r*s + s^2, where r, s and t are positive integers, r + s = k and t < r <= s.

This page as a plain text file.
%I A335640 #31 Apr 04 2023 22:10:48
%S A335640 4,9,16,25,36,45,49,64,81,96,100,121,144,169,175,196,225,256,288,289,
%T A335640 320,324,361,400,441,484,529,576,625,640,676,729,784,841,891,900,961,
%U A335640 1024,1089,1156,1200,1225,1296,1350,1369,1444,1521,1573,1600,1681,1764,1849,1936,2016
%N A335640 Numbers k of the form r^2 - t*r*s + s^2, where r, s and t are positive integers, r + s = k and t < r <= s.
%C A335640 From _Robert Israel_, Apr 03 2023: (Start)
%C A335640 Includes m^2 for m >= 2: for k = m^2. take t = 2, r = (m^2 - m)/2, s = (m^2 + m)/2.
%C A335640 Includes A152618(n) = (n-1)^2*(n+1) for n >= 3: take t = n - 1, r = n^2 - n, s = n^3 - 2*n^2 + 1.
%C A335640 Another infinite family of solutions: t = 3, r = y - 1, s = (x + 3*y)/2 - 1, k = (x + 5*y)/2 - 2 where x and y satisfy the Pell-type equation x^2 + 4 = 5*y^2.
%C A335640 (End)
%e A335640 9 is in the sequence since 9 = 3^2 - 2*3*6 + 6^2.
%p A335640 N:= 3000: # for terms <= N
%p A335640 R:= {4}:
%p A335640 for t from 2 to N/2 do
%p A335640   for r from t+1 to N/2 do
%p A335640     c:= r^2-r;
%p A335640     b:= 1+t*r;
%p A335640     delta:= b^2 - 4*c;
%p A335640     if not issqr(delta) then next fi;
%p A335640     delta:= sqrt(delta);
%p A335640     S:= select(x -> x::posint and x >= r and r+x <= N, {(b+delta)/2,(b-delta)/2});
%p A335640     R:= R union map(`+`,S,r);
%p A335640 od od:
%p A335640 sort(convert(R,list)); # _Robert Israel_, Apr 04 2023
%t A335640 Table[If[Sum[Sum[KroneckerDelta[i^2 - k*i (n - i) + (n - i)^2, n], {k, i - 1}], {i, Floor[n/2]}] > 0, n, {}], {n, 200}] // Flatten
%Y A335640 Cf. A000290, A152618.
%K A335640 nonn
%O A335640 1,1
%A A335640 _Wesley Ivan Hurt_, Oct 04 2020