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.

Previous Showing 21-29 of 29 results.

A372511 Number of solutions to x^2 + y^2 <= n, where x, y are positive odd integers.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 17
Offset: 0

Views

Author

Ilya Gutkovskiy, May 04 2024

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 85; CoefficientList[Series[EllipticTheta[2, 0, x^4]^2/(4 (1 - x)), {x, 0, nmax}], x]

A073092 Number of numbers of the form x^2 + y^2 (0 <= x <= y) less than or equal to n.

Original entry on oeis.org

1, 2, 3, 3, 4, 5, 5, 5, 6, 7, 8, 8, 8, 9, 9, 9, 10, 11, 12, 12, 13, 13, 13, 13, 13, 15, 16, 16, 16, 17, 17, 17, 18, 18, 19, 19, 20, 21, 21, 21, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 27, 27, 28, 29, 29, 29, 29, 29, 30, 30, 30, 31, 31, 31, 32, 34, 34, 34, 35, 35, 35, 35, 36, 37, 38
Offset: 0

Views

Author

Benoit Cloitre, Aug 18 2002

Keywords

Examples

			0^2 + 0^2, 0^2 + 1^2, 1^2 + 1^2 are less than or equal to 2 hence a(2) = 3.
		

Crossrefs

Programs

  • Mathematica
    Accumulate @ Table[Length @ PowersRepresentations[n, 2, 2], {n, 0, 100}] (* Amiram Eldar, Mar 08 2020 *)
  • PARI
    a(n)=sum(x=0,n,sum(y=0,x,if((sign(x^2+y^2-n)+1)*sign(x^2+y^2-n),0,1)))
    
  • Python
    from itertools import count, islice
    from math import prod
    from sympy import factorint
    def A073092_gen(): # generator of terms
        yield (c:=1)
        for n in count(1):
            f = factorint(n)
            c += int(not any(e&1 for e in f.values())) + (((m:=prod(1 if p==2 else (e+1 if p&3==1 else (e+1)&1) for p, e in f.items()))+((((~n & n-1).bit_length()&1)<<1)-1 if m&1 else 0))>>1)
            yield c
    A073092_list = list(islice(A073092_gen(),30)) # Chai Wah Wu, Sep 08 2022

Formula

a(n) = Sum_{k=0..n} A000161(k).
a(n) is asymptotic to Pi*n/8.

A156790 Number of first quadrant lattice squares inside the circle x^2+y^2=(2^n)^2.

Original entry on oeis.org

0, 1, 8, 41, 183, 770, 3149, 12730, 51209, 205356, 822500, 3292134, 13172634, 52698912, 210812207, 843281848, 3373193506, 13492906143, 53971888157, 215888078393, 863553363881, 3454215553470, 13816866413106, 55267474046659
Offset: 0

Views

Author

Jaume Oliver Lafont, Feb 15 2009

Keywords

Comments

a(n)/4^n converges to Pi/4 from below.

Examples

			Let + represent a square inside the circle and x a square traversed by the circle.
xx
+x a(1)=1
xxx
++xx
+++x
+++x a(2)=8
		

Crossrefs

Cf. A057655.
Cf. A177144. [From Jaume Oliver Lafont, May 03 2010]

Programs

  • PARI
    a(n)=sum(m=1,2^n-1,floor(sqrt(4^n-m^2)))

Extensions

a(19) corrected by Sophia Keith, Sep 15 2024

A175373 Partial sums of A175372.

Original entry on oeis.org

1, 5, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 13, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25
Offset: 0

Views

Author

R. J. Mathar, Apr 24 2010

Keywords

Comments

Number of integer pairs (x,y) satisfying x^4+y^4 <= n, any -n <= x,y <=n.

Examples

			a(6) = 9 counts (x,y) = (-1,-1), (-1,0), (-1,1), (0,-1), (0,0), (0,1), (1,-1), (1,0) and (1,1).
		

Crossrefs

A256465 Number of points in a circle of squared radius n, points on the circle counted half.

Original entry on oeis.org

3, 7, 9, 11, 17, 21, 21, 23, 27, 33, 37, 37, 41, 45, 45, 47, 53, 59, 61, 65, 69, 69, 69, 69, 75, 85, 89, 89, 93, 97, 97, 99, 101, 105, 109, 111, 117, 121, 121, 125, 133, 137, 137, 137, 141, 145, 145, 145, 147, 155, 161, 165, 173, 177, 177, 177, 177, 181, 185
Offset: 1

Views

Author

R. J. Mathar, Mar 30 2015

Keywords

Crossrefs

Formula

a(n) = A057655(n) - A004018(n)/2.

A333597 The number of unit cells intersected by the circumference of a circle centered on the origin with radius squared equal to the norm of the Gaussian integers A001481(n).

Original entry on oeis.org

0, 4, 8, 12, 12, 16, 20, 20, 20, 28, 28, 32, 28, 28, 36, 36, 40, 36, 44, 44, 44, 44, 44, 52, 48, 52, 52, 52, 52, 60, 52, 60, 64, 60, 60, 60, 68, 68, 60, 68, 68, 68, 72, 68, 76, 76, 76, 76, 76, 76, 76, 84, 84, 76, 88, 76, 84, 84, 92, 84, 92
Offset: 1

Views

Author

Scott R. Shannon, Mar 28 2020

Keywords

Comments

Draw a circle on a 2D square grid centered at the origin with a radius squared equal to the norm of the Gaussian integers A001481(n). See the images in the links. This sequence gives the number of unit cells intersected by the circumference of the circle. Equivalently this is the number of intersections of the circumference with the x and y integer grid lines.

