login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 0
3, 6, 7, 12, 13, 14, 24, 26, 28, 48, 52, 56, 96, 104, 112, 192, 208, 224, 384, 416, 448, 768, 832, 896, 1536, 1664, 1792, 3072, 3328, 3584, 6144, 6656, 7168, 12288, 13312, 14336 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Guessed continuation (see ogf below): 1536, 1664, 1792, 3072, 3328, 3584, 6144, 6656, 7168, 12288, 13312, 14336, 24576, 26624, 28672, 49152, 53248, 57344, 98304, 106496, 114688, 196608, 212992, 229376, 393216, 425984, 458752.

LINKS

Table of n, a(n) for n=1..36.

M. A. Fajjal, Posting in sci.math.symbolic

FORMULA

Guessed ogf: 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-program 3sq.c) #include <stdio.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 ./3sq $i && echo -n $i, ; done >3sq.txt

gives the elements less than 1000 of this sequence

CROSSREFS

Sequence in context: A004760 A186083 A093906 * A325430 A104463 A072757

Adjacent sequences:  A152826 A152827 A152828 * A152830 A152831 A152832

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

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 22 08:46 EST 2019. Contains 329389 sequences. (Running on oeis4.)