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

A094712 Primes that are not the sum of three positive squares.

Original entry on oeis.org

2, 5, 7, 13, 23, 31, 37, 47, 71, 79, 103, 127, 151, 167, 191, 199, 223, 239, 263, 271, 311, 359, 367, 383, 431, 439, 463, 479, 487, 503, 599, 607, 631, 647, 719, 727, 743, 751, 823, 839, 863, 887, 911, 919, 967, 983, 991
Offset: 1

Views

Author

T. D. Noe, May 21 2004

Keywords

Comments

Except for primes 2, 5, 13 and 37, this sequence consists all primes p such that p = 7 (mod 8). The density of these primes is 0.25.

Crossrefs

Cf. A085317 (primes that are the sum of three positive squares).

Programs

  • Mathematica
    lst={}; lim=32; Do[n=a^2+b^2+c^2; If[n?(AllTrue[Sqrt[#],IntegerQ]&)]==0&] (* _Harvey P. Dale, May 04 2025 *)

A094713 Number of ways that prime(n) can be represented as a^2+b^2+c^2 with c >= b >= a > 0.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 2, 1, 0, 1, 2, 1, 1, 0, 1, 0, 2, 3, 1, 3, 0, 2, 1, 2, 0, 3, 2, 2, 3, 0, 1, 1, 0, 3, 3, 2, 0, 1, 2, 0, 2, 0, 3, 2, 3, 0, 3, 4, 4, 0, 5, 0, 1, 5, 2, 4, 2, 0, 2, 2, 2, 2, 3, 3, 4, 0, 0, 2, 2, 0, 5, 1, 5, 4, 5, 2, 0, 3, 0, 3, 5, 2, 7, 0, 4, 0, 0, 5, 2, 0, 7, 8, 3, 2, 2, 4, 5, 8, 3
Offset: 1

Views

Author

T. D. Noe, May 21 2004

Keywords

Examples

			a(13) = 2 because prime(13) = 41 = 1+4+36 = 9+16+16.
		

Crossrefs

Cf. A085317 (primes that are the sum of three positive squares), A094712 (primes that are not the sum of three positive squares), A094714 (least prime having exactly n representations as the sum of three positive squares).

Programs

  • Mathematica
    lim=25; pLst=Table[0, {PrimePi[lim^2]}]; Do[n=a^2+b^2+c^2; If[n?(Min[#]>0&)],{n,110}]  (* _Harvey P. Dale, Feb 17 2011 *)

A193142 Primes which are the sum of 5 distinct positive squares.

Original entry on oeis.org

79, 103, 127, 131, 139, 151, 157, 163, 167, 179, 181, 191, 193, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433
Offset: 1

Views

Author

Keywords

Comments

A004434 INTERSECTION A000040. [Charles R Greathouse IV, Jul 17 2011]

Examples

			79=1^2+2^2+3^2+4^2+7^2, 103=2^2+3^2+4^2+5^2+7^2, 127=1^2+2^2+3^2+7^2+8^2.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[Do[Do[Do[Do[p = a^2 + b^2 + c^2 + d^2 + e^2; If[PrimeQ[p], AppendTo[lst, p]], {e, d - 1, 1, -1}], {d, c - 1, 1, -1}], {c, b - 1, 1, -1}], {b, a - 1, 1, -1}], {a, 6, 20}]; OEISTrim[Take[Union[lst], 80]]
    With[{upto=500},Select[Union[Total/@Subsets[Range[Ceiling[Sqrt[upto-30]]]^2, {5}]],PrimeQ[#]&&#<=upto&]] (* Harvey P. Dale, Jun 05 2016 *)
  • PARI
    upto(lim)=my(v=List(),tb,tc,td,te);for(a=6,sqrt(lim),for(b=4,min(a-1,sqrt(lim-a^2)),tb=a^2+b^2;for(c=3,min(b-1,sqrt(lim-tb)),tc=tb+c^2;for(d=2,min(c-1,sqrt(lim-tc)),td=tc+d^2;forstep(e=1+td%2,d-1,2,te=td+e^2;if(te>lim,break);if(isprime(te),listput(v,te)))))));vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Jul 17 2011

Formula

Conjecture: a(n) = prime(n+32) for n > 13. [Charles R Greathouse IV, Jul 17 2011]

A193143 Primes which are the sum of 5 distinct positive squares in more than one way.

Original entry on oeis.org

103, 127, 139, 151, 163, 167, 179, 191, 199, 211, 223, 227, 229, 239, 241, 251, 263, 271, 277, 281, 283, 307, 311, 313, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491
Offset: 1

Views

Author

Keywords

Comments

All terms from 103 onwards in A068229 are primes which are the sum of 5 distinct positive squares in more than one way.

Examples

			103 = 1^2 + 2^2 + 3^2 + 5^2 + 8^2 = 2^2 + 3^2 + 4^2 + 5^2 + 7^2.
127 = 1^2 + 2^2 + 3^2 + 7^2 + 8^2 = 1^2 + 4^2 + 5^2 + 6^2 + 7^2 = 1^2 + 2^2 + 4^2 + 5^2 + 9^2.
		

Crossrefs

Programs

  • Mathematica
    sum5sqP = {}; Do[Do[Do[Do[Do[p = a^2 + b^2 + c^2 + d^2 + e^2; If[PrimeQ[p], AppendTo[sum5sqP, p]], {e, d - 1, 1, -1}], {d, c - 1, 1, -1}], {c, b - 1, 1, -1}], {b, a - 1, 1, -1}], {a, 6, 30}]; a = Take[Sort[sum5sqP], 1000]; a = Select[Table[If[a[[n]] == a[[n - 1]] && a[[n]] != a[[n - 2]], a[[n]], ""], {n, 3, Length[a]}], IntegerQ]

A283017 Primes which are the sum of three nonzero 6th powers.

Original entry on oeis.org

3, 857, 1459, 4889, 50753, 51481, 66377, 119107, 210961, 262937, 308801, 525017, 531569, 539633, 562691, 766739, 797681, 840241, 1000793, 1046657, 1078507, 1772291, 1864873, 2303003, 2834443, 2986777, 3032641, 3107729, 3365777, 4757609, 4804201, 5135609, 5987593, 7530329, 7534361, 7743529, 8061041
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 26 2017

Keywords

Comments

Primes of form x^6 + y^6 + z^6 where x, y, z > 0.

Examples

			3 = 1^6 + 1^6 + 1^6;
857 = 2^6 + 2^6 + 3^6;
1459 = 1^6 + 3^6 + 3^6, etc.
		

Crossrefs

Programs

  • Maple
    N:= 10^8: # to get all terms <= N
    S:= [seq(i^6, i=1..floor(N^(1/6)))]:
    S3:= {seq(seq(seq(S[i]+S[j]+S[k],k=1..j),j=1..i),i=1..nops(S))}:
    sort(convert(select(t -> t <= N and isprime(t), S3), list)); # Robert Israel, Mar 09 2017
  • Mathematica
    nn = 15; Select[Union[Plus @@@ (Tuples[Range[nn], {3}]^6)], # <= nn^6 && PrimeQ[#] &]
  • PARI
    list(lim)=my(v=List(),a6,a6b6,t); lim\=1; for(a=1,sqrtnint(lim-2,6), a6=a^6; for(b=1,min(sqrtnint(lim-a6-1,6),a), a6b6=a6+b^6; forstep(c=if(a6b6%2,2,1),min(sqrtnint(lim-a6b6,6),b),2, if(isprime(t=a6b6+c^6), listput(v,t))))); Set(v) \\ Charles R Greathouse IV, Mar 09 2017

A283018 Primes which are the sum of three positive 7th powers.

Original entry on oeis.org

3, 257, 82499, 823799, 1119863, 2099467, 4782971, 5063033, 5608699, 6880249, 7160057, 10018571, 10078253, 10094509, 10279937, 10389481, 10823671, 19503683, 20002187, 20388839, 24782969, 31584323, 35850379, 36189869, 37931147, 50614777, 57416131, 62765029, 64845797, 68355029, 71663617, 73028453
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 26 2017

Keywords

Comments

Primes of form x^7 + y^7 + z^7 where x, y, z > 0.

Examples

			3 = 1^7 + 1^7 + 1^7;
257 = 1^7 + 2^7 + 2^7;
82499 = 3^7 + 3^7 + 5^7, etc.
		

Crossrefs

Programs

  • Maple
    N:= 10^9: # to get all terms <= N
    Res:= {}:
    for x from 1 to floor(N^(1/7)) do
      for y from 1 to min(x, floor((N-x^7)^(1/7))) do
        for z from 1 to min(y, floor((N-x^7-y^7)^(1/7))) do
          p:= x^7 + y^7 + z^7;
          if isprime(p) then Res:= Res union {p} fi
    od od od:
    sort(convert(Res,list)); # Robert Israel, Feb 26 2017
  • Mathematica
    nn = 14; Select[Union[Plus @@@ (Tuples[Range[nn], {3}]^7)], # <= nn^7 && PrimeQ[#] &]
  • PARI
    list(lim)=my(v=List(),x7,y7,t,p); for(x=1,sqrtnint(lim\3,7), x7=x^7; for(y=x,sqrtnint((lim-x7)\2,7), y7=y^7; t=x7+y7; forstep(z=y+(x+1)%2,sqrtnint((lim-t)\1,7),2, if(isprime(p=t+z^7), listput(v,p))))); Set(v) \\ Charles R Greathouse IV, Feb 27 2017

A283019 Primes which are the sum of three nonzero 8th powers.

Original entry on oeis.org

3, 6563, 72353, 137633, 787811, 1745153, 7444673, 44726593, 49202147, 61503553, 86093443, 91858243, 100006817, 100072097, 101686177, 107444417, 143046977, 200006561, 214756067, 257412163, 300452323, 430372577, 431661313, 435812033, 447149537, 452523713, 489805633, 530372321, 744340577
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 26 2017

Keywords

Comments

Primes of form x^8 + y^8 + z^8 where x, y, z > 0.

Examples

			3 = 1^8 + 1^8 + 1^8;
6563 = 1^8 + 1^8 + 3^8;
72353 = 2^8 + 3^8 + 4^8, etc.
		

Crossrefs

Programs

  • Mathematica
    nn = 13; Select[Union[Plus @@@ (Tuples[Range[nn], {3}]^8)], # <= nn^8 && PrimeQ[#] &]
  • PARI
    list(lim)=my(v=List(),A,B,t); lim\=1; for(a=1,sqrtnint(lim-2,8), A=a^8; for(b=1,min(sqrtnint(lim-A-1,8),a), B=A+b^8; forstep(c=if(B%2,2,1),sqrtnint(lim-B,8),2, if(isprime(t=B+c^8), listput(v,t))))); Set(v) \\ Charles R Greathouse IV, Nov 05 2017

A306212 Numbers that are the sum of squares of three distinct positive integers in arithmetic progression.

Original entry on oeis.org

14, 29, 35, 50, 56, 66, 77, 83, 93, 107, 110, 116, 126, 140, 149, 155, 158, 165, 179, 194, 197, 200, 210, 219, 224, 242, 245, 251, 261, 264, 275, 290, 293, 302, 308, 315, 318, 332, 341, 350, 365, 371, 372, 381, 395, 398, 413, 428, 434, 435, 440, 450, 461, 462, 464, 482
Offset: 1

Views

Author

Antonio Roldán, Jan 29 2019

Keywords

Examples

			35 = 1^2 + 3^2 + 5^2, with 3 - 1 = 5 - 3 = 2;
371 = 1^2 + 9^2 + 17^2, with 9 - 1 = 17 - 9 = 8. Also 371 = 9^2 + 11^2 + 13^2, with 11 - 9 = 13 - 11 = 2.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # for terms <= N
    S:= {seq(seq(3*a^2+2*b^2, b=1..min(a-1, floor(sqrt((N-3*a^2)/2)))),a=1..floor(sqrt(N/3)))}:
    sort(convert(S,list)); # Robert Israel, Jun 08 2020
  • PARI
    for(n=3, 600, k=sqrt(n/3); a=2; v=0; while(a<=k&&v==0, b=(n-3*a^2)/2; if(b==truncate(b)&&issquare(b), d=sqrt(b); if(d>=1&&d<=a-1, v=1; print1(n,", "))); a+=1))
    
  • PARI
    w=List(); for(n=3, 600, k=sqrt(n/3); for(a=2, k, for(c=1, a-1, v=(a-c)^2+a^2+(a+c)^2; if(v==n, listput(w,n))))); print(vecsort(Vec(w),,8))

A218797 Number of ways to write 2n - 1 as p + q + r with p <= q <= r and p, q, r, p^2 + q^2 + r^2 all prime.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 1, 2, 0, 1, 2, 2, 1, 3, 2, 3, 1, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 4, 1, 3, 2, 2, 2, 2, 2, 2, 4, 3, 3, 3, 2, 4, 4, 3, 0, 2, 1, 1, 1, 1, 2, 2, 3, 2, 4, 4, 3, 3, 2, 3, 4, 2, 2, 3, 2, 1, 3, 3, 1, 2, 2, 5, 1, 4, 2, 2, 1, 1, 6, 3, 1, 5, 1, 1, 5, 4, 1, 4, 1, 2, 6, 2, 4, 2, 2, 2, 1, 4, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 05 2012

Keywords

Comments

Conjecture: a(n) > 0 for all n=1715,1716,....
This conjecture is stronger than the weak Goldbach conjecture. It has been verified for n up to 500,000. Those 0

Examples

			a(7)=2 since 13=3+3+7=3+5+5, and both 3^2+3^2+7^2=67 and 3^2+5^2+5^2=59 are primes.
		

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[n-Prime[j]-Prime[k]]==True&&PrimeQ[Prime[j]^2+Prime[k]^2+(n-Prime[j]-Prime[k])^2]==True,1,0],{j,1,PrimePi[n/3]},{k,j,PrimePi[(n-Prime[j])/2]}]
    Do[Print[n," ",a[2n-1]],{n,1,10000}]

A269840 Lesser of twin primes where both are the sum of 3 nonzero squares.

Original entry on oeis.org

17, 41, 59, 107, 137, 179, 227, 281, 347, 419, 521, 569, 617, 641, 659, 809, 827, 857, 881, 1019, 1049, 1091, 1289, 1427, 1451, 1481, 1619, 1667, 1697, 1721, 1787, 1931, 2027, 2081, 2129, 2267, 2339, 2657, 2729, 2801, 2969, 3251, 3257, 3299, 3329, 3371, 3467, 3539
Offset: 1

Author

Altug Alkan, Mar 13 2016

Keywords

Examples

			17 is a term because 17 = 2^2 + 2^2 + 3^2 and 19 = 1^2 + 3^2 + 3^2.
41 is a term because 41 = 3^2 + 4^2 + 4^2 and 43 = 3^2 + 3^2 + 5^2.
59 is a term because 59 = 3^2 + 5^2 + 5^2 and 61 = 3^2 + 4^2 + 6^2.
		

Crossrefs

Programs

  • PARI
    isA000408(n) = my(a, b) ; a=1 ; while(a^2+10, ); p-2}
    for(n=1, 1e2, if(isA000408(t(n)) && isA000408(t(n)+2), print1(t(n), ", ")));
Showing 1-10 of 15 results. Next