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.

A033203 Primes p congruent to {1, 2, 3} (mod 8); or primes p of form x^2 + 2*y^2; or primes p such that x^2 = -2 has a solution mod p.

Original entry on oeis.org

2, 3, 11, 17, 19, 41, 43, 59, 67, 73, 83, 89, 97, 107, 113, 131, 137, 139, 163, 179, 193, 211, 227, 233, 241, 251, 257, 281, 283, 307, 313, 331, 337, 347, 353, 379, 401, 409, 419, 433, 443, 449, 457, 467, 491, 499, 521, 523, 547, 563, 569, 571, 577, 587, 593, 601, 617, 619, 641, 643, 659, 673, 683
Offset: 1

Views

Author

Keywords

Comments

Sequence naturally partitions into two sequences: all primes p with ord_p(-2) odd (A163183, the primes dividing 2^j +1 for some odd j) and certain primes p with ord_p(-2) even (A163185). - Christopher J. Smyth, Jul 23 2009
Terms m in A047476 with A010051(m) = 1. - Reinhard Zumkeller, Dec 29 2012

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.

Crossrefs

Cf. A039706, A003628 (complement with respect to A000040).
Primes in A002479.
Cf. A051100 (see Mathar's comment).
Apart from leading term the same as A033200.

Programs

  • Haskell
    a033203 n = a033203_list !! (n-1)
    a033203_list = filter ((== 1) . a010051) a047476_list
    -- Reinhard Zumkeller, Dec 29 2012, Jan 22 2012
    
  • Magma
    [p: p in PrimesUpTo(600) | p mod 8 in [1..3]]; // Vincenzo Librandi, Aug 11 2012
    
  • Magma
    [p: p in PrimesUpTo(800) | NormEquation(2,p) eq true]; // Bruno Berselli, Jul 03 2016
    
  • Mathematica
    QuadPrimes2[1, 0, 2, 10000] (* see A106856 *)
    Select[Prime[Range[200]],MemberQ[{1,2,3},Mod[#,8]]&] (* Harvey P. Dale, Mar 16 2013 *)
  • PARI
    is(n)=isprime(n) && issquare(Mod(-2,n)) \\ Charles R Greathouse IV, Nov 29 2016

Formula

a(n) = A002332(n) + 2*A002333(n)^2. - Zak Seidov, May 29 2014

A002332 Numbers x such that p = x^2 + 2y^2, with prime p = A033203(n).

Original entry on oeis.org

0, 1, 3, 3, 1, 3, 5, 3, 7, 1, 9, 9, 5, 3, 9, 9, 3, 11, 1, 9, 11, 7, 15, 15, 13, 3, 15, 9, 11, 17, 5, 13, 7, 3, 15, 19, 3, 11, 9, 19, 21, 21, 13, 15, 21, 7, 3, 19, 23, 15, 21, 11, 17, 3, 9, 23, 15, 13, 21, 25, 9, 5, 21, 23, 17, 27, 11, 25, 3, 19, 27, 27, 29, 9, 1, 5, 27, 17, 15, 21, 27
Offset: 1

Views

Author

Keywords

Comments

For p>2, x and y are uniquely determined [Frei, Th. 3]. - N. J. A. Sloane, May 30 2014
The corresponding y numbers are given in A002333.

References

  • A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
  • 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

Cf. A002333.

Programs

  • Mathematica
    f[ p_ ] := For[ y=1, True, y++, If[ IntegerQ[ x=Sqrt[ p-2y y ] ], Return[ x ] ] ]; f/@Select[ Prime/@Range[ 1, 200 ], Mod[ #, 8 ]<4& ]

Extensions

More terms from Dean Hickerson, Oct 07 2001

A287799 If x^2 + 2*y^2 is prime for all positive integers x and y with m = x*y then m is in the sequence.

Original entry on oeis.org

1, 3, 21, 33, 123, 219, 321, 3453, 6621, 16521, 18273, 25089, 27831, 29787, 62313, 69981, 75459, 95577, 101301, 105459, 157299, 196239, 197481, 247047, 259797, 281433, 359943, 390237, 418881, 460821, 529167, 569559, 595869, 680307, 727341, 945141, 955569, 964401
Offset: 1

Views

Author

Michel Lagneau, Jun 01 2017

Keywords

Comments

a(n) == 3, 15 (mod 18), for n >= 2.
It seems that a(n) = 3*p where p is a prime, for n >= 3.
a(n) is squarefree. - David A. Corneth, Jun 01 2017
From Robert Israel, Jul 14 2017: (Start)
a(149) = 13304379 = 3*11*403163 is not of the form 3*p.
The generalized Bunyakovsky conjecture implies that there are infinitely many terms of the form 3*p, and infinitely many of the form 3*11*p. (End)

Examples

			1 = 1*1 and 1^2 + 2*1^2 = 3, a prime.
21 = 1*21 = 3*7 = 21*1 = 7*3 => 1^2 + 2*21^2 = 883, 3^2 + 2*7^2 = 107, 21^2 + 2*1^2 = 443 and 7^2 + 2*3^2 = 67 are primes.
		

Crossrefs

Cf. A000040, A005117, A236423 (with x^2+y^2 instead of x^2+2*y^2).
Subsequence of A067201. - Michel Marcus, Jun 03 2017

Programs

  • Maple
    filter:= proc(m)
       andmap(x -> isprime(x^2 + 2*(m/x)^2),
      numtheory:-divisors(m));
    end proc:
    select(filter, [1, seq(seq(18*i+j, j=[3,15]),i=0..10^5)]); # Robert Israel, Jul 14 2017
  • Mathematica
    A287799 = {}; Do[ds = Divisors[n]; If[EvenQ[Length[ds]], flag = True; k = 1; While[k <= Length[ds]/2 && (criterion1 = PrimeQ[ds[[k]]^2 + 2 * ds[[-k]]^2]) && (criterion2 = PrimeQ[ds[[-k]]^2 + 2 * ds[[k]]^2]), k++]; If[criterion1 && criterion2, AppendTo[A287799, n]]], {n, 2, 10^6}]; A287799
  • PARI
    is(n) = d=divisors(n); for(i=1,#d, if(!isprime(d[i]^2 + 2*d[#d-i+1]^2), return(0))); n > 1 \\ David A. Corneth, Jun 01 2017
    
  • Sage
    R = range(1,100000)
    [m for m in R if all(is_prime(d^2+2*(m//d)^2) for d in divisors(m))] # Peter Luschny, Jun 18 2017

Extensions

Name reformulated and m=1 added by Wolfdieter Lang, Jun 20 2017
Showing 1-3 of 3 results.