OFFSET
1,1
COMMENTS
Numbers k such that k^2 is in A025321. - Joerg Arndt, Mar 22 2022
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
LINKS
M. A. Fajjal, Posting in sci.math.symbolic
FORMULA
Guessed o.g.f.: x*(x^4 + 6*x^3 + 7*x^2 + 6*x + 3)/(1 - 2*x^3).
{k: A025427(k^2)=1}. - R. J. Mathar, Dec 15 2008
Conjecture: a(n) = 2*a(n-3) for n > 5. - Colin Barker, Mar 12 2012
EXAMPLE
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.
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.
PROG
(C)
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[]) {
long n, n2, a, a2, b, b2, c, c2; int s = 0; n=atol(argv[1]); n2=n*n;
for (a=1; a<n; a++) {
a2 = a*a;
for (b=a; (b2=b*b)<n2-a2; b++)
for (c=b; (c2=c*c)<=n2-a2-b2; c++) if (a2+b2+c2==n2) s++;
}
return (s==1?0:1);
}
# Then the bash-line
for (( i=1; i<1000; i++ )); do ./a.out $i && echo -n $i, ; done > 3sq.txt
# gives the terms less than 1000
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Pein (petsie(AT)dordos.net), Dec 13 2008
EXTENSIONS
a(25)-a(36) (from comment) verified and added by Donovan Johnson, Nov 08 2013
a(37)-a(48) from Jon E. Schoenfield, Mar 22 2022
STATUS
approved