cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 17 results. Next

A071385 Number of points (i,j) on the circumference of a circle around (0,0) with squared radius A071383(n).

Original entry on oeis.org

1, 4, 8, 12, 16, 24, 32, 36, 48, 64, 72, 80, 96, 128, 144, 160, 192, 256, 288, 320, 384, 512, 576, 640, 768, 864, 1024, 1152, 1280, 1536, 1728, 2048, 2304, 2560, 3072, 3456, 3840, 4096, 4608, 5120, 6144, 6912, 7680, 8192, 9216, 10240, 11520, 12288, 13824, 15360
Offset: 1

Views

Author

Hugo Pfoertner, May 23 2002

Keywords

Examples

			Circles with radius 1 and 2 have 4 lattice points on their circumference, so a(1)=4. A circle with radius sqrt(5) passes through 8 lattice points of the shape (2,1), so a(2)=8. A circle with radius 5 passes through 4 lattice points of shape (5,0) and through 8 points of shape (4,3), so a(3)=4+8=12
A071383(11) = 5^2 * 13^2 * 17^1 = 71825. Therefore A071385(11) = 4*(2+1)*(2+1)*(1+1) = 72.
		

Crossrefs

Programs

  • PARI
    my(v=list(10^15), rec=0); print1(1, ", "); for(n=1, #v, if(numdiv(v[n])>rec, rec=numdiv(v[n]); print1(4*rec, ", "))) \\ Jianing Song, May 20 2021, see program for A054994

Formula

a(n) = 4 * Product_{k=1..klim} (e_k + 1), where klim and e_1 >= e_2 >= ... >= e_klim > 0 are known from A071383(n) = Product_{k=1..klim} p_k^e_k, with p_k = k-th prime of the form 4i+1. (J. H. Conway)
a(n) = 4*A000005(A071383(n)) for n > 1.
a(n) = A004018(A071383(n)).
a(n) = A002654(A071383(n)) for n > 1. - Jianing Song, May 20 2021
a(n) = 4*A344470(n-1) for n > 1. - Hugo Pfoertner, Sep 04 2022

A072324 Terms of A071383 such that A071383(n) = 5 * A071383(n-1).

Original entry on oeis.org

5, 25, 325, 27625, 801125, 29641625, 1215306625
Offset: 1

Views

Author

Hugo Pfoertner, Jul 14 2002

Keywords

Comments

This sequence was proposed by Benoit Cloitre.
The next term of this sequence if it exists is greater than 2^63-1 (~9.2*10^18).
No more terms through A071383(365). - Hugo Pfoertner, Sep 12 2019
No more terms through A071383(425). - Ray Chandler, Dec 18 2019

Crossrefs

Cf. A071383.

A004018 Theta series of square lattice (or number of ways of writing n as a sum of 2 squares). Often denoted by r(n) or r_2(n).

Original entry on oeis.org

1, 4, 4, 0, 4, 8, 0, 0, 4, 4, 8, 0, 0, 8, 0, 0, 4, 8, 4, 0, 8, 0, 0, 0, 0, 12, 8, 0, 0, 8, 0, 0, 4, 0, 8, 0, 4, 8, 0, 0, 8, 8, 0, 0, 0, 8, 0, 0, 0, 4, 12, 0, 8, 8, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 4, 16, 0, 0, 8, 0, 0, 0, 4, 8, 8, 0, 0, 0, 0, 0, 8, 4, 8, 0, 0, 16, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 4, 0, 12, 8
Offset: 0

Views

Author

Keywords

Comments

Number of points in square lattice on the circle of radius sqrt(n). Equivalently, number of Gaussian integers of norm n (cf. Conway-Sloane, p. 106).
Let b(n)=A004403(n), then Sum_{k=1..n} a(k)*b(n-k) = 1. - John W. Layman
Theta series of D_2 lattice.
Number 6 of the 74 eta-quotients listed in Table I of Martin (1996).
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
The zeros in this sequence correspond to those integers with an equal number of 4k+1 and 4k+3 divisors, or equivalently to those that have at least one 4k+3 prime factor with an odd exponent (A022544). - Ant King, Mar 12 2013
If A(q) = 1 + 4*q + 4*q^2 + 4*q^4 + 8*q^5 + ... denotes the o.g.f. of this sequence then the function F(q) := 1/4*(A(q^2) - A(q^4)) = ( Sum_{n >= 0} q^(2*n+1)^2 )^2 is the o.g.f. for counting the ways a positive integer n can be written as the sum of two positive odd squares. - Peter Bala, Dec 13 2013
Expansion coefficients of (2/Pi)*K, with the real quarter period K of elliptic functions, as series of the Jacobi nome q, due to (2/Pi)*K = theta_3(0,q)^2. See, e.g., Whittaker-Watson, p. 486. - Wolfdieter Lang, Jul 15 2016
Sum_{k=0..n} a(n) = A057655(n). Robert G. Wilson v, Dec 22 2016
Limit_{n->oo} (a(n)/n - Pi*log(n)) = A062089: Sierpinski's constant. - Robert G. Wilson v, Dec 22 2016
The mean value of a(n) is Pi, see A057655 for more details. - M. F. Hasler, Mar 20 2017

Examples

			G.f. = 1 + 4*q + 4*q^2 + 4*q^4 + 8*q^5 + 4*q^8 + 4*q^9 + 8*q^10 + 8*q^13 + 4*q^16 + 8*q^17 + 4*q^18 + 8*q^20 + 12*q^25 + 8*q^26 + ... . - _John Cannon_, Dec 30 2006
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 162, #16 (7), r(n).
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 106.
  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.23).
  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 15, p. 32, Lemma 2 (with the proof), p. 116, (9.10) first formula.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 133.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 240, r(n).
  • W. König and J. Sprekels, Karl Weierstraß (1815-1897), Springer Spektrum, Wiesbaden, 2016, p. 186-187 and p. 280-281.
  • C. D. Olds, A. Lax and G. P. Davidoff, The Geometry of Numbers, Math. Assoc. Amer., 2000, p. 51.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 244-245.
  • E. T. Whittaker and G. N. Watson, A Course of Modern Analysis, fourth edition, reprinted, 1958, Cambridge at the University Press.

