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

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

A000328 Number of points of norm <= n^2 in square lattice.

Original entry on oeis.org

1, 5, 13, 29, 49, 81, 113, 149, 197, 253, 317, 377, 441, 529, 613, 709, 797, 901, 1009, 1129, 1257, 1373, 1517, 1653, 1793, 1961, 2121, 2289, 2453, 2629, 2821, 3001, 3209, 3409, 3625, 3853, 4053, 4293, 4513, 4777, 5025, 5261, 5525, 5789, 6077, 6361, 6625
Offset: 0

Views

Author

Keywords

Comments

Number of ordered pairs of integers (x,y) with x^2 + y^2 <= n^2.

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 106.
  • H. Gupta, A Table of Values of N_3(t), Proc. National Institute of Sciences of India, 13 (1947), 35-63.
  • C. D. Olds, A. Lax and G. P. Davidoff, The Geometry of Numbers, Math. Assoc. Amer., 2000, p. 47.
  • 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).

Crossrefs

Column k=2 of A302997.
Equals A051132 + A046109. For another version see A057655.

Programs

  • Haskell
    a000328 n = length [(x,y) | x <- [-n..n], y <- [-n..n], x^2 + y^2 <= n^2]
    -- Reinhard Zumkeller, Jan 23 2012
    
  • Mathematica
    Table[Sum[SquaresR[2, k], {k, 0, n^2}], {n, 0, 46}]
  • PARI
    { a(n) = 1 + 4 * sum(j=0,n^2\4, n^2\(4*j+1) - n^2\(4*j+3) ) } /* Max Alekseyev, Nov 18 2007 */
    
  • Python
    def A000328(n):
        return (sum([int((n**2 - y**2)**0.5) for y in range(1, n)]) * 4 + 4*n + 1)
        # Karl-Heinz Hofmann, Aug 03 2022
    
  • Python
    from math import isqrt
    def A000328(n): return 1+(sum(isqrt(k*((n<<1)-k)) for k in range(1,n+1))<<2) # Chai Wah Wu, Feb 12 2025

Formula

a(n) = 1 + 4 * Sum_{j>=0} floor(n^2/(4*j+1)) - floor(n^2/(4*j+3)). Also a(n) = A057655(n^2). - Max Alekseyev, Nov 18 2007
a(n) = 4*A000603(n) - (4*n+3), n >= 0. - Wolfdieter Lang, Mar 15 2015
a(n) = 1+4*n^2-4*ceiling((n-1)/sqrt(2))-8*A247588(n-1), n>1. - Mats Granvik, May 23 2015
a(n) = [x^(n^2)] theta_3(x)^2/(1 - x), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 14 2018
Limit_{n->oo} a(n)/n^2 = Pi. - Chai Wah Wu, Feb 12 2025

Extensions

More terms from David W. Wilson, May 22 2000
Edited at the suggestion of Max Alekseyev by N. J. A. Sloane, Nov 18 2007
Incorrect comment removed by Eric M. Schmidt, May 28 2015

A084645 Hypotenuses for which there exists a unique integer-sided right triangle.

Original entry on oeis.org

5, 10, 13, 15, 17, 20, 26, 29, 30, 34, 35, 37, 39, 40, 41, 45, 51, 52, 53, 55, 58, 60, 61, 68, 70, 73, 74, 78, 80, 82, 87, 89, 90, 91, 95, 97, 101, 102, 104, 105, 106, 109, 110, 111, 113, 115, 116, 117, 119, 120, 122, 123, 135, 136, 137, 140, 143, 146, 148, 149
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

Numbers whose square is uniquely decomposable into the sum of two nonzero squares: these are those numbers with exactly one prime divisor of the form 4k+1 with multiplicity one. - Jean-Christophe Hervé, Nov 11 2013

Crossrefs

