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

A088899 T(n, k) = number of ordered pairs of integers (x,y) with x^2/n^2 + y^2/k^2 = 1, 1 <= k <= n; triangular array, read by rows.

Original entry on oeis.org

4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 12, 4, 4, 4, 4, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 21 2003

Keywords

Comments

T(n,k) is the number of lattice points on the circumference of an ellipse with semimajor axis = n, semiminor axis = k and center = (0,0).

Examples

			From _Antti Karttunen_, Nov 08 2018: (Start)
Triangle begins:
---------------------------------------------------------------
k=    1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
---------------------------------------------------------------
n= 1: 4;
n= 2: 4,  4;
n= 3: 4,  4,  4;
n= 4: 4,  4,  4,  4;
n= 5: 4,  4,  4,  4, 12;
n= 6: 4,  4,  4,  4,  4,  4;
n= 7: 4,  4,  4,  4,  4,  4,  4;
n= 8: 4,  4,  4,  4,  4,  4,  4,  4;
n= 9: 4,  4,  4,  4,  4,  4,  4,  4,  4;
n=10: 4,  4,  4,  4, 12,  4,  4,  4,  4, 12;
n=11: 4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4;
n=12: 4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4;
n=13: 4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4, 12;
n=14: 4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4;
n=15: 4,  4,  4,  4, 12,  4,  4,  4,  4, 12,  4,  4,  4,  4, 12;
---
T(5,5) = 12 as there are following 12 solutions for pair (5,5): (5, 0), (4, 3), (3, 4), (0, 5), (-3, 4), (-4, 3), (-5, 0), (-4, -3), (-3, -4), (0, -5), (3, -4), (4, -3).
T(15,10) = 12, as there are following 12 solutions for pair (15,10): (-15,0), (-12,-6), (-12,6), (-9,-8), (-9,8), (0,-10), (0,10), (9,-8), (9,8), (12,-6), (12,6), (15,0).
(End)
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := Reduce[x^2/n^2 + y^2/k^2 == 1, {x, y}, Integers] // Length;
    Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 27 2021 *)
  • PARI
    up_to = 105;
    A088899tr(n,k) = { my(s=0, t=(n^2)*(k^2)); for(x=-n,n,for(y=-k,k,if((x*x*k*k)+(y*y*n*n) == t, s++))); (s); };
    A088899list(up_to) = { my(v = vector(up_to), i=0); for(n=1,oo, for(k=1,n, if(i++ > up_to, return(v)); v[i] = A088899tr(n,k))); (v); };
    v088899 = A088899list(up_to);
    A088899(n) = v088899[n]; \\ Antti Karttunen, Nov 07 2018

Formula

a(n) = A088897(n) - A088898(n);
T(n,n) = A046109(n).

A292276 a(n) = number of vertices of the convex hull of the set of points of norm <= n^2 in square lattice.

Original entry on oeis.org

1, 4, 4, 8, 12, 12, 12, 12, 20, 12, 20, 20, 20, 20, 20, 20, 20, 24, 28, 20, 20, 20, 36, 36, 28, 20, 36, 36, 36, 36, 28, 36, 36, 36, 44, 36, 36, 36, 36, 52, 44, 36, 36, 36, 52, 44, 52, 52, 44, 52, 44, 60, 52, 44, 52, 44, 52, 52, 52, 52, 60, 52, 52, 52, 68, 44
Offset: 0

Views

Author

Rémy Sigrist, Sep 13 2017

Keywords

Comments

The convex hull of a finite point set in dimension 2, say S, forms a convex polygon whose vertices are in S.
For any n >= 0, A000328(n) gives the number of elements of the set of points of norm <= n^2 in square lattice.
For symmetry reasons, a(n) is a multiple of 4 for any n > 0.

Examples

			See Links section.
		

Crossrefs

A046110 Number of lattice points on circumference of a circle of radius (2n+1)/2 with center at (1/2,0).

Original entry on oeis.org

2, 2, 6, 2, 2, 2, 6, 6, 6, 2, 2, 2, 10, 2, 6, 2, 2, 6, 6, 6, 6, 2, 6, 2, 2, 6, 6, 6, 2, 2, 6, 2, 18, 2, 2, 2, 6, 10, 2, 2, 2, 2, 18, 6, 6, 6, 2, 6, 6, 2, 6, 2, 6, 2, 6, 6, 6, 6, 6, 6, 2, 6, 14, 2, 2, 2, 2, 6, 6, 2, 2, 6, 18, 2, 6, 2, 6, 6, 6, 6, 2, 2, 6, 2, 10, 2, 6, 10, 2, 2, 6, 6, 18, 6, 2, 2, 6, 18
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A046109.

Formula

a(n) = 4 * A046080(2*n+1) + 2. - Sean A. Irvine, Apr 02 2021

