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.

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

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Order and signs don't count. E.g. 50 = 5^2+5^2 = 7^2+1^2 (= (-5)^2+5^2, but that doesn't count as different).
A131574 is a subsequence. - Zak Seidov, Jan 31 2014
A025426(a(n)) = 2. - Reinhard Zumkeller, Feb 26 2015

Crossrefs

Programs

  • Haskell
    a025285 n = a025285_list !! (n-1)
    a025285_list = filter ((== 2) . a025426) [1..]
    -- Reinhard Zumkeller, Feb 26 2015
    
  • Mathematica
    selQ[n_] := Length[ Select[ PowersRepresentations[n, 2, 2], Times @@ # != 0 &]] == 2; Select[Range[1000], selQ] (* Jean-François Alcover, Oct 03 2013 *)
  • PARI
    is(n)=sum(k=sqrtint((n-1)\2)+1,sqrtint(n-1), issquare(n-k^2))==2 \\ Charles R Greathouse IV, May 24 2016
    
  • PARI
    is(n)=my(v=valuation(n, 2), f=factor(n>>v), t=1); for(i=1, #f[, 1], if(f[i, 1]%4==1, t*=f[i, 2]+1, if(f[i, 2]%2, return(0)))); if(t%2, t-(-1)^v, t)==4 \\ Charles R Greathouse IV, May 24 2016

Formula

a(n) >= A007692(n) with equality only for n <= 16. - Alois P. Heinz, Mar 23 2023

A344804 Numbers that are the sum of two cubes in exactly three ways.

Original entry on oeis.org

87539319, 119824488, 143604279, 175959000, 327763000, 700314552, 804360375, 958595904, 1148834232, 1407672000, 1840667192, 1915865217, 2363561613, 2622104000, 3080802816, 3235261176, 3499524728, 3623721192, 3877315533, 4750893000, 5544709352, 5602516416
Offset: 1

Views

Author

Sean A. Irvine, Jun 14 2021

Keywords

Examples

			87539319 is a term because 87539319 = 167^3 + 436^3 = 22^3 + 423^3 = 255^3 + 414^3 (3 representations).
6963472309248 is not a term because 6963472309248 = 2421^3 + 19083^3 = 5436^3 + 18948^3 = 10200^3 + 18072^3 = 13322^3 + 16630^3 (4 representations).  This is the first difference between this sequence and A018787.
		

Crossrefs

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);

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);
Showing 1-4 of 4 results.