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

A007692 Numbers that are the sum of 2 nonzero squares in 2 or more ways.

Original entry on oeis.org

50, 65, 85, 125, 130, 145, 170, 185, 200, 205, 221, 250, 260, 265, 290, 305, 325, 338, 340, 365, 370, 377, 410, 425, 442, 445, 450, 481, 485, 493, 500, 505, 520, 530, 533, 545, 565, 578, 580, 585, 610, 625, 629, 650, 680, 685, 689, 697, 725, 730, 740, 745, 754, 765
Offset: 1

Views

Author

Keywords

Comments

A025426(a(n)) > 1. - Reinhard Zumkeller, Aug 16 2011
For the question that is in the link AskNRICH Archive: It is easy to show that (a^2 + b^2)*(c^2 + d^2) = (a*c + b*d)^2 + (a*d - b*c)^2 = (a*d + b*c)^2 + (a*c - b*d)^2. So terms of this sequence can be generated easily. 5 is the least number of the form a^2 + b^2 where a and b distinct positive integers and this is a list sequence. This is the why we observe that there are many terms which are divisible by 5. - Altug Alkan, May 16 2016
Square roots of square terms: {25, 50, 65, 75, 85, 100, 125, 130, 145, 150, 169, 170, 175, 185, 195, 200, 205, 221, 225, 250, 255, 260, 265, 275, 289, 290, 300, 305, ...}. They are also listed by A009177. - Michael De Vlieger, May 16 2016

Examples

			50 is a term since 1^2 + 7^2 and 5^2 + 5^2 equal 50.
25 is not a term since though 3^2 + 4^2 = 25, 25 is square, i.e., 0^2 + 5^2 = 25, leaving it with only one possible sum of 2 nonzero squares.
625 is a term since it is the sum of squares of {0,25}, {7,24}, and {15,20}.
		

References

  • Ming-Sun Li, Kathryn Robertson, Thomas J. Osler, Abdul Hassen, Christopher S. Simons and Marcus Wright, "On numbers equal to the sum of two squares in more than one way", Mathematics and Computer Education, 43 (2009), 102 - 108.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, 125.

Crossrefs

Subsequence of A001481. A subsequence is A025285 (2 ways).