A046111 Number of lattice points on circumference of a circle of radius 1/3,2/3,4/3,5/3,... with center at (1/3,0).

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1, 1, 5, 3, 1, 3, 1, 1, 3, 3, 3, 1, 3, 3, 1, 1, 1, 1, 1, 5, 3, 3, 3, 1, 3, 1, 3, 1, 1, 9, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 3, 1, 9, 1, 1, 3, 3, 1, 1, 3, 3, 1, 5, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, 1, 3, 1, 7, 1, 1, 9, 1, 1, 1, 3, 3, 1, 3, 1, 3, 9, 3, 3, 3, 1, 1
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A046109.

A256452 Number of integer solutions to n^2 = x^2 + y^2 with x>0, y>=0.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3, 1, 3, 1, 3, 1, 1, 3, 1, 1, 1, 1, 5, 3, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 1, 3, 3, 3, 1, 1, 1, 3, 1, 1, 1, 1, 5, 3, 3, 3, 1, 3, 1, 1, 3, 1, 3, 3, 1, 1, 1, 9, 1, 1, 3, 1, 3, 1, 1, 3, 3, 5, 1, 1, 3, 1, 3, 1, 3, 1, 1, 9, 1, 3
Offset: 1

Views

Author

Michael Somos, Mar 29 2015

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(d::odd, (-1)^((d-1)/2), 0), d=numtheory[divisors](n^2)): seq(a(n), n=1..100);  # Ridouane Oudra, Aug 18 2024
  • Mathematica
    a[ n_] := Sum[ Mod[ Length@Divisors[n^2 - k^2], 2], {k, n}];
    a[ n_] := Length @ FindInstance[ n^2 == x^2 + y^2 && x > 0 && y >= 0, {x, y}, Integers, 10^9]; (* Michael Somos, Aug 15 2016 *)
    f[p_, e_] := If[Mod[p, 4] == 1, 2*e + 1, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 12 2020 *)
  • PARI
    {a(n) = sum(k=1, n, issquare(n^2 - k^2))};

Formula

Multiplicative with a(p^e) = 2*e + 1 if p == 1 (mod 4), otherwise a(p^e) = 1.
a(n) = 1 + 2*A046080(n) if n>0.
a(n) = A046109(n)/4 for n > 0. - Hugo Pfoertner, Sep 21 2023
a(n) = A002654(n^2). - Ridouane Oudra, Aug 18 2024

A349538 The number of pseudo-Pythagorean triples (which allow negative or 0 sides) on a 2D lattice that are on or inside a circle of radius n.

Original entry on oeis.org

1, 5, 9, 13, 17, 29, 33, 37, 41, 45, 57, 61, 65, 77, 81, 93, 97, 109, 113, 117, 129, 133, 137, 141, 145, 165, 177, 181, 185, 197, 209, 213, 217, 221, 233, 245, 249, 261, 265, 277, 289, 301, 305, 309, 313, 325, 329, 333, 337, 341, 361, 373, 385, 397, 401, 413, 417, 421, 433, 437, 449
Offset: 0

Views

Author

Alexander Kritov, Nov 21 2021

Keywords

Comments

Consider a 2D lattice, where the Cartesian coordinates x and y are legs of the Pythagorean triangle. Thus the notion of Pythagorean triple is extended to the cases when sides x, y are in Z (i.e., sides also include negative integers and zero). The sequence gives the number of such triples on or inside a circle of radius n.
Partial sums of A046109.

Examples

			Sides (coordinates)                                                       a(n)
------------------------------------------------------------------------------
(0,0)                                                                       1
(-1,0)(0,-1)(0,1)(1,0)                                                      5
(-2,0)(0,-2)(0,2)(2,0)                                                      9
(-3,0)(0,-3)(0,3)(3,0)                                                     13
(-4,0)(0,-4)(0,4)(4,0)                                                     17
(-5,0)(-4,-3)(-4,3)(-3,-4)(-3,4)(0,-5)(0,5)(3,-4)(3,4)(4,-3)(4,3)(5,0)     29
(-6,0)(0,-6)(0,6)(6,0)                                                     33
(-7,0)(0,-7)(0,7)(7,0)                                                     37
(-8,0)(0,-8)(0,8)(8,0)                                                     41
(-9,0)(0,-9)(0,9)(9,0)                                                     45
(-10,0)(-8,-6)(-8,6)(-6,-8)(-6,8)(0,-10)(0,10)(6,-8)(6,8)(8,-6)(8,6)(10,0) 57
(-11,0)(0,-11)(0,11)(11,0)                                                 61
(-12,0)(0,-12)(0,12)(12,0)                                                 65
		

Crossrefs

Cf. A046080, A211432, A046109 (first differences), A349536 (in 1/8 sector).

