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

A055673 Absolute values of norms of primes in ring of integers Z[sqrt(2)].

Original entry on oeis.org

2, 7, 9, 17, 23, 25, 31, 41, 47, 71, 73, 79, 89, 97, 103, 113, 121, 127, 137, 151, 167, 169, 191, 193, 199, 223, 233, 239, 241, 257, 263, 271, 281, 311, 313, 337, 353, 359, 361, 367, 383, 401, 409, 431, 433, 439, 449, 457, 463, 479, 487, 503, 521, 569, 577, 593
Offset: 1

Views

Author

N. J. A. Sloane, Jun 09 2000

Keywords

Comments

The integers have the form z = a + b*sqrt(2), a and b rational integers. The norm of z is a^2 - 2*b^2, which may be negative.

References

  • L. W. Reid, The Elements of the Theory of Algebraic Numbers, MacMillan, NY, 1910, see Chap. VII.

Crossrefs

Programs

  • Mathematica
    maxNorm = 593; s1 = Select[Range[-1, maxNorm, 8], PrimeQ]; s2 = Select[Range[1, maxNorm, 8], PrimeQ]; s3 = Select[Range[-3, Sqrt[maxNorm], 8], PrimeQ]^2; s4 = Select[Range[3, Sqrt[maxNorm], 8], PrimeQ]^2; Union[{2}, s1, s2, s3, s4] (* Jean-François Alcover, Dec 07 2012, from formula *)
  • PARI
    is(n)=!!if(isprime(n), setsearch([1,2,7],n%8), issquare(n,&n) && isprime(n) && setsearch([3,5], n%8)) \\ Charles R Greathouse IV, Sep 10 2016

Formula

Consists of 2; rational primes = +-1 (mod 8); and squares of rational primes = +-3 (mod 8).

Extensions

I would also like to get the sequences (analogous to A055027 and A055029) giving the number of inequivalent primes mod units. Of course now there are infinitely many units.
More terms from Franklin T. Adams-Watters, May 05 2006

A118917 Number of inequivalent primes in ring of integers Z[sqrt(2)] with absolute value of norm = n.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0
Offset: 0

Views

Author

Keywords

Comments

Since there are infinitely many units in Z[sqrt(2)], the total number of primes with a given norm is infinite (when there are any).

Crossrefs

Programs

  • Mathematica
    a[n_] := Which[PrimeQ[n] && MatchQ[Mod[n, 8], 1|7], 2, p = Sqrt[n]; n == 2 || IntegerQ[p] && PrimeQ[p] && MatchQ[Mod[p, 8], 3|5], 1, True, 0]; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Nov 22 2016 *)
  • PARI
    A118917(n) = { my(p); if(isprime(n)&&((1==(n%8))||(7==(n%8))), 2, if((2==n)||((issquare(n,&p)&&isprime(p))&&((3==(p%8))||(5==(p%8)))),1,0)); }; \\ Antti Karttunen, Aug 30 2017

Formula

a(n) = 2 if n is a prime = 1,7 (mod 8); a(n) = 1 if n is 2 or p^2 where p is a prime = 3,5 (mod 8); otherwise a(n) = 0.
Showing 1-2 of 2 results.