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

A007652 Final digit of prime(n).

Original entry on oeis.org

2, 3, 5, 7, 1, 3, 7, 9, 3, 9, 1, 7, 1, 3, 7, 3, 9, 1, 7, 1, 3, 9, 3, 9, 7, 1, 3, 7, 9, 3, 7, 1, 7, 9, 9, 1, 7, 3, 7, 3, 9, 1, 1, 3, 7, 9, 1, 3, 7, 9, 3, 9, 1, 1, 7, 3, 9, 1, 7, 1, 3, 3, 7, 1, 3, 7, 1, 7, 7, 9, 3, 9, 7, 3, 9, 3, 9, 7, 1, 9, 9, 1, 1, 3, 9, 3, 9, 7, 1, 3, 7, 9, 7, 1, 9, 3, 9, 1, 3, 1, 7, 7, 3, 9, 1
Offset: 1

Views

Author

Keywords

Comments

Primes modulo 10.

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.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

Formula

a(n) = A010879(A000040(n)). - Michel Marcus, May 06 2014
Sum_k={1..n} a(k) ~ 5*n. - Amiram Eldar, Dec 11 2024

Extensions

Extended by Ray Chandler, Oct 01 2005

A039701 a(n) = n-th prime modulo 3.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

If n > 2 and prime(n) is a Mersenne prime then a(n) = 1. Proof: prime(n) = 2^p - 1 for some odd prime p, so prime(n) = 2*4^((p-1)/2) - 1 == 2 - 1 = 1 (mod 3). - Santi Spadaro, May 03 2002; corrected and simplified by Dean Hickerson, Apr 20 2003
Except for n = 2, a(n) is the smallest number k > 0 such that 3 divides prime(n)^k - 1. - T. D. Noe, Apr 17 2003
a(n) <> 0 for n <> 2; a(A049084(A003627(n))) = 2; a(A049084(A002476(n))) = 1; A134323(n) = (1 - 0^a(n)) * (-1)^(a(n)+1). - Reinhard Zumkeller, Oct 21 2007
Probability of finding 1 (or 2) in this sequence is 1/2. This follows from the Prime Number Theorem in arithmetic progressions. Examples: There are 4995 1's in terms (10^9 +1) to (10^9+10^4); there are 10^9/2-1926 1's in the first 10^9 terms. - Jerzy R Borysowicz, Mar 06 2022

Crossrefs

Cf. A091178 (indices of 1's), A091177 (indices of 2's).
Cf. A120326 (partial sums).
Cf. A010872.

Programs

Formula

Sum_k={1..n} a(k) ~ (3/2)*n. - Amiram Eldar, Dec 11 2024

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

A039702 a(n) = n-th prime modulo 4.

Original entry on oeis.org

2, 3, 1, 3, 3, 1, 1, 3, 3, 1, 3, 1, 1, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 3, 1, 3, 1, 3, 3, 1, 3, 1, 3, 1, 1, 3, 3, 3, 3, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 3, 1, 3, 3, 1, 1, 3, 1, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 1, 3, 1, 3, 1, 3, 3, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 1, 1, 3, 1, 3, 1, 3, 1, 3
Offset: 1

Views

Author

Keywords

Comments

Except for the first term, A100672(n) = (a(n)-1)/2 = parity of A005097. - Jeremy Gardiner, May 17 2008

Crossrefs

Programs

Formula

Sum_k={1..n} a(k) ~ 2*n. - Amiram Eldar, Dec 11 2024

A003628 Primes congruent to {5, 7} mod 8.

Original entry on oeis.org

5, 7, 13, 23, 29, 31, 37, 47, 53, 61, 71, 79, 101, 103, 109, 127, 149, 151, 157, 167, 173, 181, 191, 197, 199, 223, 229, 239, 263, 269, 271, 277, 293, 311, 317, 349, 359, 367, 373, 383, 389, 397, 421, 431, 439
Offset: 1

Views

Author

Keywords

Comments

Inert rational odd primes in the field Q(sqrt(-2)).
Primes p such that p XOR 5 = p - 5. - Brad Clardy, Jul 22 2012
Terms m in A047566 with A010051(m) = 1. - Reinhard Zumkeller, Dec 29 2012
This sequence gives the primes p which satisfy norm(rho(p)) = - 1 with rho(p) := 2*cos(Pi/p) (the length ratio (smallest diagonal)/side in the regular p-gon). The norm of an algebraic number (over Q) is the product over all zeros of its minimal polynomial. Here norm(rho(p)) = (-1)^delta(p)* C(p, 0), with the degree delta(p) = A055034(p) = (p-1)/2. For p == 5 (mod 8) the norm is C(p, 0) (see a comment on 2*A230076) and for p == 7 (mod 8) the norm is -C(p, 0) (see a comment on A186302). For the primes with norm(rho(p)) = +1 see A033200. - Wolfdieter Lang, Oct 24 2013

References

  • H. Hasse, Number Theory, Springer-Verlag, NY, 1980, p. 498.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040, A039706, A033203 (complement with respect to A000040).

