[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Search: a070176 -id:a070176
Displaying 1-3 of 3 results found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
A001481 Numbers that are the sum of 2 squares.
(Formerly M0968 N0361)
+10
232
0, 1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25, 26, 29, 32, 34, 36, 37, 40, 41, 45, 49, 50, 52, 53, 58, 61, 64, 65, 68, 72, 73, 74, 80, 81, 82, 85, 89, 90, 97, 98, 100, 101, 104, 106, 109, 113, 116, 117, 121, 122, 125, 128, 130, 136, 137, 144, 145, 146, 148, 149, 153, 157, 160 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Numbers n such that n = x^2 + y^2 has a solution in nonnegative integers x, y.
Closed under multiplication. - David W. Wilson, Dec 20 2004
Also, numbers whose cubes are the sum of 2 squares. - Artur Jasinski, Nov 21 2006 (Cf. A125110.)
Terms are the squares of smallest radii of circles covering (on a square grid) a number of points equal to the terms of A057961. - Philippe Lallouet (philip.lallouet(AT)wanadoo.fr), Apr 16 2007. [Comment corrected by T. D. Noe, Mar 28 2008]
Numbers with more 4k+1 divisors than 4k+3 divisors. If a(n) is a member of this sequence, then so too is any power of a(n). - Ant King, Oct 05 2010
A000161(a(n)) > 0; A070176(a(n)) = 0. - Reinhard Zumkeller, Feb 04 2012, Aug 16 2011
Numbers that are the norms of Gaussian integers. This sequence has unique factorization; the primitive elements are A055025. - Franklin T. Adams-Watters, Nov 25 2011
These are numbers n such that all of n's odd prime factors congruent to 3 modulo 4 occur to an even exponent (Fermat's two-squares theorem). - Jean-Christophe Hervé, May 01 2013
Let's say that an integer n divides a lattice if there exists a sublattice of index n. Example: 2, 4, 5 divide the square lattice. The present sequence without 0 is the sequence of divisors of the square lattice. Say that n is a "prime divisor" if the index-n sublattice is not contained in any other sublattice except the original lattice itself. Then A055025 (norms of Gaussian primes) gives the "prime divisors" of the square lattice. - Jean-Christophe Hervé, May 01 2013
For any i,j > 0 a(i)*a(j) is a member of this sequence, since (a^2 + b^2)*(c^2 + d^2) = (a*c + b*d)^2 + (a*d - b*c)^2. - Boris Putievskiy, May 05 2013
The sequence is closed under multiplication. Primitive elements are in A055025. The sequence can be split into 3 multiplicatively closed subsequences: {0}, A004431 and A125853. - Jean-Christophe Hervé, Nov 17 2013
Generalizing Jasinski's comment, same as numbers whose odd powers are the sum of 2 squares, by Fermat's two-squares theorem. - Jonathan Sondow, Jan 24 2014
By the 4 squares theorem, every nonnegative integer can be expressed as the sum of two elements of this sequence. - Franklin T. Adams-Watters, Mar 28 2015
There are never more than 3 consecutive terms. Runs of 3 terms start at 0, 8, 16, 72, ... (A082982). - Ivan Neretin, Nov 09 2015
Conjecture: barring the 0+2, 0+4, 0+8, 0+16, ... sequence, the sum of 2 distinct terms in this sequence is never a power of 2. - J. Lowell, Jan 14 2022
All the areas of squares whose vertices have integer coordinates. - Neeme Vaino, Jun 14 2023
Numbers represented by the definite binary quadratic forms x^2 + 2nxy + (n^2+1)y^2 for any integer n. This sequence contains the even powers of any integer. An odd power of a number appears only if the number itself belongs to the sequence. The equation given in the comment by Boris Putievskiy 2013 is Brahmagupta's identity with n = 1. It proves that any set of numbers of the form a^2 + nb^2 is closed under multiplication. - Klaus Purath, Sep 06 2023
REFERENCES
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 106.
David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.
L. Euler, (E388) Vollständige Anleitung zur Algebra, Zweiter Theil, reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 1, p. 417.
S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 98-104.
G. H. Hardy, Ramanujan, pp. 60-63.
P. Moree and J. Cazaran, On a claim of Ramanujan in his first letter to Hardy, Expos. Math. 17 (1999), pp. 289-312.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Michael Baake, Uwe Grimm, Dieter Joseph and Przemyslaw Repetowicz, Averaged shelling for quasicrystals, arXiv:math/9907156 [math.MG], 1999.
Richard T. Bumby, Sums of four squares, in Number theory (New York, 1991-1995), 1-8, Springer, New York, 1996.
Steven R. Finch, Landau-Ramanujan Constant [broken link]
Steven R. Finch, Landau-Ramanujan Constant [From the Wayback Machine]
Steven R. Finch, On a Generalized Fermat-Wiles Equation [broken link]
Steven R. Finch, On a Generalized Fermat-Wiles Equation [From the Wayback Machine]
J. W. L. Glaisher, On the function which denotes the difference between the number of (4m+1)-divisors and the number of (4m+3)-divisors of a number, Proc. London Math. Soc., 15 (1884), 104-122. [Annotated scanned copy of pages 104-107 only]
Leonor Godinho, Nicholas Lindsay, and Silvia Sabatini, On a symplectic generalization of a Hirzebruch problem, arXiv:2403.00949 [math.SG], 2024. See p. 17.
Darij Grinberg, UMN Spring 2019 Math 4281 notes, University of Minnesota, College of Science & Engineering, 2019. [Wayback Machine copy]
Thomas Nickson and Igor Potapov, Broadcasting Automata and Patterns on Z^2, arXiv preprint arXiv:1410.0573 [cs.FL], 2014.
Michael Penn, Sums of Squares, Youtube playlist, 2019, 2020.
Peter Shiu, Counting Sums of Two Squares: The Meissel-Lehmer Method, Mathematics of Computation 47 (1986), 351-360.
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Eric Weisstein's World of Mathematics, Square Number
Eric Weisstein's World of Mathematics, Generalized Fermat Equation
Eric Weisstein's World of Mathematics, Landau-Ramanujan Constant
Eric Weisstein's World of Mathematics, Gaussian Integer
A. van Wijngaarden, A table of partitions into two squares with an application to rational triangles, Proceedings of the Koninklijke Nederlandse Akademie van Wetenschappen, Series A, 53 (1950), 869-875.
Gang Xiao, Two squares
FORMULA
n = square * 2^{0 or 1} * {product of distinct primes == 1 (mod 4)}.
The number of integers less than N that are sums of two squares is asymptotic to constant*N/sqrt(log(N)), hence lim_{n->infinity} a(n)/n = infinity.
Nonzero terms in expansion of Dirichlet series Product_p (1 - (Kronecker(m, p) + 1)*p^(-s) + Kronecker(m, p)*p^(-2s))^(-1) for m = -1.
a(n) ~ k*n*sqrt(log n), where k = 1.3085... = 1/A064533. - Charles R Greathouse IV, Apr 16 2012
There are B(x) = x/sqrt(log x) * (K + B2/log x + O(1/log^2 x)) terms of this sequence up to x, where K = A064533 and B2 = A227158. - Charles R Greathouse IV, Nov 18 2022
MAPLE
readlib(issqr): for n from 0 to 160 do for k from 0 to floor(sqrt(n)) do if issqr(n-k^2) then printf(`%d, `, n); break fi: od: od:
MATHEMATICA
upTo = 160; With[{max = Ceiling[Sqrt[upTo]]}, Select[Union[Total /@ (Tuples[Range[0, max], {2}]^2)], # <= upTo &]] (* Harvey P. Dale, Apr 22 2011 *)
Select[Range[0, 160], SquaresR[2, #] != 0 &] (* Jean-François Alcover, Jan 04 2013 *)
PROG
(PARI) isA001481(n)=local(x, r); x=0; r=0; while(x<=sqrt(n) && r==0, if(issquare(n-x^2), r=1); x++); r \\ Michael B. Porter, Oct 31 2009
(PARI) is(n)=my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]%2 && f[i, 1]%4==3, return(0))); 1 \\ Charles R Greathouse IV, Aug 24 2012
(PARI) B=bnfinit('z^2+1, 1);
is(n)=#bnfisintnorm(B, n) \\ Ralf Stephan, Oct 18 2013, edited by M. F. Hasler, Nov 21 2017
(PARI) list(lim)=my(v=List(), t); for(m=0, sqrtint(lim\=1), t=m^2; for(n=0, min(sqrtint(lim-t), m), listput(v, t+n^2))); Set(v) \\ Charles R Greathouse IV, Jan 05 2016
(PARI) is_A001481(n)=!for(i=2-bittest(n, 0), #n=factor(n)~, bittest(n[1, i], 1)&&bittest(n[2, i], 0)&&return) \\ M. F. Hasler, Nov 20 2017
(Haskell)
a001481 n = a001481_list !! (n-1)
a001481_list = [x | x <- [0..], a000161 x > 0]
-- Reinhard Zumkeller, Feb 14 2012, Aug 16 2011
(Magma) [n: n in [0..160] | NormEquation(1, n) eq true]; // Arkadiusz Wesolowski, May 11 2016
(Python)
from itertools import count, islice
from sympy import factorint
def A001481_gen(): # generator of terms
return filter(lambda n:(lambda m:all(d & 3 != 3 or m[d] & 1 == 0 for d in m))(factorint(n)), count(0))
A001481_list = list(islice(A001481_gen(), 30)) # Chai Wah Wu, Jun 27 2022
CROSSREFS
Disjoint union of A000290 and A000415.
Complement of A022544.
A000404 gives another version. Subsequence of A091072, supersequence of A046711.
Column k=2 of A336820.
KEYWORD
nonn,nice,easy,core
AUTHOR
EXTENSIONS
Deleted an incorrect comment. - N. J. A. Sloane, Oct 03 2023
STATUS
approved
A022544 Numbers that are not the sum of 2 squares. +10
59
3, 6, 7, 11, 12, 14, 15, 19, 21, 22, 23, 24, 27, 28, 30, 31, 33, 35, 38, 39, 42, 43, 44, 46, 47, 48, 51, 54, 55, 56, 57, 59, 60, 62, 63, 66, 67, 69, 70, 71, 75, 76, 77, 78, 79, 83, 84, 86, 87, 88, 91, 92, 93, 94, 95, 96, 99, 102, 103, 105, 107, 108, 110, 111, 112, 114, 115, 118, 119, 120, 123, 124, 126, 127, 129, 131, 132, 133, 134, 135, 138, 139, 140, 141, 142, 143, 147, 150, 151, 152, 154, 155, 156, 158, 159, 161, 163, 165, 166, 167, 168, 171, 172, 174, 175, 176, 177, 179, 182, 183, 184, 186, 187, 188, 189, 190, 191, 192, 195, 198, 199 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Conjecture: if k is not the sum of 2 squares then sigma(k) == 0 (mod 4) (the converse does not hold, as demonstrated by the entries in A025303). - Benoit Cloitre, May 19 2002
Numbers having some prime factor p == 3 (mod 4) to an odd power. sigma(n) == 0 (mod 4) because of this prime factor. Every k == 3 (mod 4) is a term. First differences are always 1, 2, 3 or 4, each occurring infinitely often. - David W. Wilson, Mar 09 2005
Complement of A000415 in the nonsquare positive integers A000037. - Max Alekseyev, Jan 21 2010
Integers with an equal number of 4k+1 and 4k+3 divisors. - Ant King, Oct 05 2010
A000161(a(n)) = 0; A070176(a(n)) > 0; A046712 is a subsequence. - Reinhard Zumkeller, Feb 04 2012, Aug 16 2011
There are arbitrarily long runs of consecutive terms. Record runs start at 3, 6, 21, 75, ... (A260157). - Ivan Neretin, Nov 09 2015
From Klaus Purath, Sep 04 2023: (Start)
There are no squares in this sequence.
There are also no numbers of the form n^2 + 1 (A002522) or n^2 + 4 (A087475).
Every term a(n) raised to an odd power belongs to the sequence just as every product of an odd number of terms. This is also true for all integer sequences represented by the indefinite binary quadratic forms a(n)*x^2 - y^2. These sequences also do not contain squares. (End)
REFERENCES
Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 98-104.
LINKS
Steven R. Finch, Landau-Ramanujan Constant [Broken link]
Steven R. Finch, Landau-Ramanujan Constant [From the Wayback machine]
FORMULA
Limit_{n->oo} a(n)/n = 1.
MATHEMATICA
Select[Range[199], Length[PowersRepresentations[ #, 2, 2]] == 0 &] (* Ant King, Oct 05 2010 *)
Select[Range[200], SquaresR[2, #]==0&] (* Harvey P. Dale, Apr 21 2012 *)
PROG
(PARI) for(n=0, 200, if(sum(i=0, n, sum(j=0, i, if(i^2+j^2-n, 0, 1)))==0, print1((n), ", ")))
(PARI) is(n)=if(n%4==3, return(1)); my(f=factor(n)); for(i=1, #f~, if(f[i, 1]%4==3 && f[i, 2]%2, return(1))); 0 \\ Charles R Greathouse IV, Sep 01 2015
(Haskell)
import Data.List (elemIndices)
a022544 n = a022544_list !! (n-1)
a022544_list = elemIndices 0 a000161_list
-- Reinhard Zumkeller, Aug 16 2011
(Magma) [n: n in [0..160] | NormEquation(1, n) eq false]; // Vincenzo Librandi, Jan 15 2017
(Python)
def aupto(lim):
squares = [k*k for k in range(int(lim**.5)+2) if k*k <= lim]
sum2sqs = set(a+b for i, a in enumerate(squares) for b in squares[i:])
return sorted(set(range(lim+1)) - sum2sqs)
print(aupto(199)) # Michael S. Branicky, Mar 06 2021
(Python)
from itertools import count, islice
from sympy import factorint
def A022544_gen(): # generator of terms
return filter(lambda n:any(p & 3 == 3 and e & 1 for p, e in factorint(n).items()), count(0))
A022544_list = list(islice(A022544_gen(), 30)) # Chai Wah Wu, Jun 28 2022
CROSSREFS
Complement of A001481; subsequence of A111909.
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
More terms from Benoit Cloitre, May 19 2002
STATUS
approved
A229062 1 if n is representable as sum of two nonnegative squares, otherwise 0. +10
8
1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Characteristic function of A001481.
a(n) = 1 if A000161(n) > 0.
a(A022544(n)) = 0.
Multiplicative because A002654 is. - Andrew Howroyd, Aug 01 2018
For positive n, m = 2*a(n) + 1 is the smallest positive integer such that m * n is not a sum of two squares. - Peter Schorn, Dec 29 2023
LINKS
FORMULA
a(n) = min{1, A004018(n)}. - N. J. A. Sloane, Jan 11 2020
MATHEMATICA
Join[{1}, Table[If[SquaresR[2, n]>1, 1, 0], {n, 120}]] (* Harvey P. Dale, Aug 25 2017 *)
PROG
(PARI) a(n)=my(f=0); my(r=sqrtint(n)); forstep(i=r, 1, -1, if(issquare(n-i*i), f=1; break)); f
(PARI) a(n)=if(0==n, 1, (sumdiv(n, d, (d%4==1) - (d%4==3)) > 0)); \\ Andrew Howroyd, Aug 01 2018, the check for 0-argument added by Antti Karttunen, Apr 22 2022
(Python)
from sympy import factorint
def A229062(n): return int(all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(n).items())) # Chai Wah Wu, Jun 28 2022
CROSSREFS
Cf. A002654, A004018, A070176. Partial sums are in A102548.
KEYWORD
nonn,mult
AUTHOR
Ralf Stephan, Sep 17 2013
STATUS
approved
page 1

Search completed in 0.014 seconds

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 09:09 EDT 2024. Contains 375511 sequences. (Running on oeis4.)