Programs

  • C
    /* See links */
    
  • PARI
    f(n) = if(n==0, return(1)); my(f=factor(n)); 4*prod(i=1, #f~, if(f[i, 1]%4==1, 2*f[i, 2]+1, 1)); \\ A046109
    a(n) = sum(k=0, n, f(k)); \\ Michel Marcus, Nov 27 2021

Formula

a(n) = (A211432(n) + 1)/2.
a(n) = a(n-1) + 4 + 8*A046080(n).

A355760 a(n) is the number of grid points in a square lattice covered by the area enclosed by n loops of an Archimedean spiral with starting point (0, 0) and endpoint (n, 0).

Original entry on oeis.org

1, 2, 8, 21, 40, 64, 97, 132, 178, 228, 282, 350, 415, 492, 574, 660, 756, 855, 962, 1076, 1195, 1322, 1451, 1590, 1736, 1885, 2044, 2204, 2378, 2552, 2734, 2922, 3116, 3317, 3525, 3741, 3960, 4187, 4416, 4655, 4900, 5154, 5410, 5674, 5946, 6223, 6502, 6791, 7087, 7391, 7698
Offset: 0

Views

Author

Karl-Heinz Hofmann, Jul 16 2022

Keywords

Comments

Grid points coincident with the outer boundary of the spiral are included.
The spiral figure is closed with a line from (n, 0) to (n-1, 0).
Conjecture: Only lattice points on the positive x-axis are on the outer boundary of the spiral. It seems that the spiral passes all other grid points without hitting any.

Examples

			See the PDF in links.
		

Crossrefs

A350459 Number of positive rational points on the unit circle with denominator <= n and numerator >= 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 1, 4, 4, 4, 5, 5, 10, 10, 11, 11, 11, 19, 19, 19, 19, 19, 29, 32, 32, 32, 33, 44, 44, 44, 44, 47, 60, 60, 61, 61, 66, 82, 83, 83, 83, 83, 100, 100, 100, 100, 100, 122, 127, 134, 135, 135, 156, 156, 156, 159, 159, 183, 184, 184, 184, 184, 220, 220, 220, 227, 227, 254
Offset: 1

Views

Author

Benoit Cloitre, Jan 01 2022

Keywords

Comments

A rational point (x,y) is of the form (a/c, b/d) with (a,b,c,d) integers. Sequence gives the number of quadruples (a,b,c,d) satisfying a >= b >= 1, 1 <= c <= n, 1 <= d <= n and such that a^2/c^2 + b^2/d^2 = 1.

Crossrefs

Cf. A046109.

Programs

  • PARI
    a(n)=sum(a=1,n,sum(b=1,a,sum(c=1,n,sum(d=1,n,if(a^2/c^2+b^2/d^2-1,0,1)))))
    
  • Python
    def A350459(n): return sum(1 for d in range(1,n+1) for c in range(1,n+1) for b in range(1,d+1) for a in range(1, b+1) if (a*d)**2 + (b*c)**2 == (c*d)**2) # Chai Wah Wu, Jan 19 2022

A309573 a(n) is the sum of lattice points enumerated by the square number spiral falling on the circumference of circles centered at the origin of radii n.

Original entry on oeis.org

0, 16, 64, 144, 256, 912, 576, 784, 1024, 1296, 3648, 1936, 2304, 7312, 3136, 8208, 4096, 11824, 5184, 5776, 14592, 7056, 7744, 8464, 9216, 41232, 29248, 11664, 12544, 27568, 32832, 15376, 16384, 17424, 47296, 44688, 20736, 61104, 23104, 65808, 58368, 78096, 28224, 29584, 30976, 73872
Offset: 0

Views

Author

Torlach Rush, Aug 08 2019

Keywords

Comments

For this sequence the square spiral begins with 0 and is the second illustration in the comments of A317186, where 0 is the origin of our circles.
a(n) >= A001107(n) + A033991(n) + A007742(n) + A033954(n).
a(n) = A016802(n) iff A046109(n) = 4.
a(n) = A016802(n) iff n <> k * A002144(m), k,m >= 1.
a(n) is congruent to 0 mod 16 and is the sum of one or more terms of A016802.
Conjecture: a(n) is a term of A277699 iff a(n)/16 = A277699(n).

Examples

			16 is a term because 16 = 16*(1)^2.
912 is a term because 912 = 16*(5)^2 + (2*(16*(4)^2)).
41232 is a term because 41232 = 16*(25)^2 + (2*((16*(24)^2) + (16*(20)^2))).
		

Crossrefs

Programs

  • PARI
    Tb(n) = {return(16 * n * n)}
    llsum(n) = {my(x=0); for (i = 1, n - 2, for (ii = i+1, n - 1, if(n*n == (ii*ii) + (i*i), x+=(2 * Tb(ii))))); return(x)}
    Tx(n) = {my(x=0); forprimestep(x = 5, n, 4, if(n%x==0, return(llsum(n))))}
    Tn(n) = {for (i = 0, n, print1(Tb(i) + Tx(i), ", "))}
    Tn(45)

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.
Previous Showing 21-30 of 30 results.