Programs

  • Haskell
    import Data.List (findIndices)
    a007692 n = a007692_list !! (n-1)
    a007692_list = findIndices (> 1) a025426_list
    -- Reinhard Zumkeller, Aug 16 2011
    
  • Mathematica
    Select[Range@ 800, Length@ Select[PowersRepresentations[#, 2, 2], First@ # != 0 &] > 1 &] (* Michael De Vlieger, May 16 2016 *)
  • PARI
    isA007692(n)=nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb >= 2; \\ Altug Alkan, May 16 2016
    
  • PARI
    is(n)=my(t); if(n<9, return(0)); for(k=sqrtint(n\2-1)+1,sqrtint(n-1), if(issquare(n-k^2)&&t++>1, return(1))); 0 \\ Charles R Greathouse IV, Jun 08 2016

A025294 Numbers that are the sum of 2 nonzero squares in 3 or more ways.

Original entry on oeis.org

325, 425, 650, 725, 845, 850, 925, 1025, 1105, 1250, 1300, 1325, 1445, 1450, 1525, 1625, 1690, 1700, 1825, 1850, 1885, 2050, 2125, 2210, 2225, 2405, 2425, 2465, 2525, 2600, 2650, 2665, 2725, 2825, 2873, 2890, 2900, 2925, 3050, 3125, 3145, 3250, 3380
Offset: 1

Views

Author

Keywords

Comments

A025426(a(n)) > 2. - Reinhard Zumkeller, Feb 26 2015

Crossrefs

Complement of A025285 relative to A007692. - Washington Bomfim, Oct 24 2010
Cf. A025426.

Programs

  • Haskell
    a025294 n = a025294_list !! (n-1)
    a025294_list = filter ((> 2) . a025426) [1..]
    -- Reinhard Zumkeller, Feb 26 2015
  • Maple
      N:= 100000: # generate all entries <=N
    SSQ:= {}: SSQ2:= {}: SSQ3:= {}:
    for a from 1 to floor(sqrt(N)) do
      for b from a to floor(sqrt(N-a^2)) do
        n:= a^2 + b^2;
        if member(n,SSQ2) then SSQ3:= SSQ3 union {n}
        elif member(n,SSQ) then SSQ2:= SSQ2 union {n}
        else SSQ:= SSQ union {n}
        end if
    end do end do:
    SSQ3;  # Robert Israel, Jan 20 2013
  • Mathematica
    okQ[n_] := Length[Select[PowersRepresentations[n, 2, 2][[All, 1]], Positive] ] > 2; Select[Range[5000], okQ] (* Jean-François Alcover, Mar 04 2019 *)

A343708 Numbers that are the sum of two positive cubes in exactly two ways.

Original entry on oeis.org

1729, 4104, 13832, 20683, 32832, 39312, 40033, 46683, 64232, 65728, 110656, 110808, 134379, 149389, 165464, 171288, 195841, 216027, 216125, 262656, 314496, 320264, 327763, 373464, 402597, 439101, 443889, 513000, 513856, 515375, 525824, 558441, 593047, 684019, 704977, 805688, 842751, 885248, 886464
Offset: 1

Views

Author

David Consiglio, Jr., Apr 26 2021

Keywords

Comments

This sequence differs from A001235 at term 455 because 87539319 = 167^3 + 436^3 = 228^3 + 423^3 = 255^3 + 414^3 = A011541(3). Thus, this term is not in this sequence but is in A001235.

Examples

			13832 is in this sequence because 13832 = 2^3 + 24^3 = 18^3 + 20^3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@70000,Length@Select[PowersRepresentations[#,2,3],FreeQ[#,0]&]==2&] (* Giorgos Kalogeropoulos, Apr 26 2021 *)
  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    keep = defaultdict(lambda: 0)
    power_terms = [x**3 for x in range(1,1000)]#n
    for pos in cwr(power_terms,2):#m
        tot = sum(pos)
        keep[tot] += 1
    rets = sorted([k for k,v in keep.items() if v == 2])#s
    for x in range(len(rets)):
        print(rets[x])

A273318 Numbers n such that n+k-1 is the sum of two nonzero squares in exactly k ways for all k = 1, 2, 3.

Original entry on oeis.org

58472, 79208, 104616, 150048, 160848, 205648, 224648, 234448, 252808, 259648, 259920, 294048, 297448, 387648, 421648, 433448, 462976, 488448, 506248, 563048, 621448, 683648, 770976, 790848, 799648, 837448, 1008648, 1040848, 1084904, 1186632, 1195648, 1205648, 1212064
Offset: 1

Views

Author

Altug Alkan, May 19 2016

Keywords

Comments

Numbers n such that n+k-1 is the sum of two nonzero squares in exactly 4-k ways for all k = 1, 2, 3 are 22984, 65600, 80800, 85544, ...

Examples

			58472 is a term because;
58472 = 86^2 + 226^2.
58473 = 48^2 + 237^2 = 147^2 + 192^2.
58474 = 57^2 + 235^2 = 125^2 + 207^2 = 143^2 + 195^2.
		

Crossrefs

Programs

  • Maple
    N:= 10^6: # get all terms <= N-2
    R:= Vector(N):
    for x from 1 to floor(sqrt(N)) do
      for y from 1 to min(x,floor(sqrt(N-x^2))) do
        R[x^2+y^2]:= R[x^2+y^2]+1
    od od:
    count:= 0:
    for n from 1 to N-2 do
      if [R[n],R[n+1],R[n+2]] = [1,2,3] then
      count:= count+1; A[count]:= n;
    fi
    od:
    seq(A[i],i=1..count); # Robert Israel, May 19 2016
  • PARI
    is(n,k) = {nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb == k; }
    isok(n) = is(n,1) && is(n+1,2) && is(n+2,3);

A236711 Numbers that are the sum of 2 nonzero squares in exactly 11 ways.

Original entry on oeis.org

5281250, 9031250, 21125000, 26281250, 36125000, 42781250, 47531250, 52531250, 81281250, 84500000, 87781250, 105125000, 116281250, 126953125, 144500000, 166015625, 166531250, 171125000, 190125000, 210125000, 236531250, 241340450, 247531250, 253906250, 258781250
Offset: 1

Views

Author

Zak Seidov, Jan 30 2014

Keywords

Comments

Are all terms multiples of 5?
The answer is "no"; 2789895602 = 2 * 13^6 * 17^2 is a term that is not a multiple of 5. Is it the first such term? - Zak Seidov, Jul 05 2015
a(152) = 2789895602 is the first term that is not divisible by 5. In the first 1000 terms, the only powers to which 5 appears as a factor are 0 (for 10 terms, beginning with a(152), after which the next does not occur until a(331)), 2 (for only 14 terms, the smallest of which is a(22) = 241340450 = 2 * 5^2 * 13^6), 6 (for 360 terms), and 10 (for the remaining 616 terms). - Jon E. Schoenfield, Jul 07 2015

Examples

			5281250 = x^2 + y^2 with {x,y} = {71,2297}, {245,2285}, {325,2275}, {575,2225}, {875,2125}, {949,2093}, {1105,2015}, {1175,1975}, {1435,1795}, {1567,1681}, {1625,1625}.
		

Crossrefs

Extensions

More terms from Jon E. Schoenfield, Jul 05 2015

A273529 Primes p of the form x^2 + y^2 such that p+1 is the sum of the two nonzero squares in exactly 2 ways.

Original entry on oeis.org

337, 409, 449, 577, 1009, 1129, 1489, 1801, 2377, 2521, 2609, 2689, 2833, 3041, 3169, 3329, 3361, 3433, 3529, 3889, 4049, 4513, 4657, 5209, 5569, 5689, 5857, 5881, 5953, 6529, 6553, 6569, 7177, 7297, 8009, 8089, 8209, 8329, 8641, 8737, 8761, 9433, 9697, 9769, 10169, 10321
Offset: 1

Views

Author

Altug Alkan, May 24 2016

Keywords

Comments

Number of prime divisors (counted with multiplicity) of p+1 is 3, 3, 5, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 5, 3, 5, 3, 3, 3, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 3, 3, 3, 3, 3, 5, 3, 7, 3, 3, 5, 3, 3, 3, 5, 5, 3, 3, 3, 3, 3, ...
In this sequence, 20249 is the first p such that p+1 has even number of prime divisors (counted with multiplicity).

Examples

			The prime 409 is a term because 409 = 3^2 + 20^2 and 410 = 7^2 + 19^2 = 11^2 + 17^2.
		

Crossrefs

Programs

  • PARI
    is(n, k)=nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb == k;
    isok(n) = isprime(n) && is(n, 1) && is(n+1, 2);
    
  • PARI
    is(n)=if(n%8!=1 || !isprime(n), return(0)); my(f=factor((n+1)/2), t=1); for(i=1, #f~, if(f[i, 1]%4==1, t*=f[i, 2]+1, if(f[i, 2]%2, return(0)))); t==3 || t==4 \\ Charles R Greathouse IV, May 24 2016

Formula

a(n) mod 8 = 1.

A076520 n appears once if n is the sum of 2 nonzero squares in 1 way, twice if n is the sum of 2 squares in 2 ways, 3 times if n is the sum of 2 squares 3 ways etc.

Original entry on oeis.org

2, 5, 5, 8, 10, 10, 13, 13, 17, 17, 18, 20, 20, 25, 25, 26, 26, 29, 29, 32, 34, 34, 37, 37, 40, 40, 41, 41, 45, 45, 50, 50, 50, 52, 52, 53, 53, 58, 58, 61, 61, 65, 65, 65, 65, 68, 68, 72, 73, 73, 74, 74, 80, 80, 82, 82, 85, 85, 85, 85, 89, 89, 90, 90, 97, 97, 98, 100, 100
Offset: 1

Views

Author

Benoit Cloitre, Nov 09 2002

Keywords

Crossrefs

Programs

  • PARI
    lista(nn) = for (n=1, nn, for (i=1, n-1, if (issquare(i) && issquare(n-i), print1(n, ", ")))) \\ Michel Marcus, Nov 30 2013
    
  • PARI
    list(lim)=my(v=List());for(n=2,lim,for(k=1,sqrtint(n-1),if(issquare(n-k^2),listput(v,n))));Vec(v) \\ Charles R Greathouse IV, Dec 01 2013

Formula

Does limit n -> infinity a(n)/n exist?
Answer: Yes, and it is equal to 4/Pi. - Charles R Greathouse IV, Dec 01 2013

Extensions

Typo in definition corrected by Michel Marcus, Dec 01 2013

A273236 Primes p such that p + k is the sum of two nonzero squares in exactly k ways for all k = 1, 2, 3.

Original entry on oeis.org

563047, 1186631, 1205647, 1421647, 1871503, 2058047, 2615047, 2739103, 2795047, 3703463, 3743647, 4106447, 4723847, 4748047, 4758847, 5744447, 6991847, 8376847, 9951047, 10014847, 12214303, 12773447, 14161183, 14402447, 15232031, 15630847
Offset: 1

Views

Author

Altug Alkan, May 26 2016

Keywords

Comments

All terms of this sequence are the sum of 4 but no fewer nonzero squares.

Examples

			The prime 563047 is a term because 563048 = 218^2 + 718^2, 563049 = 165^2 + 732^2 = 357^2 + 660^2 and 563050 = 71^2 + 747^2 = 141^2 + 737^2 = 505^2 + 555^2.
		

Crossrefs

Programs

  • PARI
    is(n, k) = {nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb == k; }
    isok(n) = isprime(n) && is(n+1, 1) && is(n+2, 2) && is(n+3, 3);

A273293 Numbers k such that k and k^2 are the sums of two nonzero squares in exactly two ways.

Original entry on oeis.org

50, 200, 338, 450, 578, 800, 1352, 1682, 1800, 2312, 2450, 2738, 3042, 3200, 3362, 4050, 5202, 5408, 5618, 6050, 6728, 7200, 7442, 9248, 9800, 10658, 10952, 12168, 12800, 13448, 15138, 15842, 16200, 16562, 18050, 18818, 20402, 20808, 21632, 22050, 22472, 23762, 24200, 24642, 25538
Offset: 1

Views

Author

Altug Alkan, May 19 2016

Keywords

Comments

If k is the sum of 2 nonzero squares in exactly 2 ways, then k = a^2 + b^2 = c^2 + d^2 where (a, b), (c, d) are distinct and a, b, c, d are nonzero. For k^2,
k^2 = (a^2 + b^2)*(c^2 + d^2) = (a*c + b*d)^2 + (a*d - b*c)^2,
k^2 = (a^2 + b^2)*(c^2 + d^2) = (a*d + b*c)^2 + (a*c - b*d)^2,
k^2 = (a^2 + b^2)*(a^2 + b^2) = (a^2 - b^2)^2 + (2*a*b)^2,
k^2 = (c^2 + d^2)*(c^2 + d^2) = (c^2 - d^2)^2 + (2*c*d)^2.
Note that if k is of the form 2*m^2 where m is a nonzero integer, then the first two representations will be the same and one of the last two identities will not be the sum of two nonzero squares and we will have two distinct representations for k^2. This is the case that gives motivation for this sequence.
a(n) is the sum of the areas of the squares on the sides of the integer-sided triangle with hypotenuse A084645(n). - Wesley Ivan Hurt, Jan 05 2022

Examples

			50 is a term because 50 = 1^2 + 7^2 = 5^2 + 5^2 and 2500 = 14^2 + 48^2 = 30^2 + 40^2.
		

Crossrefs

Programs

  • PARI
    isA273293(n) = {nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb == 2; }
    lista(nn) = for(n=1, nn, if(isA273293(n) && isA273293(n^2), print1(n, ", ")));
Showing 1-9 of 9 results.