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

A068229 Primes congruent to 7 (mod 12).

Original entry on oeis.org

7, 19, 31, 43, 67, 79, 103, 127, 139, 151, 163, 199, 211, 223, 271, 283, 307, 331, 367, 379, 439, 463, 487, 499, 523, 547, 571, 607, 619, 631, 643, 691, 727, 739, 751, 787, 811, 823, 859, 883, 907, 919, 967, 991, 1039, 1051, 1063, 1087, 1123, 1171, 1231
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu), Feb 22 2002

Keywords

Comments

Primes of the form 3x^2 + 4y^2. - T. D. Noe, May 08 2005
It appears that all terms starting from term 103 are primes which are the sum of 5 positive (n > 0) different squares in more than one way (A193143) - Vladimir Joseph Stephan Orlovsky, Jul 16 2011.

Crossrefs

Programs

  • Magma
    [ p: p in PrimesUpTo(1400) | p mod 12 in {7} ]; // Vincenzo Librandi, Jul 14 2012
    
  • Mathematica
    Select[Prime/@Range[250], Mod[#, 12] == 7 &]
  • PARI
    for(i=1,250, if(prime(i)%12==7, print(prime(i))))
    
  • PARI
    is_A068229(n)=n%12==7 && isprime(n) \\ then, e.g.,
    select(is_A068229, primes(250))  \\ - M. F. Hasler, Jan 25 2013

Formula

a(n) ~ 4n log n. - Charles R Greathouse IV, Dec 07 2022

Extensions

Edited by Dean Hickerson, Feb 27 2002

A193141 Primes that are the sum of 5 distinct positive cubes.

Original entry on oeis.org

433, 443, 541, 673, 719, 827, 829, 881, 947, 953, 1171, 1217, 1223, 1277, 1289, 1297, 1559, 1583, 1609, 1619, 1709, 1747, 1801, 1861, 1871, 1879, 1889, 1973, 2003, 2017, 2081, 2087, 2131, 2137, 2141, 2213, 2221, 2251, 2269, 2287, 2297, 2311, 2339, 2341, 2393
Offset: 1

Views

Author

Keywords

Examples

			433=1^3+3^3+4^3+5^3+6^3, 443=1^3+2^3+3^3+4^3+7^3, 541=1^3+2^3+4^3+5^3+7^3.
		

Crossrefs

Programs

  • Maple
    N:= 3000: # for all terms <= N
    S:= {}:
    for a from 1 while 5*a^3 < N do
      for b from a+1 while a^3 + 4*b^3 < N do
        for c from b+1 while a^3 + b^3 + 3*c^3 < N do
          for d from c+1 while a^3 + b^3 + c^3 + 2*d^3 < N do
            S:= S union select(isprime,{seq(a^3 + b^3 + c^3 + d^3 + e^3, e=d+1..floor((N-a^3-b^3-c^3-d^3)^(1/3)))})
    od od od od:
    sort(convert(S,list)); # Robert Israel, Jun 21 2019
  • Mathematica
    lst = {}; Do[Do[Do[Do[Do[p = a^3 + b^3 + c^3 + d^3 + e^3; 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}]; Take[Union[lst], 80]
    Module[{nn=15,upto},upto=nn^3+9;Select[Union[Total/@Subsets[Range[nn]^3,{5}]],PrimeQ[#] && #<=upto&]] (* Harvey P. Dale, Aug 31 2023 *)
  • PARI
    cbrt(x)=if(x<0,x,x^(1/3));
    upto(lim)=my(v=List(), tb, tc, td, te); for(a=6, lim^(1/3), for(b=4, min(a-1, cbrt(lim-a^2)), tb=a^3+b^3; for(c=3, min(b-1, cbrt(lim-tb)), tc=tb+c^3; for(d=2, min(c-1, cbrt(lim-tc)), td=tc+d^3; forstep(e=1+td%2, d-1, 2, te=td+e^3; if(te>lim, break); if(isprime(te), listput(v, te))))))); vecsort(Vec(v), , 8)
    \\ Charles R Greathouse IV, Jul 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]
Showing 1-3 of 3 results.