Crossrefs

Row d=2 of A122141 and of A319574, 2nd column of A286815.
Partial sums - 1 give A014198.
A071385 gives records; A071383 gives where records occur.

Programs

  • Julia
    # JacobiTheta3 is defined in A000122.
    A004018List(len) = JacobiTheta3(len, 2)
    A004018List(102) |> println # Peter Luschny, Mar 12 2018
    
  • Magma
    Basis( ModularForms( Gamma1(4), 1), 100) [1]; /* Michael Somos, Jun 10 2014 */
    
  • Maple
    (sum(x^(m^2),m=-10..10))^2;
    # Alternative:
    A004018list := proc(len) series(JacobiTheta3(0, x)^2, x, len+1);
    seq(coeff(%, x, j), j=0..len-1) end:
    t1 := A004018list(102);
    r2 := n -> t1[n+1]; # Peter Luschny, Oct 02 2018
  • Mathematica
    SquaresR[2,Range[0,110]] (* Harvey P. Dale, Oct 10 2011 *)
    a[ n_] := SquaresR[ 2, n]; (* Michael Somos, Nov 15 2011 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q]^2, {q, 0, n}]; (* Michael Somos, Nov 15 2011 *)
    a[ n_] := With[{m = InverseEllipticNomeQ @ q}, SeriesCoefficient[ EllipticK[ m] / (Pi/2), {q, 0, n}]]; (* Michael Somos, Jun 10 2014 *)
    a[ n_] := If[ n < 1, Boole[n == 0], 4 Sum[ KroneckerSymbol[-4, d], {d, Divisors@n}]]; (* or *) a[ n_] := SeriesCoefficient[ QPochhammer[ q^2]^10/(QPochhammer[ q] QPochhammer[ q^4])^4, {q, 0, n}]; (* Michael Somos, May 17 2015 *)
  • PARI
    {a(n) = polcoeff( 1 + 4 * sum( k=1, n, x^k / (1 + x^(2*k)), x * O(x^n)), n)}; /* Michael Somos, Mar 14 2003 */
    
  • PARI
    {a(n) = if( n<1, n==0, 4 * sumdiv( n, d, (d%4==1) - (d%4==3)))}; /* Michael Somos, Jul 19 2004 */
    
  • PARI
    {a(n) = if( n<1, n==0, 2 * qfrep([ 1, 0; 0, 1], n)[n])}; /* Michael Somos, May 13 2005 */
    
  • PARI
    a(n)=if(n==0,return(1)); my(f=factor(n)); 4*prod(i=1,#f~, if(f[i,1]%4==1, f[i,2]+1, if(f[i,2]%2 && f[i,1]>2, 0, 1))) \\ Charles R Greathouse IV, Sep 02 2015
    
  • Python
    from sympy import factorint
    def a(n):
        if n == 0: return 1
        an = 4
        for pi, ei in factorint(n).items():
           if pi%4 == 1: an *= ei+1
           elif pi%4 == 3 and ei%2: return 0
        return an
    print([a(n) for n in range(102)]) # Michael S. Branicky, Sep 24 2021
    
  • Python
    from math import prod
    from sympy import factorint
    def A004018(n): return prod(1 if p==2 else (e+1 if p&3==1 else (e+1)&1) for p, e in factorint(n).items())<<2 if n else 1 # Chai Wah Wu, Jul 07 2022, corrected Jun 21 2024.
  • Sage
    Q = DiagonalQuadraticForm(ZZ, [1]*2)
    Q.representation_number_list(102) # Peter Luschny, Jun 20 2014
    

Formula

Expansion of theta_3(q)^2 = (Sum_{n=-oo..+oo} q^(n^2))^2 = Product_{m>=1} (1-q^(2*m))^2 * (1+q^(2*m-1))^4; convolution square of A000122.
Factor n as n = p1^a1 * p2^a2 * ... * q1^b1 * q2^b2 * ... * 2^c, where the p's are primes == 1 (mod 4) and the q's are primes == 3 (mod 4). Then a(n) = 0 if any b is odd, otherwise a(n) = 4*(1 + a1)*(1 + a2)*...
G.f. = s(2)^10/(s(1)^4*s(4)^4), where s(k) := subs(q=q^k, eta(q)) and eta(q) is Dedekind's function, cf. A010815. [Fine]
a(n) = 4*A002654(n), n > 0.
Expansion of eta(q^2)^10 / (eta(q) * eta(q^4))^4 in powers of q. - Michael Somos, Jul 19 2004
Expansion of ( phi(q)^2 + phi(-q)^2 ) / 2 in powers of q^2 where phi() is a Ramanujan theta function.
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. - Michael Somos, Jul 19 2004
Euler transform of period 4 sequence [4, -6, 4, -2, ...]. - Michael Somos, Jul 19 2004
Moebius transform is period 4 sequence [4, 0, -4, 0, ...]. - Michael Somos, Sep 17 2007
G.f. is a period 1 Fourier series which satisfies f(-1 / (4 t)) = 2 (t/i) f(t) where q = exp(2 Pi i t).
The constant sqrt(Pi)/Gamma(3/4)^2 produces the first 324 terms of the sequence when expanded in base exp(Pi), 450 digits of the constant are necessary. - Simon Plouffe, Mar 03 2011
a(n) = A004531(4*n). a(n) = 2*A105673(n), if n>0.
Let s = 16*q*(E1*E4^2/E2^3)^8 where Ek = Product_{n>=1} (1-q^(k*n)) (s=k^2 where k is elliptic k), then the g.f. is hypergeom([+1/2, +1/2], [+1], s) (expansion of 2/Pi*ellipticK(k) in powers of q). - Joerg Arndt, Aug 15 2011
Dirichlet g.f. Sum_{n>=1} a(n)/n^s = 4*zeta(s)*L_(-4)(s), where L is the D.g.f. of the (shifted) A056594. [Raman. J. 7 (2003) 95-127]. - R. J. Mathar, Jul 02 2012
a(n) = floor(1/(n+1)) + 4*floor(cos(Pi*sqrt(n))^2) - 4*floor(cos(Pi*sqrt(n/2))^2) + 8*Sum_{i=1..floor(n/2)} floor(cos(Pi*sqrt(i))^2)*floor(cos(Pi*sqrt(n-i))^2). - Wesley Ivan Hurt, Jan 09 2013
From Wolfdieter Lang, Aug 01 2016: (Start)
A Jacobi identity: theta_3(0, q)^2 = 1 + 4*Sum_{r>=0} (-1)^r*q^(2*r+1)/(1 - q^(2*r+1)). See, e.g., the Grosswald reference (p. 15, p. 116, but p. 32, Lemma 2 with the proof, has the typo r >= 1 instead of r >= 0 in the sum, also in the proof). See the link with the Jacobi-Legendre letter.
Identity used by Weierstraß (see the König-Sprekels book, p. 187, eq. (5.12) and p. 281, with references, but there F(x) from (5.11) on p. 186 should start with nu =1 not 0): theta_3(0, q)^2 = 1 + 4*Sum_{n>=1} q^n/(1 + q^(2*n)). Proof: similar to the one of the preceding Jacobi identity. (End)
a(n) = (4/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
G.f.: Theta_3(q)^2 = hypergeometric([1/2, 1/2],[1],lambda(q)), with lambda(q) = Sum_{j>=1} A115977(j)*q^j. See the Kontsevich and Zagier link, with Theta -> Theta_3, z -> 2*z and q -> q^2. - Wolfdieter Lang, May 27 2018

A054994 Numbers of the form q1^b1 * q2^b2 * q3^b3 * q4^b4 * q5^b5 * ... where q1=5, q2=13, q3=17, q4=29, q5=37, ... (A002144) and b1 >= b2 >= b3 >= b4 >= b5 >= ....

Original entry on oeis.org

1, 5, 25, 65, 125, 325, 625, 1105, 1625, 3125, 4225, 5525, 8125, 15625, 21125, 27625, 32045, 40625, 71825, 78125, 105625, 138125, 160225, 203125, 274625, 359125, 390625, 528125, 690625, 801125, 1015625, 1185665, 1221025, 1373125, 1795625
Offset: 1

Views

Author

Bernard Altschuler (Altschuler_B(AT)bls.gov), May 30 2000

Keywords

Comments

This sequence is related to Pythagorean triples regarding the number of hypotenuses which are in a particular number of total Pythagorean triples and a particular number of primitive Pythagorean triples.
Least integer "mod 4 prime signature" values that are the hypotenuse of at least one primitive Pythagorean triple. - Ray Chandler, Aug 26 2004
See A097751 for definition of "mod 4 prime signature"; terms of A097752 with all prime factors of form 4*k+1.
Sequence A006339 (Least hypotenuse of n distinct Pythagorean triangles) is a subset of this sequence. - Ruediger Jehn, Jan 13 2022

Examples

			1=5^0, 5=5^1, 25=5^2, 65=5*13, 125=5^3, 325=5^2*13, 625=5^4, etc.
		

Crossrefs

Programs

  • Mathematica
    maxTerm = 10^15;(* this limit gives ~ 500 terms *) maxNumberOfExponents = 9;(* this limit has to be increased until the number of reaped terms no longer changes *) bmax = Ceiling[ Log[ maxTerm]/Log[q]]; q = Reap[For[k = 0 ; cnt = 0, cnt <= maxNumberOfExponents, k++, If[PrimeQ[4*k + 1], Sow[4*k + 1]; cnt++]]][[2, 1]]; Clear[b]; b[maxNumberOfExponents + 1] = 0; iter = Sequence @@ Table[{b[k], b[k + 1], bmax[[k]]}, {k, maxNumberOfExponents, 1, -1}]; Reap[ Do[an = Product[q[[k]]^b[k], {k, 1, maxNumberOfExponents}]; If[an <= maxTerm, Print[an]; Sow[an]], Evaluate[iter]]][[2, 1]] // Flatten // Union (* Jean-François Alcover, Jan 18 2013 *)
  • PARI
    list(lim)=
    {
      my(u=[1], v=List(), w=v, pr, t=1);
      forprime(p=5,,
        if(p%4>1, next);
        t*=p;
        if(t>lim, break);
        listput(w,t)
      );
      for(i=1,#w,
        pr=1;
        for(e=1,logint(lim\=1,w[i]),
          pr*=w[i];
          for(j=1,#u,
            t=pr*u[j];
            if(t>lim, break);
            listput(v,t)
          )
        );
        if(w[i]^2Charles R Greathouse IV, Dec 11 2016
    
  • Python
    def generate_A054994():
        """generate arbitrarily many elements of the sequence.
        TO_DO is a list of pairs (radius, exponents) where
        "exponents" is a weakly decreasing sequence, and
        radius == prod(prime_4k_plus_1(i)**j for i,j in enumerate(exponents))
        An example entry is (5525, (2, 1, 1)) because 5525 = 5**2 * 13 * 17.
        """
        TO_DO = {(1,())}
        while True:
            radius, exponents = min(TO_DO)
            yield radius #, exponents
            TO_DO.remove((radius, exponents))
            TO_DO.update(successors(radius,exponents))
    def successors(radius,exponents):
        # try to increase each exponent by 1 if possible
        for i,e in enumerate(exponents):
            if i==0 or exponents[i-1]>e:
                # can add 1 in position i without violating monotonicity
                yield (radius*prime_4k_plus_1(i), exponents[:i]+(e+1,)+exponents[i+1:])
        if exponents==() or exponents[-1]>0: # add new exponent 1 at the end:
            yield (radius*prime_4k_plus_1(len(exponents)), exponents+(1,))
    from sympy import isprime
    primes_congruent_1_mod_4 = [5] # will be filled with 5,13,17,29,37,...
    def prime_4k_plus_1(i): # the i-th prime that is congruent to 1 mod 4
        while i>=len(primes_congruent_1_mod_4): # generate primes on demand
            n = primes_congruent_1_mod_4[-1]+4
            while not isprime(n): n += 4
            primes_congruent_1_mod_4.append(n)
        return primes_congruent_1_mod_4[i]
    for n,radius in enumerate(generate_A054994()):
        if n==34:
            print(radius)
            break # print the first 35 elements
        print(radius, end=", ")
    # Günter Rote, Sep 12 2023

Formula

Sum_{n>=1} 1/a(n) = Product_{n>=1} 1/(1 - 1/A006278(n)) = 1.2707219403... - Amiram Eldar, Oct 20 2020

Extensions

More terms from Henry Bottomley, Mar 14 2001

A230655 Squared radii of circles around a point of the hexagonal lattice that contain a record number of lattice points.

Original entry on oeis.org

0, 1, 7, 49, 91, 637, 1729, 8281, 12103, 53599, 157339, 375193, 1983163, 4877509, 13882141, 85276009, 180467833, 596932063, 3428888827, 4178524441, 7760116819, 29249671087, 36412855843, 147442219561, 254889990901, 473367125959, 1784229936307, 2439661341481
Offset: 1

Views

Author

Hugo Pfoertner, Oct 27 2013

Keywords

Comments

It appears that this is also the sequence of numbers with a record number of divisors all of whose prime factors are of the form 3k + 1. - Amiram Eldar, Sep 12 2019 [This is correct, see A343771. - Jianing Song, May 19 2021]
Indices of records of A004016. Apart from the first term, also indices of records of A002324. - Jianing Song, May 20 2021

Examples

			a(2)=7 because a circle with radius sqrt(7) around the lattice point at (0,0) is the first circle that passes through more lattice points than a circle with radius 1, which passes through 6 points. The 12 hit points are (+-1/2,+-3*sqrt(3)/2), (+-2,+-sqrt(3)), (+-5/2, +-sqrt(3)/2).
		

Crossrefs

Cf. A003136 (all occurring squared radii), A198799 (common terms), A230656 (index positions of records), A344472 (records).
Apart from the first term, subsequence of A343771.
Indices of records of Sum_{d|n} kronecker(m, d): this sequence (m=-3), A071383 (m=-4, similar sequence for square lattice), A279541 (m=-6).

Programs

  • PARI
    my(v=list_A344473(10^15), rec=0); print1(0, ", "); for(n=1, #v, if(numdiv(v[n])>rec, rec=numdiv(v[n]); print1(v[n], ", "))) \\ Jianing Song, May 20 2021, see program for A344473

Extensions

Offset corrected by Jianing Song, May 20 2021

A048610 Smallest number that is the sum of two positive squares in >= n ways.

Original entry on oeis.org

2, 50, 325, 1105, 5525, 5525, 27625, 27625, 71825, 138125, 160225, 160225, 801125, 801125, 801125, 801125, 2082925, 2082925, 4005625, 4005625, 5928325, 5928325, 5928325, 5928325, 29641625, 29641625, 29641625, 29641625, 29641625, 29641625
Offset: 1

Views

Author

Keywords

Examples

			2 = 1^2 + 1^2; 50 = 1^2 + 7^2 = 5^2 + 5^2; 325 = 1^2 + 18^2 = 6^2 + 17^2 = 10^2 + 15^2.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 50, p. 19, Ellipses, Paris 2008.
  • J. Meeus, Problem 1375, J. Rec. Math., 18 (No. 1, 1985), p. 70.
  • Problem 590, J. Rec. Math., 11 (No. 2, 1978), p. 137.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    (* Assuming a(n) multiple of 1105, from 1105 on, to speed up computation *) twoSquaresR[n_] := twoSquaresR[n] = With[{r = Reduce[0 < x <= y && n == x^2 + y^2, {x, y}, Integers]}, If[r === False, 0, Length[{x, y} /. {ToRules[r]}]]]; a[n_] := a[n] = For[an = a[n - 1], True, an = If[an < 1105, an + 1, an + 1105], If[ twoSquaresR[an] >= n, Return[an]]];a[1] = 2; Table[ Print[a[n]]; a[n], {n, 1, 30}] (* Jean-François Alcover, Jun 22 2012 *)
    nn = 10^6; t2 = Table[0, {nn}]; n2 = Floor[Sqrt[nn]]; Do[r = a^2 + b^2; If[r <= nn, t2[[r]]++], {a, n2}, {b, a, n2}]; t = {}; n = 1; While[a = Position[t2, ?(# >= n &), 1, 1]; a != {}, AppendTo[t, a[[1, 1]]]; n++]; t (* _T. D. Noe, Jun 22 2012 *)

A071339 a(n) = the maximum number of lattice points touched by an origin-centered circle with radius <= n.

Original entry on oeis.org

1, 4, 4, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 36, 36, 36
Offset: 0

Views

Author

Hugo Pfoertner, May 22 2002

Keywords

Examples

			a(5 to 8)=12 because the circle with radius 5 touches 12 lattice points: (+-1,+-2), (+-2,+-1), (+-5,0), (0,+-5); but no circle touches more, until the radius is sqrt(65).
		

Crossrefs

Formula

a(n) = max(i=0 to n^2) A004018(i)

Extensions

Edited by Don Reble, Nov 06 2005

A052199 Numbers that are expressible as the sum of 2 distinct positive squares in more ways than any smaller number.

Original entry on oeis.org

1, 5, 65, 325, 1105, 5525, 27625, 71825, 138125, 160225, 801125, 2082925, 4005625, 5928325, 29641625, 77068225, 148208125, 243061325, 1215306625, 3159797225, 6076533125, 12882250225, 53716552825, 64411251125, 167469252925, 322056255625, 785817263725
Offset: 1

Views

Author

Jud McCranie, Jan 28 2000

Keywords

Examples

			65 = 1^2 + 8^2 = 4^2 + 7^2, the smallest expressible in two ways, so 65 is a term.
		

References

  • Donald S. McDonald, Postings to sci.math newsgroup, Feb 21, 1995 and Dec 04, 1995.

Crossrefs

Cf. A001983, A007511, A048610, A071383. Subsequence of A054994. Where records occur in A025441; corresponding number of ways is A060306.

Programs

  • PARI
    c_old=-1;for(n=1,10000,c=0;for(i=1,floor(sqrt(n)),for(j=1,i-1,if(i^2+j^2==n,c+=1)));if(c>c_old,print1(n,", ");c_old=c)) \\ Derek Orr, Mar 15 2019

Extensions

More terms from Randall L Rathbun, Jan 18 2002
Edited by Ray Chandler, Jan 12 2012

A300162 Numbers of the form n^2 + 1 that can be expressed as j^2 + k^2, j > k > 1, in more ways than any smaller number of this form.

Original entry on oeis.org

65, 325, 2210, 17425, 58565, 71825, 986050, 2458625, 15657850, 27636050, 205005125, 343842850, 1930020625, 4401924410, 5279766245, 26189596225, 109020153125, 1997821114250, 3001878503650, 5283874574225, 10991001911825, 91178970317825, 253647605037125
Offset: 1

Views

Author

Hugo Pfoertner, Feb 27 2018

Keywords

Examples

			See A300161.
		

Crossrefs

Extensions

a(17) from Hugo Pfoertner, Mar 08 2018
a(18)-a(21) from Robert Price, Mar 10 2018
a(22)-a(23) from Giovanni Resta, Mar 13 2018

A088959 Lowest numbers which are d-Pythagorean decomposable, i.e., square is expressible as sum of two positive squares in more ways than for any smaller number.

Original entry on oeis.org

1, 5, 25, 65, 325, 1105, 5525, 27625, 32045, 160225, 801125, 1185665, 5928325, 29641625, 48612265, 243061325, 1215306625, 2576450045, 12882250225, 64411251125, 157163452745, 785817263725, 3929086318625, 10215624428425, 11472932050385, 51078122142125
Offset: 1

Views

Author

Lekraj Beedassy, Dec 01 2003

Keywords

Comments

These are also the integer radii of circles around the origin that contain record numbers of lattice points. See A071383 for radii that are not necessarily integer. - Günter Rote, Sep 14 2023

Examples

			From _Petros Hadjicostas_, Jul 21 2019: (Start)
Squares 1^2, 2^2, 3^2, and 4^2 have 0 representations as the sum of two positive squares. (Thus, A088111(1) = 0 for the number of representations of 1^2.) Thus a(1) = 1.
Square 5^2 can be written as 3^2 + 4^2 only (here A088111(2) = 1). Thus, a(2) = 5.
Looking at sequence A046080, we see that for 5 <= n <= 24, only n^2 = 5^2, 10^2, 13^2, 15^2, 17^2, 20^2 can be written as a sum of two positive squares (in a single way) because 5^2 = 3^2 + 4^2, 10^2 = 6^2 + 8^2, 13^2 = 5^2 + 12^2, 17^2 = 8^2 + 15^2, and 20^2 = 12^2 + 16^2.
Since A046080(25) = 2 and A088111(3) = 2, we have that 25^2 can be written as a sum of two positive squares in two ways. Indeed, 25^2 = 7^2 + 24^2 = 15^2 + 20^2. Thus, a(3) = 25.
For 26 <= n <= 64, we see from sequence A046080 that n^2 cannot be written in more than 2 ways as a sum of two positive squares.
Since A046080(65) = 4, we see that 65^2 can be written as the sum of two positive squares in 4 ways. Indeed, 65^2 = 16^2 + 63^2 = 25^2 + 60^2 = 33^2 + 56^2 = 39^2 + 52^2. Thus, a(4) = 65.
(End)
		

References

  • R. M. Sternheimer, Additional Remarks Concerning The Pythagorean Triplets, Journal of Recreational Mathematics, Vol. 30, No. 1, pp. 45-48, 1999-2000, Baywood NY.

Crossrefs

Cf. A052199. Subsequence of A054994. Number of ways: see A088111. Where records occur in A046080.

Programs

  • Python
    from math import prod
    from sympy import isprime
    primes_congruent_1_mod_4 = [5]
    def prime_4k_plus_1(i): # the i-th prime that is congruent to 1 mod 4
        while i>=len(primes_congruent_1_mod_4): # generate primes on demand
            n = primes_congruent_1_mod_4[-1]+4
            while not isprime(n): n += 4
            primes_congruent_1_mod_4.append(n)
        return primes_congruent_1_mod_4[i]
    def generate_A054994():
        TO_DO = {(1,())}
        while True:
            radius, exponents = min(TO_DO)
            yield radius, exponents
            TO_DO.remove((radius, exponents))
            TO_DO.update(successors(radius,exponents))
    def successors(r,exponents):
        for i,e in enumerate(exponents):
            if i==0 or exponents[i-1]>e:
                yield (r*prime_4k_plus_1(i), exponents[:i]+(e+1,)+exponents[i+1:])
        if exponents==() or exponents[-1]>0:
            yield (r*prime_4k_plus_1(len(exponents)), exponents+(1,))
    n,record=0,-1
    for radius,expo in generate_A054994():
        num_pyt = (prod((2*e+1) for e in expo)-1)//2
        if num_pyt>record:
            record = num_pyt
            n += 1
            print(radius, end="") # or record, for A088111
            if n==26: break # stop after 26 entries
            print(end=", ")
    print() # Günter Rote, Sep 13 2023

Extensions

Corrected and extended by Ray Chandler, Jan 12 2012
Name edited by Petros Hadjicostas, Jul 21 2019
Showing 1-10 of 17 results. Next