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-4 of 4 results.

A088111 Number of ways associated with A088959.

Original entry on oeis.org

0, 1, 2, 4, 7, 13, 22, 31, 40, 67, 94, 121, 202, 283, 364, 607, 850, 1093, 1822, 2551, 3280, 5467, 7654, 9112, 9841, 12757, 16402, 22963, 27337, 29524, 38272, 49207, 68890, 82012, 88573, 114817, 147622, 206671, 246037, 265720, 344452, 442867, 620014, 738112
Offset: 1

Views

Author

Lekraj Beedassy, Apr 24 2004

Keywords

Crossrefs

Cf. A088959. Records in A046080.

Extensions

Corrected and extended by Ray Chandler, Jan 12 2012

A365620 Number of integer grid points on the circle around (0,0) with radius A088959(n).

Original entry on oeis.org

4, 12, 20, 36, 60, 108, 180, 252, 324, 540, 756, 972, 1620, 2268, 2916, 4860, 6804, 8748, 14580, 20412, 26244, 43740, 61236, 72900, 78732, 102060, 131220, 183708, 218700, 236196, 306180, 393660, 551124, 656100, 708588, 918540
Offset: 1

Views

Author

Günter Rote, Sep 12 2023

Keywords

Crossrefs

Sequence of records of A046109 (first term 1 from A046109 is omitted).
See A071385 for radii that are not necessarily integers.

Formula

a(n) = 8*A088111(n) + 4.

A046080 a(n) is the number of integer-sided right triangles with hypotenuse n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 4, 0, 0, 1, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 1, 0, 1, 0, 0, 4, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0
Offset: 1

Views

Author

Keywords

Comments

Or number of ways n^2 can be written as the sum of two positive squares: a(5) = 1: 3^2 + 4^2 = 5^2; a(25) = 2: 7^2 + 24^2 = 15^2 + 20^2 = 25^2. - Alois P. Heinz, Aug 01 2019

References

  • A. H. Beiler, Recreations in the Theory of Numbers, New York: Dover, pp. 116-117, 1966.

Crossrefs

First differs from A083025 at n=65.
A088111 gives records; A088959 gives where records occur.
Partial sums: A224921.

Programs

  • Maple
    f:= proc(n) local F,t;
      F:= select(t -> t[1] mod 4 = 1, ifactors(n)[2]);
      1/2*(mul(2*t[2]+1, t=F)-1)
    end proc:
    map(f, [$1..100]); # Robert Israel, Jul 18 2016
  • Mathematica
    a[1] = 0; a[n_] := With[{fi = Select[ FactorInteger[n], Mod[#[[1]], 4] == 1 & ][[All, 2]]}, (Times @@ (2*fi+1)-1)/2]; Table[a[n], {n, 1, 99}] (* Jean-François Alcover, Feb 06 2012, after first formula *)
  • PARI
    a(n)={my(m=0,k=n,n2=n*n,k2,l2);
    while(1,k=k-1;k2=k*k;l2=n2-k2;if(l2>k2,break);if(issquare(l2),m++));return(m)} \\ brute force, Stanislav Sykora, Mar 18 2015
    
  • PARI
    {a(n) = if( n<1, 0, sum(k=1, sqrtint(n^2 \ 2), issquare(n^2 - k^2)))}; /* Michael Somos, Mar 29 2015 */
    
  • PARI
    a(n) = {my(f = factor(n/(2^valuation(n, 2)))); (prod(k=1, #f~, if ((f[k,1] % 4) == 1, 2*f[k,2] + 1, 1)) - 1)/2;} \\ Michel Marcus, Mar 08 2016
    
  • Python
    from math import prod
    from sympy import factorint
    def A046080(n): return prod((e<<1)+1 for p,e in factorint(n).items() if p&3==1)>>1 # Chai Wah Wu, Sep 06 2022

Formula

Let n = 2^e_2 * product_i p_i^f_i * product_j q_j^g_j where p_i == 1 mod 4, q_j == 3 mod 4; then a(n) = (1/2)*(product_i (2*f_i + 1) - 1). - Beiler, corrected
8*a(n) + 4 = A046109(n) for n > 0. - Ralf Stephan, Mar 14 2004
a(n) = 0 for n in A004144. - Lekraj Beedassy, May 14 2004
a(A084645(k)) = 1. - Ruediger Jehn, Jan 14 2022
a(A084646(k)) = 2. - Ruediger Jehn, Jan 14 2022
a(A084647(k)) = 3. - Jean-Christophe Hervé, Dec 01 2013
a(A084648(k)) = 4. - Jean-Christophe Hervé, Dec 01 2013
a(A084649(k)) = 5. - Jean-Christophe Hervé, Dec 01 2013
a(n) = A063725(n^2) / 2. - Michael Somos, Mar 29 2015
a(n) = Sum_{k=1..n} Sum_{i=1..k} [i^2 + k^2 = n^2], where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Dec 10 2021
a(A002144(k)^n) = n. - Ruediger Jehn, Jan 14 2022

A071383 Squared radii of the circles around (0,0) that contain record numbers of lattice points.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, May 23 2002

Keywords

Comments

The number of lattice points (i,j) on the circle with i^2 + j^2 = a(n) is given by A071385(n).
In a sci.math posting on May 05 2002 entitled "Circle with 3 lattice points", James R. Buddenhagen asked: Which circles have the property that they pass through more lattice points than any smaller circle? and he gave the terms 1, 25, 65, 325, 1105, 4225, 5525, with the missing 5 added by Ahmed Fares. In the same thread Gerry Myerson mentioned the factorization into primes of the form 4*k+1.
Also, numbers with a record number of divisors all of whose prime factors are of the form 4k + 1. - Amiram Eldar, Sep 12 2019
Indices of records of A004018. Apart from the first term, also indices of records of A002654. - Jianing Song, May 20 2021

Crossrefs

Cf. A000448, A048610, A052199, A071384, A071385, A230655, A300162. Subsequence of A054994 (excluding first term). Where records occur in A004018. See A088959 for circles with integer radius.
Indices of records of Sum_{d|n} kronecker(m, d): A230655 (m=-3), this sequence (m=-4), A279541 (m=-6).

Programs

  • PARI
    my(v=list(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 A054994
    
  • 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,radius=1,1,0
    print(radius, end="") # or record, for A071385
    for radius,expo in generate_A054994():
        num_points = 4*prod((e+1) for e in expo)
        if num_points>record:
            record = num_points
            n += 1
            print (",", radius, end="") # or record, for A071385
            if n==27: break
    print()
    # Günter Rote, Sep 12 2023

Formula

For n>1 we have 1 < a(n+1)/a(n) <= 5, since one can multiply the points x+iy for which x^2 + y^2 = N by either 2+i or 2-i to get two new sets of points X+iY for which X^2 + Y^2 = 5N. This strictly increases the number since it is easy to see that the two sets aren't the same. - J. H. Conway, Jun 04 2002
lim n ->infinity Log(a(n))/n = 1. [Conjectured by Benoit Cloitre, proved by J. H. Conway]
Showing 1-4 of 4 results.