A230779 Numbers which are uniquely decomposable into a sum of two squares, the unique decomposition being with two distinct nonzero squares.
5, 10, 13, 17, 20, 26, 29, 34, 37, 40, 41, 45, 52, 53, 58, 61, 68, 73, 74, 80, 82, 89, 90, 97, 101, 104, 106, 109, 113, 116, 117, 122, 136, 137, 146, 148, 149, 153, 157, 160, 164, 173, 178, 180, 181, 193, 194, 197, 202, 208, 212, 218, 226, 229, 232, 233, 234, 241, 244, 245, 257, 261, 269, 272
Offset: 1
Keywords
Examples
a(1) = 5 = 4+1, a(2) = 10 = 9+1, a(3) = 13 = 9+4. However 2 = 1+1, 4 = 4+0, 8 = 4+4 are excluded because the unique decomposition of these numbers in two squares is not with two distinct nonzero squares; 25, 50, 100 are also excluded because there are two decompositions of these numbers in two squares (including one with equal or zero squares).
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000 (extending the previous b-file from Jean-Christophe Hervé, which contained terms up to the 1647th term 10009, but accidentally missed terms 8992 and 9376)
- Eric Weisstein's World of Mathematics, Square Number
- Wikipedia (fr), Théorème des deux carrés
- G. Xiao, Two squares
- Index entries for sequences related to sums of squares
Crossrefs
Programs
-
PARI
isok(n) = {f = factor(n); nb1 = 0; for (i=1, #f~, p = f[i, 1]; ep = f[i, 2]; if (p % 4 == 1, nb1 ++; if (ep != 1, return (0))); if (p % 4 == 3, if (ep % 2, return (0)));); return (nb1 == 1);} \\ Michel Marcus, Nov 17 2013
Comments