[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: a001481 -id:a001481
Displaying 11-20 of 231 results found. page 1 2 3 4 5 6 7 8 9 10 ... 24
     Sort: relevance | references | number | modified | created      Format: long | short | data
A372917 a(n) is the number of distinct rectangles with area n whose vertices lie on points of a unit square grid. +0
1
1, 2, 1, 3, 2, 3, 1, 4, 2, 5, 1, 5, 2, 3, 3, 5, 2, 5, 1, 8, 2, 3, 1, 7, 3, 5, 2, 5, 2, 9, 1, 6, 2, 5, 3, 8, 2, 3, 3, 11, 2, 6, 1, 5, 5, 3, 1, 9, 2, 8, 3, 8, 2, 6, 3, 7, 2, 5, 1, 15, 2, 3, 3, 7, 5, 6, 1, 8, 2, 9, 1, 11, 2, 5, 5, 5, 2, 9, 1, 14, 3, 5, 1, 10, 5, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A rectangle in the square unit grid has the sides W = w*sqrt(r) and H = h*sqrt(r). The area is therefore n = w*h*r. Let r be a squarefree divisor of n that can be written as the sum of two squares x^2 + y^2. The number of distinct rectangles is then the sum of the number of ways for each value of r to decompose n/r into two factors w and h (with w >= h).
LINKS
FORMULA
a(n) = ceiling(Product_{i=1..omega(n)}(k[i]*e[i] + 1)/2), with k[i] = 2 if p[i] mod 4 = 3 and k[i] = 1 else, where p[i]^e[i] is the prime factorization of n.
EXAMPLE
See also the linked illustrations of the terms a(4) = 3, a(8) = 4, a(15) = 3.
n = 4 has the three divisors 1, 2, 4. Since 4 is not squarefree, r can have the values 1 or 2. For r = 1 = 1^2 + 0^2 there are two rectangles (2,2), (4,1). For r = 2 = 1^2 + 1^2 and n/r = 4/2 = 2 = w*h there is the rectangle (2*sqrt(2), 1*sqrt(2)). That's a total of a(4) = 3 distinct rectangles.
n = 8 has the four divisors 1, 2, 4, 8. Since 4 and 8 are not squarefree, r can have the values 1 or 2. For r = 1 = 1^2 + 0^2 there are two rectangles (4,2), (8,1). For r = 2 = 1^2 + 1^2 and n/r = 8/2 = 4 = w*h there are the rectangles (4*sqrt(2), 1*sqrt(2)) and (2*sqrt(2), 2*sqrt(2)). That's a total of a(8) = 4 distinct rectangles.
n = 15 has the four divisors 1, 3, 5, 15. They are all squarefree, but 3 and 15 cannot be written as a sum of two squares, r can only have the values 1 or 5. For r = 1 = 1^2 + 0^2 there are two rectangles (5,3), (15,1). For r = 5 = 2^2 + 1^2 and n/r = 15/5 = 3 = w*h there is the rectangles (3*sqrt(5), 1*sqrt(5)). That's a total of a(15) = 3 distinct rectangles.
MAPLE
A372917:= proc(n)
local f, i, prod;
f:=ifactors(n)[2];
prod:=1;
for i from 1 to numelems(f) do
if f[i][1] mod 4 = 3 then
prod:=prod*(1*f[i][2]+1);
else
prod:=prod*(2*f[i][2]+1);
end if;
end do;
return round(prod/2);
end proc;
seq(A372917(n), n=1..86);
PROG
(PARI) a(n) = my(f=factor(n)); prod(i=1, #f[, 1], if(f[i, 1]%4==3, 1, 2)*f[i, 2] + 1) \/ 2; \\ Kevin Ryde, Jun 09 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Huber, Jun 08 2024
STATUS
approved
A111908 Numbers that are not the sum of a prime and a nonzero triangular number. +0
1
1, 2, 7, 36, 61, 105, 171, 210, 211, 216, 325, 351, 406, 528, 561, 630, 741, 780, 990, 1081, 1176, 1275, 1596, 1711, 1830, 1953, 2016, 2145, 2346, 2628, 2775, 3003, 3081, 3240, 3321, 3655, 3741, 3916, 4278, 4371, 4465, 4560, 4851, 5253, 5460, 5565, 5886 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Can anybody prove or disprove a(n) = O(n^c) for some constant c?
Jonathan Vos Post has observed that every term in A076768 also occurs in this sequence.
LINKS
EXAMPLE
7 = 1+6 = 2+5 = 3+4; 7 is in the sequence because there is no sum where the first element is a prime and the second one a triangular number.
MATHEMATICA
lim=6000; plim=PrimePi[lim]; tlim=Ceiling[Sqrt[2lim]]; Complement[Range[lim], Union[Flatten[Table[Prime[i]+PolygonalNumber[j], {i, plim}, {j, tlim}]]]] (* James C. McMahon, Jun 04 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(47) and offset corrected by Donovan Johnson, Feb 09 2013
STATUS
approved
A002654 Number of ways of writing n as a sum of at most two nonzero squares, where order matters; also (number of divisors of n of form 4m+1) - (number of divisors of form 4m+3).
(Formerly M0012 N0001)
+0
105
1, 1, 0, 1, 2, 0, 0, 1, 1, 2, 0, 0, 2, 0, 0, 1, 2, 1, 0, 2, 0, 0, 0, 0, 3, 2, 0, 0, 2, 0, 0, 1, 0, 2, 0, 1, 2, 0, 0, 2, 2, 0, 0, 0, 2, 0, 0, 0, 1, 3, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 1, 4, 0, 0, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 0, 0, 2, 1, 2, 0, 0, 4, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 3, 2, 0, 0, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
Glaisher calls this E(n) or E_0(n). - N. J. A. Sloane, Nov 24 2018
Number of sublattices of Z X Z of index n that are similar to Z X Z; number of (principal) ideals of Z[i] of norm n.
a(n) is also one fourth of the number of integer solutions of n = x^2 + y^2 (order and signs matter, and 0 (without signs) is allowed). a(n) = N(n)/4, with N(n) from p. 147 of the Niven-Zuckermann reference. See also Theorem 5.12, p. 150, which defines a (strongly) multiplicative function h(n) which coincides with A056594(n-1), n >= 1, and N(n)/4 = sum(h(d), d divides n). - Wolfdieter Lang, Apr 19 2013
a(2+8*N) = A008441(N) gives the number of ways of writing N as the sum of 2 (nonnegative) triangular numbers for N >= 0. - Wolfdieter Lang, Jan 12 2017
Coefficients of Dedekind zeta function for the quadratic number field of discriminant -4. See A002324 for formula and Maple code. - N. J. A. Sloane, Mar 22 2022
REFERENCES
J. M. Borwein, D. H. Bailey and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 194.
George Chrystal, Algebra: An elementary text-book for the higher classes of secondary schools and for colleges, 6th ed., Chelsea Publishing Co., New York, 1959, Part II, p. 346 Exercise XXI(17). MR0121327 (22 #12066)
Emil Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 15.
Ivan Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers, New York: John Wiley, 1980, pp. 147 and 150.
Günter Scheja and Uwe Storch, Lehrbuch der Algebra, Tuebner, 1988, p. 251.
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).
J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 340.
LINKS
Michael Baake, Solution of the coincidence problem in dimensions d <= 4, in R. V. Moody, ed., The Mathematics of Long-Range Aperiodic Order, Kluwer 1997, pp. 9-44; arXiv:math/0605222 [math.MG], 2006.
Michael Baake and Uwe Grimm, Quasicrystalline combinatorics, 2002.
Shai Covo, Problem 3586, Crux Mathematicorum, Vol. 36, No. 7 (2010), pp. 461 and 463; Solution to Problem 3586 by the proposer, ibid., Vol. 37, No. 7 (2011), pp. 477-479.
J. W. L. Glaisher, On the function chi(n), Quarterly Journal of Pure and Applied Mathematics, Vol. 20 (1884), pp. 97-167.
J. W. L. Glaisher, On the function chi(n), Quarterly Journal of Pure and Applied Mathematics, Vol. 20 (1884), pp. 97-167. [Annotated scanned copy]
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., Vol. 15 (1884), pp. 104-122. [Annotated scanned copy of pages 104-107 only]
J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math., Vol. 38 (1907), pp. 1-62 (see p. 4 and p. 8).
Srinivasa Ramanujan, Some formulas in the analytic theory of numbers, Messenger of Mathematics, XLV, 1916, 81-84, section (K).
FORMULA
Dirichlet series: (1-2^(-s))^(-1)*Product (1-p^(-s))^(-2) (p=1 mod 4) * Product (1-p^(-2s))^(-1) (p=3 mod 4) = Dedekind zeta-function of Z[ i ].
Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m, p)+1)*p^(-s)+Kronecker(m, p)*p^(-2s))^(-1) for m = -16.
If n=2^k*u*v, where u is product of primes 4m+1, v is product of primes 4m+3, then a(n)=0 unless v is a square, in which case a(n) = number of divisors of u (Jacobi).
Multiplicative with a(p^e) = 1 if p = 2; e+1 if p == 1 (mod 4); (e+1) mod 2 if p == 3 (mod 4). - David W. Wilson, Sep 01 2001
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = (u - v)^2 - (v - w) * (4*w + 1). - Michael Somos, Jul 19 2004
G.f.: Sum_{n>=1} ((-1)^floor(n/2)*x^((n^2+n)/2)/(1+(-x)^n)). - Vladeta Jovovic, Sep 15 2004
Expansion of (eta(q^2)^10 / (eta(q) * eta(q^4))^4 - 1)/4 in powers of q.
G.f.: Sum_{k>0} x^k / (1 + x^(2*k)) = Sum_{k>0} -(-1)^k * x^(2*k - 1) / (1 - x^(2*k - 1)). - Michael Somos, Aug 17 2005
a(4*n + 3) = a(9*n + 3) = a(9*n + 6) = 0. a(9*n) = a(2*n) = a(n). - Michael Somos, Nov 01 2006
a(4*n + 1) = A008441(n). a(3*n + 1) = A122865(n). a(3*n + 2) = A122856(n). a(12*n + 1) = A002175(n). a(12*n + 5) = 2 * A121444(n). 4 * a(n) = A004018(n) unless n=0.
a(n) = Sum_{k=1..n} A010052(k)*A010052(n-k). a(A022544(n)) = 0; a(A001481(n)) > 0.
- Reinhard Zumkeller, Sep 27 2008
a(n) = A001826(n) - A001842(n). - R. J. Mathar, Mar 23 2011
a(n) = Sum_{d|n} A056594(d-1), n >= 1. See the above comment on A056594(d-1) = h(d) of the Niven-Zuckerman reference. - Wolfdieter Lang, Apr 19 2013
Dirichlet g.f.: zeta(s)*beta(s) = zeta(s)*L(chi_2(4),s). - Ralf Stephan, Mar 27 2015
G.f.: (theta_3(x)^2 - 1)/4, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 17 2018
a(n) = Sum_{ m: m^2|n } A000089(n/m^2). - Andrey Zabolotskiy, May 07 2018
a(n) = A053866(n) + 2 * A025441(n). - Andrey Zabolotskiy, Apr 23 2019
a(n) = Im(Sum_{d|n} i^d). - Ridouane Oudra, Feb 02 2020
a(n) = Sum_{d|n} sin((1/2)*d*Pi). - Ridouane Oudra, Jan 22 2021
Sum_{n>=1} (-1)^n*a(n)/n = Pi*log(2)/4 (Covo, 2010). - Amiram Eldar, Apr 07 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/4 = 0.785398... (A003881). - Amiram Eldar, Oct 11 2022
From Vaclav Kotesovec, Mar 10 2023: (Start)
Sum_{k=1..n} a(k)^2 ~ n * (log(n) + C) / 4, where C = A241011 =
4*gamma - 1 + log(2)/3 - 2*log(Pi) + 8*log(Gamma(3/4)) - 12*Zeta'(2)/Pi^2 = 2.01662154573340811526279685971511542645018417752364748061...
The constant C, published by Ramanujan (1916, formula (22)), 4*gamma - 1 + log(2)/3 - log(Pi) + 4*log(Gamma(3/4)) - 12*Zeta'(2)/Pi^2 = 2.3482276258576... is wrong! (End)
EXAMPLE
4 = 2^2, so a(4) = 1; 5 = 1^2 + 2^2 = 2^2 + 1^2, so a(5) = 2.
x + x^2 + x^4 + 2*x^5 + x^8 + x^9 + 2*x^10 + 2*x^13 + x^16 + 2*x^17 + x^18 + ...
2 = (+1)^2 + (+1)^2 = (+1)^2 + (-1)^2 = (-1)^2 + (+1)^2 = (-1)^2 + (-1)^2. Hence there are 4 integer solutions, called N(2) in the Niven-Zuckerman reference, and a(2) = N(2)/4 = 1. 4 = 0^1 + (+2)^2 = (+2)^2 + 0^2 = 0^2 + (-2)^2 = (-2)^2 + 0^2. Hence N(4) = 4 and a(4) = N(4)/4 = 1. N(5) = 8, a(5) = 2. - Wolfdieter Lang, Apr 19 2013
MAPLE
with(numtheory):
A002654 := proc(n)
local count1, count3, d;
count1 := 0:
count3 := 0:
for d in numtheory[divisors](n) do
if d mod 4 = 1 then
count1 := count1+1
elif d mod 4 = 3 then
count3 := count3+1
fi:
end do:
count1-count3;
end proc:
# second Maple program:
a:= n-> add(`if`(d::odd, (-1)^((d-1)/2), 0), d=numtheory[divisors](n)):
seq(a(n), n=1..100); # Alois P. Heinz, Feb 04 2020
MATHEMATICA
a[n_] := Count[Divisors[n], d_ /; Mod[d, 4] == 1] - Count[Divisors[n], d_ /; Mod[d, 4] == 3]; a/@Range[105] (* Jean-François Alcover, Apr 06 2011, after R. J. Mathar *)
QP = QPochhammer; CoefficientList[(1/q)*(QP[q^2]^10/(QP[q]*QP[q^4])^4-1)/4 + O[q]^100, q] (* Jean-François Alcover, Nov 24 2015 *)
f[2, e_] := 1; f[p_, e_] := If[Mod[p, 4] == 1, e + 1, Mod[e + 1, 2]]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 19 2020 *)
Rest[CoefficientList[Series[EllipticTheta[3, 0, q]^2/4, {q, 0, 100}], q]] (* Vaclav Kotesovec, Mar 10 2023 *)
PROG
(PARI) direuler(p=2, 101, 1/(1-X)/(1-kronecker(-4, p)*X))
(PARI) {a(n) = polcoeff( sum(k=1, n, x^k / (1 + x^(2*k)), x * O(x^n)), n)}
(PARI) {a(n) = sumdiv( n, d, (d%4==1) - (d%4==3))}
(PARI) {a(n) = local(A); A = x * O(x^n); polcoeff( eta(x^2 + A)^10 / (eta(x + A) * eta(x^4 + A))^4 / 4, n)} \\ Michael Somos, Jun 03 2005
(PARI) a(n)=my(f=factor(n>>valuation(n, 2))); prod(i=1, #f~, if(f[i, 1]%4==1, f[i, 2]+1, (f[i, 2]+1)%2)) \\ Charles R Greathouse IV, Sep 09 2014
(PARI) my(B=bnfinit(x^2+1)); vector(100, n, #bnfisintnorm(B, n)) \\ Joerg Arndt, Jun 01 2024
(Haskell)
a002654 n = product $ zipWith f (a027748_row m) (a124010_row m) where
f p e | p `mod` 4 == 1 = e + 1
| otherwise = (e + 1) `mod` 2
m = a000265 n
-- Reinhard Zumkeller, Mar 18 2013
(Python)
from math import prod
from sympy import factorint
def A002654(n): return prod(1 if p == 2 else (e+1 if p % 4 == 1 else (e+1) % 2) for p, e in factorint(n).items()) # Chai Wah Wu, May 09 2022
CROSSREFS
Equals 1/4 of A004018. Partial sums give A014200.
Cf. A002175, A008441, A121444, A122856, A122865, A022544, A143574, A000265, A027748, A124010, A025426 (two squares, order does not matter), A120630 (Dirichlet inverse), A101455 (Mobius transform), A000089, A241011.
If one simply reads the table in Glaisher, PLMS 1884, which omits the zero entries, one gets A213408.
Dedekind zeta functions for imaginary quadratic number fields of discriminants -3, -4, -7, -8, -11, -15, -19, -20 are A002324, A002654, A035182, A002325, A035179, A035175, A035171, A035170, respectively.
Dedekind zeta functions for real quadratic number fields of discriminants 5, 8, 12, 13, 17, 21, 24, 28, 29, 33, 37, 40 are A035187, A035185, A035194, A035195, A035199, A035203, A035188, A035210, A035211, A035215, A035219, A035192, respectively.
KEYWORD
core,easy,nonn,nice,mult
AUTHOR
STATUS
approved
A064533 Decimal expansion of Landau-Ramanujan constant. +0
41
7, 6, 4, 2, 2, 3, 6, 5, 3, 5, 8, 9, 2, 2, 0, 6, 6, 2, 9, 9, 0, 6, 9, 8, 7, 3, 1, 2, 5, 0, 0, 9, 2, 3, 2, 8, 1, 1, 6, 7, 9, 0, 5, 4, 1, 3, 9, 3, 4, 0, 9, 5, 1, 4, 7, 2, 1, 6, 8, 6, 6, 7, 3, 7, 4, 9, 6, 1, 4, 6, 4, 1, 6, 5, 8, 7, 3, 2, 8, 5, 8, 8, 3, 8, 4, 0, 1, 5, 0, 5, 0, 1, 3, 1, 3, 1, 2, 3, 3, 7, 2, 1, 9, 3, 7, 2, 6, 9, 1, 2, 0, 7, 9, 2, 5, 9, 2, 6, 3, 4, 1, 8, 7, 4, 2, 0, 6, 4, 6, 7, 8, 0, 8, 4, 3, 2, 3, 0, 6, 3, 3, 1, 5, 4, 3, 4, 6, 2, 9, 3, 8, 0, 5, 3, 1, 6, 0, 5, 1, 7, 1, 1, 6, 9, 6, 3, 6, 1, 7, 7, 5, 0, 8, 8, 1, 9, 9, 6, 1, 2, 4, 3, 8, 2, 4, 9, 9, 4, 2, 7, 7, 6, 8, 3, 4, 6, 9, 0, 5, 1, 6, 2, 3, 5, 1, 3, 9, 2, 1, 8, 7, 1, 9, 6, 2, 0, 5, 6, 9, 0, 5, 3, 2, 9, 5, 6, 4, 4, 6, 7, 0, 4 (list; constant; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Named after the German mathematician Edmund Georg Hermann Landau (1877-1938) and the Indian mathematician Srinivasa Ramanujan (1887-1920). - Amiram Eldar, Jun 20 2021
REFERENCES
Bruce C. Berndt, Ramanujan's notebook part IV, Springer-Verlag, 1994, pp. 52, 60-66; MR 95e: 11028.
Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 98-104.
G. H. Hardy, "Ramanujan, Twelve lectures on subjects suggested by his life and work", Chelsea, 1940, pp. 60-63; MR 21 # 4881.
Edmund Landau, Über die Einteilung der positiven ganzen Zahlen in vier Klassen nach der Mindestzahl der zu ihrer additiven Zusammensetzung erforderlichen Quadrate. Arch. Math. Phys., 13, 1908, pp. 305-312.
LINKS
Alexandru Ciolan, Alessandro Languasco and Pieter Moree, Landau and Ramanujan approximations for divisor sums and coefficients of cusp forms, section 10, Journal of Mathematical Analysis and Applications, 2022; see also preprint on arXiv, arXiv:2109.03288 [math.NT], 2021.
Alessandro Languasco, Programs and numerical results, providing 130000 digits. [Note: information ancillary to above link.]
Steven R. Finch, Landau-Ramanujan Constant. [Broken link]
Steven R. Finch, Landau-Ramanujan Constant. [From the Wayback machine]
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]
Philippe Flajolet and Ilan Vardi, Zeta function expansions of some classical constants, Feb 18 1996.
Étienne Fouvry, Claude Levesque and Michel Waldschmidt, Representation of integers by cyclotomic binary forms, arXiv:1712.09019 [math.NT], 2017.
Xavier Gourdon and Pascal Sebah, Constants and records of computation.
Daniel Shanks, The second-order term in the asymptotic expansion of B(x), Mathematics of Computation, Vol. 18, No. 85 (1964), pp. 75-86.
Eric Weisstein's World of Mathematics, Ramanujan constant.
FORMULA
From Amiram Eldar, Mar 08 2024: (Start)
Equals (Pi/4) * Product_{primes p == 1 (mod 4)} (1 - 1/p^2)^(1/2).
Equals (1/sqrt(2)) * Product_{primes p == 3 (mod 4)} (1 - 1/p^2)^(-1/2).
Equals (1/sqrt(2)) * Product_{k>=1} ((1 - 1/2^(2^k)) * zeta(2^k)/beta(2^k)), where beta is the Dirichlet beta function (Shanks, 1964). (End)
EXAMPLE
0.76422365358922066299069873125009232811679054139340951472168667374...
MATHEMATICA
First@ RealDigits@ N[1/Sqrt@2 Product[((1 - 2^(-2^k)) 4^(2^k) Zeta[2^k]/(Zeta[2^k, 1/4] - Zeta[2^k, 3/4]))^(2^(-k - 1)), {k, 8}], 2^8] (* Robert G. Wilson v, Jul 01 2007 *)
(* Victor Adamchik calculated 5100 digits of the Landau-Ramanujan constant using Mathematica (from Mathematica 4 demos): *) LandauRamanujan[n_] := With[{K = Ceiling[Log[2, n*Log[3, 10]]]}, N[Product[(((1 - 2^(-2^k))*4^2^k*Zeta[2^k])/(Zeta[2^k, 1/4] - Zeta[2^k, 3/4]))^2^(-k - 1), {k, 1, K}]/Sqrt[2], n]];
(* The code reported here is the code at https://library.wolfram.com/infocenter/Demos/120/. Looking carefully at the outputs reported there one sees that: the last 8 digits of the 500-digit output ("74259724") are not the same as those listed in the 1000-digit output ("94247095"); the same happens with the last 18 digits of the 1000-digit output ("584868265713856413") and the corresponding ones in the 5100-digit output ("852514327407923660"). - Alessandro Languasco, May 07 2021 *)
CROSSREFS
Cf. A125776 = Continued fraction. - Harry J. Smith, May 13 2009
KEYWORD
cons,nonn
AUTHOR
N. J. A. Sloane, Oct 08 2001
EXTENSIONS
More references needed! Hardy and Wright? Gruber and Lekkerkerker?
More terms from Vladeta Jovovic, Oct 08 2001
STATUS
approved
A069011 Triangle with T(n,k) = n^2 + k^2. +0
7
0, 1, 2, 4, 5, 8, 9, 10, 13, 18, 16, 17, 20, 25, 32, 25, 26, 29, 34, 41, 50, 36, 37, 40, 45, 52, 61, 72, 49, 50, 53, 58, 65, 74, 85, 98, 64, 65, 68, 73, 80, 89, 100, 113, 128, 81, 82, 85, 90, 97, 106, 117, 130, 145, 162, 100, 101, 104, 109, 116, 125, 136, 149, 164, 181, 200 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
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
A227481(n) = number of squares in row n. - Reinhard Zumkeller, Oct 11 2013
LINKS
FORMULA
T(n+1,k+1) = T(n,k) + 2*(n+k+1), k=0..n; T(n+1,0) = T(n,0) + 2*n + 1. - Reinhard Zumkeller, Oct 11 2013
EXAMPLE
Triangle T(n,k) begins:
0;
1, 2;
4, 5, 8;
9, 10, 13, 18;
16, 17, 20, 25, 32;
25, 26, 29, 34, 41, 50;
36, 37, 40, 45, 52, 61, 72;
49, 50, 53, 58, 65, 74, 85, 98;
64, 65, 68, 73, 80, 89, 100, 113, 128;
81, 82, 85, 90, 97, 106, 117, 130, 145, 162;
100, 101, 104, 109, 116, 125, 136, 149, 164, 181, 200;
...
PROG
(Haskell)
a069011 n k = a069011_tabl !! n !! k
a069011_row n = a069011_tabl !! n
a069011_tabl = map snd $ iterate f (1, [0]) where
f (i, xs@(x:_)) = (i + 2, (x + i) : zipWith (+) xs [i + 1, i + 3 ..])
-- Reinhard Zumkeller, Oct 11 2013
CROSSREFS
Cf. A001481 for terms in this sequence, A000161 for number of times each term appears, A048147 for square array.
Column k=0 gives A000290.
Main diagonal gives A001105.
Row sums give A132124.
T(2n,n) gives A033429.
KEYWORD
easy,nonn,tabl
AUTHOR
Henry Bottomley, Apr 02 2002
STATUS
approved
A372394 Determinant of the matrix [Jacobi(i^2+5*i*j+5*j^2,2*n+1)]_{1<i,j<2*n}, where Jacobi(a,m) denotes the Jacobi symbol (a/m). +0
1
0, 0, 0, 33, 0, 0, 0, -77539, 1811939328, -405798912, 0, 0, 649564705105200, -2787119627540625, 86463597248512, 0, 0, 0, 353143905335474188320, -66016543975248459410178048, 0, 23092056382629010556862857216, 0, 0, 0, 0, -5310136941067623723354761986048 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,4
COMMENTS
Conjecture: (i) If n == 6, 8 (mod 10), and 2*n + 1 is a sum of two squares, then a(n) = 0.
(ii) If n == 5, 9 (mod 10), then a(n) is not relatively prime to 2*n + 1.
See also A372314 for other similar conjectures.
LINKS
D. Krachun, F. Petrov, Z.-W. Sun, and M. Vsemirnov, On some determinants involving Jacobi symbols, Finite Fields Appl. 64 (2010), Article 101672.
Z.-W. Sun, On some determinants with Legendre symbol entries, Finite Fields Appl. 56 (2019), 285-307.
EXAMPLE
a(2) = 0 since the determinant of the matrix [Jacobi(i^2+5*i*j+5*j^2,2*2+1)]_{1<i,j<2*2} = [1,1;1,1] has the value 0.
MATHEMATICA
a[n_]:=a[n]=Det[Table[JacobiSymbol[i^2+5*i*j+5*j^2, 2n+1], {i, 2, 2n-1}, {j, 2, 2n-1}]];
tab={}; Do[tab=Append[tab, a[n]], {n, 2, 28}]; Print[tab]
PROG
(Python)
from sympy import Matrix, jacobi_symbol
def A372394(n): return Matrix(n-1<<1, n-1<<1, [jacobi_symbol(i*(i+5*j+14)+j*(5*j+30)+44, (n<<1)|1) for i in range(n-1<<1) for j in range(n-1<<1)]).det() # Chai Wah Wu, Apr 30 2024
CROSSREFS
KEYWORD
sign
AUTHOR
Zhi-Wei Sun, Apr 29 2024
STATUS
approved
A372314 Determinant of the matrix [Jacobi(i^2 + 3*i*j + 2*j^2, 2*n + 1)]_{1 < i, j < 2*n}, where Jacobi(a, m) denotes the Jacobi symbol (a / m). +0
3
1, 3, 0, 125, -1215, 0, 0, 9126441, 0, -187590821, 0, 0, 20686753425, 0, 0, 0, 9224101117395305225, 0, 881852208012283730302080, 624391710361368134976, 0, -3428714319207136609529065, 0, 0, 3878246452353765171209988566241, 0, 0, 4308304210666498856284267223158421 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
COMMENTS
Conjecture 1: Let n be any positive integer.
(i) If a(2*n) is nonzero, then 4*n + 1 is a sum of two squares.
(ii) a(2*n + 1) is divisible by phi(4*n + 3)/2, where phi is Euler's totient function. If n is even, then a(2*n + 1)/(phi(4*n + 3)/2) is a square. This has been verified for n = 2..1000.
For any odd integer n > 3 and integers c and d, we introduce the notation: {c,d}_n = det[Jacobi(i^2 + c*i*j + d*j^2, n)]_{1 < i, j < n-1}.
The following conjecture is similar to Conjecture 1.
Conjecture 2: (1) {2, 2}_p = 0 for any prime p == 13,19 (mod 24), and {2, 2}_p == 0 (mod p) for any prime p == 17,23 (mod 24).
(2) If n == 5 (mod 8), then {4, 2}_n = 0. If n == 5 (mod 12), then {3, 3}_n = 0.
(3) If n == 5 (mod 12) and n is a sum of two squares, then {10, 9}_n = 0. Also, {10, 9}_p == 0 (mod p) for any prime p == 11 (mod 12).
(4) {8, 18}_p == 0 (mod p^2) for any prime p == 19 (mod 24), and {8,18}_p == 0 (mod p) for any prime p == 23 (mod 24). If n == 13,17 (mod 24) and n is a sum of two squares, then {8, 18}_n = 0.
We have verified Conjecture 2 for p or n smaller than 2000.
LINKS
D. Krachun, F. Petrov, Z.-W. Sun and M. Vsemirnov, On some determinants involving Jacobi symbols, Finite Fields Appl. 64 (2010), Article 101672.
Z.-W. Sun, On some determinants with Legendre symbol entries, Finite Fields Appl. 56 (2019), 285-307.
EXAMPLE
a(2) = 1 since the determinant of the matrix [Jacobi(i^2 + 3*i*j + 2*j^2, 5)]_{1 < i, j < 2*2} = [1,0; 0,1] is 1.
MATHEMATICA
a[n_]:=a[n]=Det[Table[JacobiSymbol[i^2+3*i*j+2*j^2, 2n+1], {i, 2, 2n-1}, {j, 2, 2n-1}]];
tab={}; Do[tab=Append[tab, a[n]], {n, 2, 29}]; Print[tab]
PROG
(PARI) f(i, j) = i^2 + 3*i*j + 2*j^2;
a(n) = matdet(matrix(2*n-2, 2*n-2, i, j, kronecker(f(i+1, j+1), 2*n+1)));
vector(25, n, a(n+1)) \\ Michel Marcus, Apr 27 2024
CROSSREFS
KEYWORD
sign
AUTHOR
Zhi-Wei Sun, Apr 27 2024
STATUS
approved
A000404 Numbers that are the sum of 2 nonzero squares. +0
235
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 k is in this sequence, then so are all odd powers of k. - 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 its first integral y-intercept at a^2+b^2. The remaining ones for that slope are multiples of that primitive value. - 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 k = x^2 + y^2 with x != y, then k^2 = (x^2-y^2)^2 + (2xy)^2 and k^3 = (x(x^2-3y^2))^2 + (y(3x^2-y^2))^2, etc. - Carmine Suriano, Jul 13 2012
There are never more than 3 consecutive terms that differ by 1. Triples of consecutive terms that differ by 1 occur infinitely many times, for example, 2(k^2 + k)^2, (k^2 - 1)^2 + (k^2 + 2 k)^2, and (k^2 + k - 1)^2 + (k^2 + k + 1)^2 for any integer k > 1. - Ivan Neretin, Mar 16 2017 [Corrected by Jerzy R Borysowicz, Apr 14 2017]
Number of terms less than 10^k, k=1,2,3,...: 3, 34, 308, 2690, 23873, 215907, 1984228, ... - Muniru A Asiru, Feb 01 2018
REFERENCES
David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.
GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 103.
E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 75, Theorem 4, with Theorem 2, p. 15.
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
J. M. De Koninck and V. Ouellet, On the n-th element of a set of positive integers, Annales Univ. Sci. Budapest Sect. Comput. 44 (2015), 153-164. See 2. on p. 162.
Étienne Fouvry, Claude Levesque, and Michel Waldschmidt, Representation of integers by cyclotomic binary forms, arXiv:1712.09019 [math.NT], 2017.
Joshua Harrington, Lenny Jones, and Alicia Lamarche, Representing integers as the sum of two squares in the ring Z_n, arXiv:1404.0187 [math.NT], 2014.
David Rabahy, Google Sheets
G. Xiao, Two squares.
FORMULA
Let k = 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 k is a term iff 1) b_j == 0 (mod 2) for j=1..s and 2) r > 0 or t == 1 (mod 2) (or both).
From Charles R Greathouse IV, Nov 18 2022: (Start)
a(n) ~ k*n*sqrt(log n), where k = 1.3085... = 1/A064533.
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. (End)
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.
MAPLE
nMax:=178: A:={}: for i to floor(sqrt(nMax)) do for j to floor(sqrt(nMax)) do if i^2+j^2 <= nMax then A := `union`(A, {i^2+j^2}) else end if end do end do: A; # Emeric Deutsch, Jan 02 2017
MATHEMATICA
nMax=1000; n2=Floor[Sqrt[nMax-1]]; Union[Flatten[Table[a^2+b^2, {a, n2}, {b, a, Floor[Sqrt[nMax-a^2]]}]]]
Select[Range@ 200, Length[PowersRepresentations[#, 2, 2] /. {0, _} -> Nothing] > 0 &] (* Michael De Vlieger, Mar 24 2016 *)
Module[{upto=200}, Select[Union[Total/@Tuples[Range[Sqrt[upto]]^2, 2]], #<= upto&]] (* Harvey P. Dale, Sep 18 2021 *)
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
(PARI) list(lim)=my(v=List(), x2); lim\=1; for(x=1, sqrtint(lim-1), x2=x^2; for(y=1, sqrtint(lim-x2), listput(v, x2+y^2))); Set(v) \\ Charles R Greathouse IV, Apr 30 2016
(Haskell)
import Data.List (findIndices)
a000404 n = a000404_list !! (n-1)
a000404_list = findIndices (> 0) a025426_list
-- Reinhard Zumkeller, Aug 16 2011
(Magma) lst:=[]; for n in [1..178] do f:=Factorization(n); if IsSquare(n) then for m in [1..#f] do d:=f[m]; if d[1] mod 4 eq 1 then Append(~lst, n); break; end if; end for; else t:=0; for m in [1..#f] do d:=f[m]; if d[1] mod 4 eq 3 and d[2] mod 2 eq 1 then t:=1; break; end if; end for; if t eq 0 then Append(~lst, n); end if; end if; end for; lst; // Arkadiusz Wesolowski, Feb 16 2017
(GAP) P:=List([1..10^4], i->i^2);;
A000404 := Set(Flat(List(P, i->List(P, j -> i+j)))); # Muniru A Asiru, Feb 01 2018
(Python)
from itertools import count, islice
from sympy import factorint
def A000404_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
c = False
for p in (f:=factorint(n)):
if (q:= p & 3)==3 and f[p]&1:
break
elif q == 1:
c = True
else:
if c or f.get(2, 0)&1:
yield n
A000404_list = list(islice(A000404_gen(), 30)) # Chai Wah Wu, Jul 01 2022
CROSSREFS
A001481 gives another version (allowing for zero squares).
Cf. A004431 (2 distinct squares), A063725 (number of representations), A024509 (numbers with multiplicity), A025284, A018825. Also A050803, A050801, A001105, A033431, A084888, A000578, A000290, A057961, A232499, A007692.
Cf. A003325 (analog for cubes), A003336 (analog for 4th powers).
Column k=2 of A336725.
KEYWORD
nonn,nice,easy
AUTHOR
EXTENSIONS
Edited by Ralf Stephan, Nov 15 2004
Typo in formula corrected by M. F. Hasler, Feb 07 2009
Erroneous Mathematica program fixed by T. D. Noe, Aug 07 2009
PARI code fixed for versions > 2.5 by M. F. Hasler, Jan 01 2013
STATUS
approved
A371014 The number of divisors of n that are the sum of 2 squares. +0
2
1, 2, 1, 3, 2, 2, 1, 4, 2, 4, 1, 3, 2, 2, 2, 5, 2, 4, 1, 6, 1, 2, 1, 4, 3, 4, 2, 3, 2, 4, 1, 6, 1, 4, 2, 6, 2, 2, 2, 8, 2, 2, 1, 3, 4, 2, 1, 5, 2, 6, 2, 6, 2, 4, 2, 4, 1, 4, 1, 6, 2, 2, 2, 7, 4, 2, 1, 6, 1, 4, 1, 8, 2, 4, 3, 3, 1, 4, 1, 10, 3, 4, 1, 3, 4, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Multiplicative with a(p^e) = floor(e/2) + 1 if p == 3 (mod 4), and e+1 otherwise.
a(n) = A000005(n) if and only if n is in A072437.
a(n) = A046951(n) if and only if n is in A004614.
a(n) = 1 if and only if n is in A167181.
MATHEMATICA
f[p_, e_] := If[Mod[p, 4] == 3, Floor[e/2] + 1, e + 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 1]%4 == 3, f[i, 2]\2 + 1, f[i, 2] + 1)); }
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Mar 08 2024
STATUS
approved
A371015 The largest divisor of n that is the sum of 2 squares. +0
2
1, 2, 1, 4, 5, 2, 1, 8, 9, 10, 1, 4, 13, 2, 5, 16, 17, 18, 1, 20, 1, 2, 1, 8, 25, 26, 9, 4, 29, 10, 1, 32, 1, 34, 5, 36, 37, 2, 13, 40, 41, 2, 1, 4, 45, 2, 1, 16, 49, 50, 17, 52, 53, 18, 5, 8, 1, 58, 1, 20, 61, 2, 9, 64, 65, 2, 1, 68, 1, 10, 1, 72, 73, 74, 25 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Multiplicative with a(p^e) = p^(2*floor(e/2)) if p == 3 (mod 4), and p^e otherwise.
a(n) = n / A363340(n).
a(n) = n if and only if n is in A001481.
a(n) = 1 if and only if n is in A167181.
MATHEMATICA
f[p_, e_] := If[Mod[p, 4] == 3, p^(2*Floor[e/2]), p^e]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^if(f[i, 1]%4 == 3, 2*(f[i, 2]\2), f[i, 2])); }
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Amiram Eldar, Mar 08 2024
STATUS
approved
page 1 2 3 4 5 6 7 8 9 10 ... 24

Search completed in 0.108 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 10:57 EDT 2024. Contains 375512 sequences. (Running on oeis4.)