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.

A001132 Primes == +-1 (mod 8).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Primes p such that 2 is a quadratic residue mod p.
Also primes p such that p divides 2^((p-1)/2) - 1. - Cino Hilliard, Sep 04 2004
A001132 is exactly formed by the prime numbers of A118905: in fact at first every prime p of A118905 is p = u^2 - v^2 + 2uv, with for example u odd and v even so that p - 1 = 4u'(u' + 1) + 4v'(2u' + 1 - v') when u = 2u' + 1 and v = 2v'. u'(u' + 1) is even and v'(2u' + 1 - v') is always even. At second hand if p = 8k +- 1, p has the shape x^2 - 2y^2; letting u = x - y and v = y, comes p = (x - y)^2 - y^2 + 2(x - y)y = u^2 - v^2 + 2uv so p is a sum of the two legs of a Pythagorean triangle. - Richard Choulet, Dec 16 2008
These are also the primes of form x^2 - 2y^2, excluding 2. See A038873. - Tito Piezas III, Dec 28 2008
Primes p such that p^2 mod 48 = 1. - Gary Detlefs, Dec 29 2011
Primes in A047522. - Reinhard Zumkeller, Jan 07 2012
This sequence gives the odd primes p which satisfy C(p, x = 0) = +1, where C(p, x) is the minimal polynomial of 2*cos(Pi/p) (see A187360). For the proof see a comment on C(n, 0) in A230075. - Wolfdieter Lang, Oct 24 2013
Each a(n) corresponds to precisely one primitive Pythagorean triangle. For a proof see the W. Lang link, also for a table. See also the comment by Richard Choulet above, where the case u even and v odd has not been considered. - Wolfdieter Lang, Feb 17 2015
Primes p such that p^2 mod 16 = 1. - Vincenzo Librandi, May 23 2016
Rational primes that decompose in the field Q(sqrt(2)). - N. J. A. Sloane, Dec 26 2017

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Ronald S. Irving, Integers, Polynomials, and Rings. New York: Springer-Verlag (2004): 274.
  • 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

For primes p such that x^m = 2 (mod p) has a solution see A001132 (for m = 2), A040028 (m = 3), A040098 (m = 4), A040159 (m = 5), A040992 (m = 6), A042966 (m = 7), A045315 (m = 8), A049596 (m = 9), A049542 (m = 10) - A049595 (m = 63). Jeff Lagarias (lagarias(AT)umich.edu) points out that all these sequences are different, although this may not be apparent from looking just at the initial terms.
Agrees with A038873 except for initial term.
Union of A007519 and A007522.

Programs

  • Haskell
    a001132 n = a001132_list !! (n-1)
    a001132_list = [x | x <- a047522_list, a010051 x == 1]
    -- Reinhard Zumkeller, Jan 07 2012
    
  • Magma
    [p: p in PrimesUpTo (600) | p^2 mod 16 eq 1]; // Vincenzo Librandi, May 23 2016
  • Maple
    seq(`if`(member(ithprime(n) mod 8, {1,7}),ithprime(n),NULL),n=1..109); # Nathaniel Johnston, Jun 26 2011
    for n from 1 to 600 do if (ithprime(n)^2 mod 48 = 1) then print(ithprime(n)) fi od. # Gary Detlefs, Dec 29 2011
  • Mathematica
    Select[Prime[Range[250]], MemberQ[{1, 7}, Mod[#, 8]] &]  (* Harvey P. Dale, Apr 29 2011 *)
    Select[Union[8Range[100] - 1, 8Range[100] + 1], PrimeQ] (* Alonso del Arte, May 22 2016 *)
  • PARI
    select(p->p%8==1 ||p%8==7, primes(100)) \\ Charles R Greathouse IV, May 18 2015
    

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, May 18 2015

A003629 Primes p == +- 3 (mod 8), or, primes p such that 2 is not a square mod p.

Original entry on oeis.org

3, 5, 11, 13, 19, 29, 37, 43, 53, 59, 61, 67, 83, 101, 107, 109, 131, 139, 149, 157, 163, 173, 179, 181, 197, 211, 227, 229, 251, 269, 277, 283, 293, 307, 317, 331, 347, 349, 373, 379, 389, 397, 419, 421, 443, 461, 467, 491, 499, 509, 523, 541, 547, 557, 563
Offset: 1

Views

Author

Keywords

Comments

Complement of A038873 relative to A000040.
Also primes p such that p divides 2^((p-1)/2) + 1. - Cino Hilliard, Sep 04 2004
Primes p such that p^2 == 25 (mod 48), n > 1. - Gary Detlefs, Dec 29 2011
This sequence gives the primes p which satisfy C(p, x = 0) = -1, where C(p, x) is the minimal polynomial of 2*cos(Pi/p) (see A187360). For a proof see a comment on C(n, 0) in A230075. - Wolfdieter Lang, Oct 24 2013
Except for the initial 3, these are the primes p such that Fibonacci(p) mod 6 = 5. - Gary Detlefs, May 26 2014
Inert rational primes in the field Q(sqrt(2)). - N. J. A. Sloane, Dec 26 2017
If a prime p is congruent to 3 or 5 (mod 8) and r > 1, then 2^((p-1)*p^(r-1)/2) == -1 (mod p^r). - Marina Ibrishimova, Sep 29 2018
For the proofs or the comments by Cino Hilliard and Marina Ibrishimova, see link below. - Robert Israel, Apr 24 2019

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Ronald S. Irving, Integers, Polynomials, and Rings. New York: Springer-Verlag (2004): 274.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001132 (complement from the odd primes), A007521 (subsequence), A038873, A226523.

Programs

  • Magma
    [3] cat [p: p in PrimesUpTo (600) | p^2 mod 48 eq 25]; // Vincenzo Librandi, May 23 2016
  • Maple
    for n from 2 to 563 do if(ithprime(n)^2 mod 48 = 25) then print(ithprime(n)) fi od. # Gary Detlefs, Dec 29 2011
  • Mathematica
    Select[Prime @ Range[2, 105], JacobiSymbol[2, # ] == -1 &] (* Robert G. Wilson v, Dec 15 2005 *)
    Select[Union[8Range[100] - 5, 8Range[100] - 3], PrimeQ[#] &] (* Alonso del Arte, May 22 2016 *)
    Select[Prime[Range[150]],MemberQ[{3,5},Mod[#,8]]&] (* Harvey P. Dale, Mar 02 2022 *)
  • PARI
    is(n)=isprime(n) && (n%8==3 || n%8==5) \\ Charles R Greathouse IV, Mar 21 2016
    

A118825 Numerators of the convergents of the 2-adic continued fraction of zero given by A118824.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, May 01 2006

Keywords

Examples

			For n>=1, convergents A118825(k)/A118826(k) are:
  at k = 4*n: 1/A080277(n);
  at k = 4*n+1: 2/(2*A080277(n)-1);
  at k = 4*n+2: 1/(A080277(n)-1);
  at k = 4*n-1: 0/(-1)^n.
Convergents begin:
  -2/1, -1/1, 0/-1, -1/-1, 2/1, 1/0, 0/1, 1/4,
  -2/-7, -1/-3, 0/-1, -1/-5, 2/9, 1/4, 0/1, 1/12,
  -2/-23, -1/-11, 0/-1, -1/-13, 2/25, 1/12, 0/1, 1/16,
  -2/-31, -1/-15, 0/-1, -1/-17, 2/33, 1/16, 0/1, 1/32, ...
		

Crossrefs

Cf. A118824 (partial quotients), A118826 (denominators), A118822, A230075 (start with a(5)).

Programs

  • Maple
    A118825:=n->sqrt((n+1)^2 mod 8))*(-1)^floor((n+3)/4); seq(A118825(n), n=1..100); # Wesley Ivan Hurt, Jan 04 2014
  • Mathematica
    Table[Sqrt[Mod[(n+1)^2, 8]](-1)^Floor[(n+3)/4], {n, 100}] (* Wesley Ivan Hurt, Jan 04 2014 *)
    PadRight[{},120,{-2,-1,0,-1,2,1,0,1}] (* Harvey P. Dale, May 26 2020 *)
  • PARI
    {a(n)=local(p=-2,q=+1,v=vector(n,i,if(i%2==1,p,q*2^valuation(i/2,2)))); contfracpnqn(v)[1,1]}

Formula

Period 8 sequence: [ -2,-1,0,-1,2,1,0,1].
G.f.: -x*(1+x)*(x^2-x+2) / ( 1+x^4 ).
a(n) = sqrt((n+1)^2 mod 8)*(-1)^floor((n+3)/4). - Wesley Ivan Hurt, Jan 04 2014
Showing 1-3 of 3 results.