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.

A055096 Triangle read by rows, sums of 2 distinct nonzero squares: T(n,k) = k^2+n^2, (n>=2, 1 <= k <= n-1).

This page as a plain text file.
%I A055096 #85 Jun 01 2025 22:52:31
%S A055096 5,10,13,17,20,25,26,29,34,41,37,40,45,52,61,50,53,58,65,74,85,65,68,
%T A055096 73,80,89,100,113,82,85,90,97,106,117,130,145,101,104,109,116,125,136,
%U A055096 149,164,181,122,125,130,137,146,157,170,185,202,221,145,148,153,160
%N A055096 Triangle read by rows, sums of 2 distinct nonzero squares: T(n,k) = k^2+n^2, (n>=2, 1 <= k <= n-1).
%C A055096 Discovered by Bernard Frénicle de Bessy (1605?-1675). - _Paul Curtz_, Aug 18 2008
%C A055096 Terms that are not hypotenuses in primitive Pythagorean triangles, are replaced by 0 in A222946. - _Reinhard Zumkeller_, Mar 23 2013
%C A055096 This triangle T(n,k) gives the circumdiameters for the Pythagorean triangles with a = (n+1)^2 - k^2, b = 2*(n+1)*k and c = (n+1)^2 + k^2 (see the Floor van Lamoen entries or comments A063929, A063930, A002283, A003991). See also the formula section. Note that not all Pythagorean triangles are covered, e.g., (9,12,15) does not appear. - _Wolfdieter Lang_, Dec 03 2014
%H A055096 Reinhard Zumkeller, <a href="/A055096/b055096.txt">Rows n = 2..121 of triangle, flattened</a>
%H A055096 M. de Frénicle, <a href="http://gallica.bnf.fr/ark:/12148/bpt6k5493994j/f17.image">Méthode pour trouver la solutions des problèmes par les exclusions</a>, in: "Divers ouvrages de mathématiques et de physique, par Messieurs de l'Académie royale des sciences", Paris, 1693, pp 1-44.
%H A055096 Antti Karttunen, <a href="http://www.iki.fi/~kartturi/matikka/A055096e.htm">Larger table, showing also locations of 4k+1 primes and squares</a>
%H A055096 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CongruumProblem.html">Congruum Problem.</a>
%H A055096 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%F A055096 a(n) = sum2distinct_squares_array(n).
%F A055096 T(n, 1) = A002522(n).
%F A055096 T(n, n-1) = A001844(n-1).
%F A055096 T(2*n-2, n-1) = A033429(n-1).
%F A055096 T(n,k) = A133819(n,k) + A140978(n,k) = (n+1)^2 + k^2, 1 <= k <= n. - _Reinhard Zumkeller_, Mar 23 2013
%F A055096 T(n, k) = a*b*c/(2*sqrt(s*(s-1)*(s-b)*(s-c))) with s =(a + b + c)/2 and the substitution a = (n+1)^2 - k^2, b = 2*(n+1)*k and c = (n+1)^2 + k^2 (the circumdiameter for the considered Pythagorean triangles). - _Wolfdieter Lang_, Dec 03 2014
%F A055096 From _Bob Selcoe_, Mar 21 2015:  (Start)
%F A055096 T(n,k) = 1 + (n-k+1)^2 + Sum_{j=0..k-2} (4*j + 2*(n-k+3)).
%F A055096 T(n,k) = 1 + (n+k-1)^2 - Sum_{j=0..k-2} (2*(n+k-3) - 4*j).
%F A055096 Therefore: 4*(n-k+1) + Sum_{j=0..k-2} (2*(n-k+3) + 4*j) = 4*n(k-1) - Sum_{j=0..k-2} (2*(n+k-3) - 4*j). (End)
%F A055096 From _G. C. Greubel_, Apr 19 2023: (Start)
%F A055096 T(2*n-3, n-1) = A033429(n-1).
%F A055096 T(2*n-4, n-2) = A079273(n-1).
%F A055096 T(2*n-2, n) = A190816(n).
%F A055096 T(3*n-4, n-1) = 10*A000290(n-1) = A033583(n-1).
%F A055096 Sum_{k=1..n-1} T(n, k) = A331987(n-1).
%F A055096 Sum_{k=1..floor(n/2)} T(n-k, k) = A226141(n-1). (End)
%e A055096 The triangle T(n, k) begins:
%e A055096 n\k   1   2   3   4   5   6   7   8   9  10  11 ...
%e A055096 2:    5
%e A055096 3:   10  13
%e A055096 4:   17  20  25
%e A055096 5:   26  29  34  41
%e A055096 6:   37  40  45  52  61
%e A055096 7:   50  53  58  65  74  85
%e A055096 8:   65  68  73  80  89 100 113
%e A055096 9:   82  85  90  97 106 117 130 145
%e A055096 10: 101 104 109 116 125 136 149 164 181
%e A055096 11: 122 125 130 137 146 157 170 185 202 221
%e A055096 12: 145 148 153 160 169 180 193 208 225 244 265
%e A055096 ...
%e A055096 13: 170 173 178 185 194 205 218 233 250 269 290 313,
%e A055096 14: 197 200 205 212 221 232 245 260 277 296 317 340 365,
%e A055096 15: 226 229 234 241 250 261 274 289 306 325 346 369 394 421,
%e A055096 16: 257 260 265 272 281 292 305 320 337 356 377 400 425 452 481,
%e A055096 ...
%e A055096 Formatted and extended by _Wolfdieter Lang_, Dec 02 2014 (reformatted Jun 11 2015)
%e A055096 The successive terms are (1^2+2^2), (1^2+3^2), (2^2+3^2), (1^2+4^2), (2^2+4^2), (3^2+4^2), ...
%p A055096 sum2distinct_squares_array := (n) -> (((n-((trinv(n-1)*(trinv(n-1)-1))/2))^2)+((trinv(n-1)+1)^2));
%t A055096 T[n_, k_]:= (n+1)^2 + k^2; Table[T[n, k], {n,15}, {k,n}]//Flatten (* _Jean-François Alcover_, Mar 16 2015, after _Reinhard Zumkeller_ *)
%o A055096 (Haskell)
%o A055096 a055096 n k = a055096_tabl !! (n-1) !! (k-1)
%o A055096 a055096_row n = a055096_tabl !! (n-1)
%o A055096 a055096_tabl = zipWith (zipWith (+)) a133819_tabl a140978_tabl
%o A055096 -- _Reinhard Zumkeller_, Mar 23 2013
%o A055096 (Magma) [n^2+k^2: k in [1..n-1], n in [2..15]]; // _G. C. Greubel_, Apr 19 2023
%o A055096 (SageMath)
%o A055096 def A055096(n,k): return n^2 + k^2
%o A055096 flatten([[A055096(n,k) for k in range(1,n)] for n in range(2,16)]) # _G. C. Greubel_, Apr 19 2023
%Y A055096 Sorting gives A024507. Count of divisors: A055097, Möbius: A055132. For trinv, follow A055088.
%Y A055096 Cf. A001844 (right edge), A002522 (left edge), A033429 (central column).
%Y A055096 Cf. A000290, A033583, A079273, A190816, A226141, A331987.
%K A055096 nonn,tabl
%O A055096 2,1
%A A055096 _Antti Karttunen_, Apr 04 2000
%E A055096 Edited: in T(n, k) formula by Reinhard Zumkeller k < n replaced by k <= n. - _Wolfdieter Lang_, Dec 02 2014
%E A055096 Made definition more precise, changed offset to 2. - _N. J. A. Sloane_, Mar 30 2015