Programs

  • Haskell
    a003628 n = a003628_list !! (n-1)
    a003628_list = filter ((== 1) . a010051) a047566_list
    -- Reinhard Zumkeller, Dec 29 2012, Jan 22 2012
    
  • Magma
    [ p: p in PrimesUpTo(600) | p mod 8 in {5, 7}]; // Vincenzo Librandi, Aug 22 2012
  • Mathematica
    Select[Prime[Range[200]],MemberQ[{5,7},Mod[#,8]]&] (* Harvey P. Dale, Oct 24 2011 *)
  • PARI
    {a(n) = local( cnt, m ); if( n<1, return( 0 )); while( cnt < n, if( isprime( m++) && kronecker( -2, m )==-1, cnt++ )); m} /* Michael Somos, Aug 14 2012 */
    

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Feb 24 2023

A039703 a(n) = n-th prime modulo 5.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(A049084(A045356(n-1))) = even; a(A049084(A045429(n-1))) = odd. - Reinhard Zumkeller, Feb 25 2008

Crossrefs

Programs

Formula

Sum_k={1..n} a(k) ~ (5/2)*n. - Amiram Eldar, Dec 11 2024

A039715 Primes modulo 17.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 0, 2, 6, 12, 14, 3, 7, 9, 13, 2, 8, 10, 16, 3, 5, 11, 15, 4, 12, 16, 1, 5, 7, 11, 8, 12, 1, 3, 13, 15, 4, 10, 14, 3, 9, 11, 4, 6, 10, 12, 7, 2, 6, 8, 12, 1, 3, 13, 2, 8, 14, 16, 5, 9, 11, 4, 1, 5, 7, 11, 8, 14, 7, 9, 13, 2, 10, 16, 5
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

By the Prime Number Theorem in Arithmetic Progressions, all nonzero residue classes are equiprobable. In particular, Sum_{k=1..n} a(k) ~ 8.5n. - Charles R Greathouse IV, Apr 16 2012

A242119 Primes modulo 18.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 1, 5, 11, 13, 1, 5, 7, 11, 17, 5, 7, 13, 17, 1, 7, 11, 17, 7, 11, 13, 17, 1, 5, 1, 5, 11, 13, 5, 7, 13, 1, 5, 11, 17, 1, 11, 13, 17, 1, 13, 7, 11, 13, 17, 5, 7, 17, 5, 11, 17, 1, 7, 11, 13, 5, 1, 5, 7, 11, 7, 13, 5, 7, 11, 17, 7, 13, 1, 5
Offset: 1

Views

Author

Vincenzo Librandi, May 05 2014

Keywords

Crossrefs

Cf. sequences of the type Primes mod k: A039701 (k=3), A039702 (k=4), A039703 (k=5), A039704 (k=6), A039705 (k=7), A039706 (k=8), A038194 (k=9), A007652 (k=10), A039709 (k=11), A039710 (k=12), A039711 (k=13), A039712 (k=14), A039713 (k=15), A039714 (k=16), A039715 (k=17), this sequence (k=18), A033633 (k=19), A242120(k=20), A242121 (k=21), A242122 (k=22), A229786 (k=23), A229787 (k=24), A242123 (k=25), A242124 (k=26), A242125 (k=27), A242126 (k=28), A242127 (k=29), A095959 (k=30), A110923 (k=100).

Programs

  • Magma
    [p mod(18): p in PrimesUpTo(500)];
    
  • Mathematica
    Mod[Prime[Range[100]], 18]
  • Sage
    [mod(p, 18) for p in primes(500)] # Bruno Berselli, May 05 2014

Formula

Sum_{i=1..n} a(i) ~ 9n. The derivation is the same as in the formula in A039715. - Jerzy R Borysowicz, Apr 27 2022

A039704 a(n) = n-th prime modulo 6.

Original entry on oeis.org

2, 3, 5, 1, 5, 1, 5, 1, 5, 5, 1, 1, 5, 1, 5, 5, 5, 1, 1, 5, 1, 1, 5, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 1, 5, 1, 1, 1, 5, 5, 5, 1, 5, 1, 5, 1, 1, 1, 5, 1, 5, 5, 1, 5, 5, 5, 5, 1, 1, 5, 1, 5, 1, 5, 1, 5, 1, 1, 5, 1, 5, 5, 1, 1, 1, 5, 5, 1, 5, 1, 5, 1, 5, 1, 1, 5, 5, 1, 5, 1, 5, 5, 1, 5, 1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

Sum_k={1..n} a(k) ~ 3*n. - Amiram Eldar, Dec 11 2024

A039705 a(n) = n-th prime modulo 7.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(A049084(A045370(n-1))) is even; a(A049084(A045415(n-1))) is odd. - Reinhard Zumkeller, Feb 25 2008

Crossrefs

Programs

Formula

Sum_k={1..n} a(k) ~ (7/2)*n. - Amiram Eldar, Dec 11 2024
Showing 1-10 of 17 results. Next