|
| |
|
|
A000404
|
|
Numbers that are the sum of 2 nonzero squares.
|
|
93
|
|
|
|
2, 5, 8, 10, 13, 17, 18, 20, 25, 26, 29, 32, 34, 37, 40, 41, 45, 50, 52, 53, 58, 61, 65, 68, 72, 73, 74, 80, 82, 85, 89, 90, 97, 98, 100, 101, 104, 106, 109, 113, 116, 117, 122, 125, 128, 130, 136, 137, 145, 146, 148, 149, 153, 157, 160, 162, 164, 169, 170, 173, 178
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
1,1
|
|
|
COMMENTS
|
From the formula it is easy to see that if n is in this sequence, then so are all odd powers of n. [From T. D. Noe, Jan 13 2009]
Also numbers whose cubes are the sum of two nonzero squares. - Joe Namnath and Lawrence Sze.
A line perpendicular to y=mx has ist first integral y-intercept at a^2+b^2. The remaining ones for that slope are multiples of that primitive value [From Larry J Zimmermann, Aug 19 2010]
The primes in this sequence are sequence A002313.
Complement of A018825; A025426(a(n)) > 0; A063725(a(n)) > 0. [Reinhard Zumkeller, Aug 16 2011]
If the two squares are not equal, then any power is still in the sequence: if n = x^2 + y^2 with x <> y, then n^2 = (x^2-y^2)^2 + (2xy)^2 and n^3 = (x(x^2-3y^2))^2 + (y(3x^2-y^2))^2, etc. - Carmine Suriano, Jul 13 2012
|
|
|
REFERENCES
|
D. Cox, "Primes of Form x^2 + n y^2", Wiley, 1989.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, p. 219, th. 251, 252.
Ian Stewart, "Game, Set and Math", Chapter 8, 'Close Encounters of the Fermat Kind', Penguin Books, Ed. 1991, pp. 107-124.
|
|
|
LINKS
|
T. D. Noe, Table of n, a(n) for n=1..10000
G. Xiao, Two squares
_Reinhard Zumkeller_, Illustration for A084888 and A000404
Index entries for sequences related to sums of squares
|
|
|
FORMULA
|
Let n = 2^t * p_1^a_1 * p_2^a_2 *...* p_r^a_r * q_1^b_1 * q_2^b_2 *...* q_s^b_s with t>=0, a_i>=0 for i=1..r, where p_i = 1 mod 4 for i=1..r and q_j =-1 mod 4 for j=1..s. Then n is a member iff 1) b_j=0 mod 2 for j=1..s and 2) r>0 or t=1 mod 2 (or both).
|
|
|
EXAMPLE
|
25 = 3^2 + 4^2, therefore 25 is a term. Note that also 25^3 = 15625 = 44^2 + 117^2, therefore 15625 is a term.
|
|
|
MATHEMATICA
|
nMax=1000; n2=Floor[Sqrt[nMax-1]]; Union[Flatten[Table[a^2+b^2, {a, n2}, {b, a, Floor[Sqrt[nMax-a^2]]}]]]
|
|
|
PROG
|
(PARI) is_A000404(n)={ for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2))} \\ - M. F. Hasler, Feb 07 2009
(Haskell)
import Data.List (findIndices)
a000404 n = a000404_list !! (n-1)
a000404_list = findIndices (> 0) a025426_list
-- Reinhard Zumkeller, Aug 16 2011
|
|
|
CROSSREFS
|
A001481 gives another version (allowing for zero squares).
Cf. A063725 (number of representations).
Cf. A024509 (numbers with multiplicity), A025284, A018825. Also A050803, A050801, A001105, A033431, A084888.
Cf. A000578, A000290.
Cf. A001481, A004431, A007692.
Sequence in context: A189365 A024509 A084889 * A025284 A140328 A000415
Adjacent sequences: A000401 A000402 A000403 * A000405 A000406 A000407
|
|
|
KEYWORD
|
nonn,nice,easy
|
|
|
AUTHOR
|
N. J. A. Sloane and J. H. Conway (conway(AT)math.princeton.edu)
|
|
|
EXTENSIONS
|
Edited by Ralf Stephan, Nov 15, 2004
Corrected a typo in the formula. - M. F. Hasler, Feb 07 2009
Fixed erroneous Mathematica program - T. D. Noe, Aug 07 2009
PARI code fixed for versions > 2.5 by M. F. Hasler, Jan 01 2013
|
|
|
STATUS
|
approved
|
| |
|
|