Crossrefs

Cf. A001481, A055025, A057655, A119439, A242118 (a subsequence of this sequence), A234300.

Formula

a(n) = 4*A234300(2*(n-1)). - Andrey Zabolotskiy, Feb 22 2025

A363341 Number of positive integers k <= n such that round(n/k) is odd.

Original entry on oeis.org

1, 1, 2, 2, 4, 3, 4, 4, 6, 7, 6, 5, 9, 8, 9, 9, 10, 10, 11, 12, 13, 12, 13, 12, 15, 16, 17, 16, 17, 16, 17, 17, 20, 21, 20, 20, 23, 22, 21, 22, 24, 23, 26, 25, 28, 27, 26, 25, 27, 29, 30, 31, 32, 31, 32, 31, 32, 33, 34, 33, 35, 34, 37, 37, 40, 39, 38, 39, 40
Offset: 1

Views

Author

Caleb M. Shor, May 28 2023

Keywords

Comments

Here round(x) = floor(x + 1/2).
a(n) is related to the number of lattice points in a circle. Let C(x) equal the number of square lattice points in a circle of radius sqrt(x) centered at the origin. Then a(n) = (C(2n) - 4n - 1)/4. (Prop 3.5 in Dent & Shor paper)

Examples

			For n=5: round(5/1), round(5/2), round(5/3), round(5/4), round(5/5) = 5, 3, 2, 1, 1 among which 4 are odd so a(5)=4.
		

Crossrefs

Cf. A059851 (number of k=1..n such that floor(n/k) is odd).
Cf. A330926 (number of k=1..n such that ceiling(n/k) is odd).
Cf. A057655 (number of lattice points in circle).
Cf. A001826 (d_1), A001842 (d_3), A002654 (d_1-d_3).
Cf. A077024 (n + floor(2n/3) + floor(2n/5) + floor(2n/7) + ...).

Programs

  • Maple
    f:= proc(n) local k;
       nops(select(k -> floor(n/k + 1/2)::odd, [$1..n]))
    end proc:
    map(f, [$1..120]); # Robert Israel, Aug 03 2025
  • PARI
    a(n) = sum(k=1, n, round(n/k)%2) \\ Andrew Howroyd, May 28 2023

Formula

a(n) = n - floor(2n/3) + floor(2n/5) - floor(2n/7) + ...
a(n) = -n + Sum_{k=1..2n} d_1(k) - d_3(k), where d_i(k) is the number of divisors of k that are congruent to i modulo 4.

A356435 a(n) is the minimum number of Z x Z lattice points inside or on a circle of radius n^(1/2) for any position of the center of the circle.

Original entry on oeis.org

0, 2, 4, 8, 10, 14, 16, 20, 22, 26, 29, 32, 32, 39, 41, 44, 46, 51, 52, 56, 58, 62, 66, 69, 69, 74, 79, 82, 85, 88, 88, 92, 96, 100, 103, 106, 108, 113, 116, 119, 120, 122, 124, 132, 135, 138, 141, 143, 145, 146, 152, 158, 160, 164, 164, 166, 172, 175, 179, 181, 184, 186, 189, 193, 194, 199
Offset: 0

Views

Author

Bernard Montaron, Aug 07 2022

Keywords

Comments

a(n) <= A057655(n).
The terms of square index of this sequence are such that a(n^2) = A123689(2n) >= A291259(n), e.g., a(9) = 26 = A123689(6) >= A291259(3) = 25.

Examples

			For n = 1 the minimum number of Z x Z lattice points inside the circle is a(1) = 2. The minimum is obtained, for example, with the circle centered at x = 0.1, y = 0.
		

Crossrefs

Formula

Let N(u,v,n) be the number of integer solutions (x,y) of (x-u)^2 + (y-v)^2 <= n. Then a(n) is the minimum of N(u,v,n) taken over 0 <= u <= 1/2 and 0 <= v <= u. Due to the symmetries of the square lattice one can limit the position (u,v) of the circle center within this triangle. The terms of the sequence were found by "brute force" search of the minimum of N(u,v,n) for (u,v) running through the triangular domain above.

A356462 a(n) is the maximum number of Z x Z lattice points inside or on a circle of radius n^(1/2) for any position of the center of the circle.

Original entry on oeis.org

1, 5, 9, 12, 14, 21, 21, 24, 28, 32, 37, 37, 41, 45, 48, 52, 52, 57, 61, 63, 69, 69, 72, 76, 78, 81, 89, 89, 92, 97, 97, 100, 104, 112, 112, 115, 116, 121, 122, 127, 129, 137, 137, 140, 144, 148, 148, 152, 155, 157, 161, 164, 169, 177, 177
Offset: 0

Views

Author

Bernard Montaron, Aug 08 2022

Keywords

Comments

a(n) >= A057655(n).
The terms of square index of this sequence are such that a(n^2) = A123690(2n), e.g., a(9) = 32 = A123690(6).

Examples

			For n = 1 the maximum number of Z x Z lattice points inside the circle is a(1) = 5. The maximum is obtained with the circle centered at x = 0, y = 0.
		

Crossrefs

Formula

Let N(u,v,n) be the number of integer solutions (x,y) of (x-u)^2 + (y-v)^2 <= n. Then a(n) is the maximum of N(u,v,n) taken over 0 <= u <= 1/2 and 0 <= v <= u. The symmetries of the square lattice allow to limit the domain of the circle center (u,v) to this triangle. The terms of this sequence were found by "brute force" search of the maximum of N(u,v,n) for (u,v) in this triangular domain.
Previous Showing 21-29 of 29 results.