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.

A152829 Numbers k whose squares can be written in exactly one way as a sum of three squares: k^2 = a^2 + b^2 + c^2 with 1 <= a <= b <= c.

This page as a plain text file.
%I A152829 #30 Mar 23 2022 07:38:06
%S A152829 3,6,7,12,13,14,24,26,28,48,52,56,96,104,112,192,208,224,384,416,448,
%T A152829 768,832,896,1536,1664,1792,3072,3328,3584,6144,6656,7168,12288,13312,
%U A152829 14336,24576,26624,28672,49152,53248,57344,98304,106496,114688,196608,212992,229376
%N A152829 Numbers k whose squares can be written in exactly one way as a sum of three squares: k^2 = a^2 + b^2 + c^2 with 1 <= a <= b <= c.
%C A152829 Numbers k such that k^2 is in A025321. - _Joerg Arndt_, Mar 22 2022
%C A152829 2k is a term iff k is also a term, so the conjecture from _Colin Barker_ (see Formula) is true iff 3, 7, and 13 are the only odd terms. - _Jon E. Schoenfield_, Mar 22 2022
%H A152829 M. A. Fajjal, <a href="http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/9b710335b105b6f8#">Posting in sci.math.symbolic</a>
%F A152829 Guessed o.g.f.: x*(x^4 + 6*x^3 + 7*x^2 + 6*x + 3)/(1 - 2*x^3).
%F A152829 {k: A025427(k^2)=1}. - _R. J. Mathar_, Dec 15 2008
%F A152829 Conjecture: a(n) = 2*a(n-3) for n > 5. - _Colin Barker_, Mar 12 2012
%e A152829 9 is not in this sequence because 9^2 = 1^2 + 4^2 + 8^2 = 3^2 + 6^2 + 6^2 = 4^2 + 4^2 + 7^2.
%e A152829 7 is in this sequence because 7^2 = 2^2 + 3^2 + 6^2 is the only way to write 7^2 as a sum of three squares.
%o A152829 (C)
%o A152829 #include <stdio.h>
%o A152829 #include <stdlib.h>
%o A152829 int main (int argc, char *argv[]) {
%o A152829     long n,n2,a,a2,b,b2,c,c2; int s = 0; n=atol(argv[1]); n2=n*n;
%o A152829     for (a=1; a<n; a++) {
%o A152829         a2 = a*a;
%o A152829         for (b=a; (b2=b*b)<n2-a2; b++)
%o A152829             for (c=b; (c2=c*c)<=n2-a2-b2; c++) if (a2+b2+c2==n2) s++;
%o A152829     }
%o A152829     return (s==1?0:1);
%o A152829 }
%o A152829 # Then the bash-line
%o A152829 for (( i=1; i<1000; i++ )); do ./a.out $i && echo -n $i, ; done > 3sq.txt
%o A152829 # gives the terms less than 1000
%Y A152829 Cf. A025321.
%K A152829 nonn
%O A152829 1,1
%A A152829 Peter Pein (petsie(AT)dordos.net), Dec 13 2008
%E A152829 a(25)-a(36) (from comment) verified and added by _Donovan Johnson_, Nov 08 2013
%E A152829 a(37)-a(48) from _Jon E. Schoenfield_, Mar 22 2022