Cf. A004144 (0), A084646 (2), A084647 (3), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    r[a_] := {b, c} /. {ToRules[ Reduce[0 < b < c && a^2 == b^2 + c^2, {b, c}, Integers]]}; Select[ Range[150], Length[r[#]] == 1 &] (* Jean-François Alcover, Oct 22 2012 *)
  • PARI
    is_a084645(n) = #qfbsolve(Qfb(1,0,1),n^2,3)==3 \\ Hugo Pfoertner, Sep 28 2024

Formula

Terms are obtained by the products A004144(k)*A002144(p) for k, p > 0, ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013
A046080(a(n)) = 1, A046109(a(n)) = 12. - Jean-Christophe Hervé, Dec 01 2013

A084647 Hypotenuses for which there exist exactly 3 distinct integer triangles.

Original entry on oeis.org

125, 250, 375, 500, 750, 875, 1000, 1125, 1375, 1500, 1750, 2000, 2197, 2250, 2375, 2625, 2750, 2875, 3000, 3375, 3500, 3875, 4000, 4125, 4394, 4500, 4750, 4913, 5250, 5375, 5500, 5750, 5875, 6000, 6125, 6591, 6750, 7000, 7125, 7375, 7750
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

Numbers whose square is decomposable in 3 different ways into the sum of two nonzero squares: these are those with exactly one prime divisor of the form 4k+1 with multiplicity three. - Jean-Christophe Hervé, Nov 11 2013

Examples

			a(1) = 125 = 5^3, and 125^2 = 100^2 + 75^2 = 117^2 + 44^2 = 120^2 + 35^2. - _Jean-Christophe Hervé_, Nov 11 2013
		

Crossrefs

Cf. A004144 (0), A084645 (1), A084646 (2), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    Clear[lst,f,n,i,k] f[n_]:=Module[{i=0,k=0},Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]],k++ ],{i,n-1,1,-1}]; k/2]; lst={}; Do[If[f[n]==3,AppendTo[lst,n]],{n,4*5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)

Formula

Terms are obtained by the products A004144(k)*A002144(p)^3 for k, p > 0, ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013

A084648 Hypotenuses for which there exist exactly 4 distinct integer triangles.

Original entry on oeis.org

65, 85, 130, 145, 170, 185, 195, 205, 221, 255, 260, 265, 290, 305, 340, 365, 370, 377, 390, 410, 435, 442, 445, 455, 481, 485, 493, 505, 510, 520, 530, 533, 545, 555, 565, 580, 585, 595, 610, 615, 625, 629, 663, 680, 685, 689, 697, 715, 730, 740, 745
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

Numbers whose square is decomposable in 4 different ways into the sum of two nonzero squares: these are those with exactly 2 distinct prime divisors of the form 4k+1, each with multiplicity one, or with only one prime divisor of this form with multiplicity 4. - Jean-Christophe Hervé, Nov 11 2013
If m is a term, then 2*m and p*m are terms where p is any prime of the form 4k+3. - Ray Chandler, Dec 30 2019

Examples

			a(1) = 65 = 5*13, and 65^2 = 52^2 + 39^2 = 56^2 + 33^2 = 60^2 + 25^2 = 63^2 + 16^2. - _Jean-Christophe Hervé_, Nov 11 2013
		

Crossrefs

Cf. A004144 (0), A084645 (1), A084646 (2), A084647 (3), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    Clear[lst,f,n,i,k] f[n_]:=Module[{i=0,k=0},Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]],k++ ],{i,n-1,1,-1}]; k/2]; lst={}; Do[If[f[n]==4,AppendTo[lst,n]],{n,6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)

A084649 Hypotenuses for which there exist exactly 5 distinct Pythagorean triangles.

Original entry on oeis.org

3125, 6250, 9375, 12500, 18750, 21875, 25000, 28125, 34375, 37500, 43750, 50000, 56250, 59375, 65625, 68750, 71875, 75000, 84375, 87500, 96875, 100000, 103125, 112500, 118750, 131250, 134375, 137500, 143750, 146875, 150000, 153125
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

Numbers whose square is decomposable in 5 different ways into the sum of two nonzero squares: these are those with exactly one prime divisor of the form 4k+1 with multiplicity 5. - Jean-Christophe Hervé, Nov 12 2013

Examples

			a(1) = 5^5, a(5) = 6*5^5, a(65) = 13^5. - _Jean-Christophe Hervé_, Nov 12 2013
		

Crossrefs

Cf. A004144 (0), A084645 (1), A084646 (2), A084647 (3), A084648 (4), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    Clear[lst,f,n,i,k] f[n_]:=Module[{i=0,k=0},Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]],k++ ],{i,n-1,1,-1}]; k/2]; lst={}; Do[If[f[n]==5,AppendTo[lst,n]],{n,3*6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)

Formula

Terms are obtained by the products A004144(k)*A002144(p)^5 for k, p > 0 ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013

A084646 Hypotenuses for which there exist exactly 2 distinct integer triangles.

Original entry on oeis.org

25, 50, 75, 100, 150, 169, 175, 200, 225, 275, 289, 300, 338, 350, 400, 450, 475, 507, 525, 550, 575, 578, 600, 675, 676, 700, 775, 800, 825, 841, 867, 900, 950, 1014, 1050, 1075, 1100, 1150, 1156, 1175, 1183, 1200, 1225, 1350, 1352, 1369, 1400
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

Numbers whose square is decomposable in 2 different ways into the sum of two nonzero squares: these are those with exactly one prime divisor of the form 4k+1 with multiplicity two. - Jean-Christophe Hervé, Nov 11 2013

Crossrefs

Cf. A004144 (0), A084645 (1), A084647 (3), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    Clear[lst,f,n,i,k] f[n_]:=Module[{i=0,k=0},Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]],k++ ],{i,n-1,1,-1}]; k/2]; lst={}; Do[If[f[n]==2,AppendTo[lst,n]],{n,4*5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)

Formula

Terms are obtained by the products A004144(k)*A002144(p)^2 for k, p > 0, ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013
A046080(a(n)) = 2, A046109(a(n)) = 20. - Jean-Christophe Hervé, Dec 01 2013

A290499 Hypotenuses for which there exist exactly 8 distinct integer triangles.

Original entry on oeis.org

390625, 781250, 1171875, 1562500, 2343750, 2734375, 3125000, 3515625, 4296875, 4687500, 5468750, 6250000, 7031250, 7421875, 8203125, 8593750, 8984375, 9375000, 10546875, 10937500, 12109375, 12500000, 12890625, 14062500, 14843750, 16406250, 16796875, 17187500
Offset: 1

Views

Author

Hamdi Sahloul, Aug 04 2017

Keywords

Comments

Numbers whose square is decomposable in 8 different ways into the sum of two nonzero squares: these are those with only one prime divisor of the form 4k+1 with multiplicity eight.

Examples

			a(1) = 390625 = 5^8, a(5) = 2343750 = 2*3*5^8, a(101) = 75000000 = 2^6*3*5^8.
		

Crossrefs

Cf. A004144 (0), A084645 (1), A084646 (2), A084647 (3), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    r[a_]:={b, c}/.{ToRules[Reduce[0Vincenzo Librandi, Mar 01 2016 *)

Formula

Terms are obtained by the product A004144(k)*A002144(p)^8 for k, p > 0 ordered by increasing values.

A290500 Hypotenuses for which there exist exactly 9 distinct integer triangles.

Original entry on oeis.org

1953125, 3906250, 5859375, 7812500, 11718750, 13671875, 15625000, 17578125, 21484375, 23437500, 27343750, 31250000, 35156250, 37109375, 41015625, 42968750, 44921875, 46875000, 52734375, 54687500, 60546875, 62500000, 64453125, 70312500, 74218750, 82031250
Offset: 1

Views

Author

Hamdi Sahloul, Aug 04 2017

Keywords

Comments

Numbers whose square is decomposable in 9 different ways into the sum of two nonzero squares: these are those with only one prime divisor of the form 4k+1 with multiplicity nine.

Examples

			a(1) = 1953125 = 5^9, a(5) = 11718750 = 2*3*5^9, a(101) = 375000000 = 2^6*3*5^9.
		

Crossrefs

Cf. A004144 (0), A084645 (1), A084646 (2), A084647 (3), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    r[a_]:={b, c}/.{ToRules[Reduce[0Vincenzo Librandi, Mar 01 2016 *)

Formula

Terms are obtained by the product A004144(k)*A002144(p)^9 for k, p > 0 ordered by increasing values.

A290501 Hypotenuses for which there exist exactly 11 distinct integer triangles.

Original entry on oeis.org

48828125, 97656250, 146484375, 195312500, 292968750, 341796875, 390625000, 439453125, 537109375, 585937500, 683593750, 781250000, 878906250, 927734375, 1025390625, 1074218750, 1123046875, 1171875000, 1318359375, 1367187500, 1513671875, 1562500000, 1611328125
Offset: 1

Views

Author

Hamdi Sahloul, Aug 04 2017

Keywords

Comments

Numbers whose square is decomposable in 11 different ways into the sum of two nonzero squares: these are those with only one prime divisor of the form 4k+1 with multiplicity eleven.

Examples

			a(1) = 48828125 = 5^11, a(5) = 292968750 = 2*3*5^11, a(101) = 9375000000 = 2^6*3*5^11.
		

Crossrefs

Cf. A004144 (0), A084645 (1), A084646 (2), A084647 (3), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    r[a_]:={b, c}/.{ToRules[Reduce[0Vincenzo Librandi, Mar 01 2016 *)

Formula

Terms are obtained by the product A004144(k)*A002144(p)^11 for k, p > 0 ordered by increasing values.
Showing 1-10 of 30 results. Next