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 10 results.

A003627 Primes of the form 3n-1.

Original entry on oeis.org

2, 5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, 101, 107, 113, 131, 137, 149, 167, 173, 179, 191, 197, 227, 233, 239, 251, 257, 263, 269, 281, 293, 311, 317, 347, 353, 359, 383, 389, 401, 419, 431, 443, 449, 461, 467, 479, 491, 503, 509, 521, 557, 563, 569, 587
Offset: 1

Views

Author

Keywords

Comments

Inert rational primes in the field Q(sqrt(-3)). - N. J. A. Sloane, Dec 25 2017
Primes p such that 1+x+x^2 is irreducible over GF(p). - Joerg Arndt, Aug 10 2011
Primes p dividing sum(k=0,p,C(2k,k)) -1 = A006134(p)-1. - Benoit Cloitre, Feb 08 2003
A039701(A049084(a(n))) = 2; A134323(A049084(a(n))) = -1. - Reinhard Zumkeller, Oct 21 2007
The set of primes of the form 3n - 1 is a superset of the set of lesser of twin primes larger than three (A001359). - Paul Muljadi, Jun 05 2008
Primes of this form do not occur in or as divisors of {n^2+n+1}. See A002383 (n^2+n+1 = prime), A162471 (prime divisors of n^2+n+1 not in A002383), and A002061 (numbers of the form n^2-n+1). - Daniel Tisdale, Jul 04 2009
Or, primes not in A007645. A003627 UNION A007645 = A000040. Also, primes of the form 6*k-5/2-+3/2. - Juri-Stepan Gerasimov, Jan 28 2010
Except for first term "2", all these prime numbers are of the form: 6*n-1. - Vladimir Joseph Stephan Orlovsky, Jul 13 2011
A088534(a(n)) = 0. - Reinhard Zumkeller, Oct 30 2011
For n>1: Numbers k such that (k-4)! mod k =(-1)^(floor(k/3)+1)*floor((k+1)/6), k>4. - Gary Detlefs, Jan 02 2012
Binomial(a(n),3)/a(n)= (3*A024893(n)^2+A024893(n))/2, n>1. - Gary Detlefs, May 06 2012
For every prime p in this sequence, 3 is a 9th power mod p. See Williams link. - Michel Marcus, Nov 12 2017
2 adjoined to A007528. - David A. Corneth, Nov 12 2017
For n >= 2 there exists a polygonal number P_s(3) = 3s - 3 = a(n) + 1. These are the only primes p with P_s(k) = p + 1, s >= 3, k >= 3, since P_s(k) - 1 is composite for k > 3. - Ralf Steiner, May 17 2018

References

  • M. Abramowitz and I. 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

Primes of form 3n+1 give A002476.
These are the primes arising in A024893, A087370, A088879. A091177 gives prime index.
Subsequence of A034020.

Programs

  • Haskell
    a003627 n = a003627_list !! (n-1)
    a003627_list = filter ((== 2) . (`mod` 3)) a000040_list
    -- Reinhard Zumkeller, Oct 30 2011
    
  • Magma
    [n: n in PrimesUpTo(720) | n mod 3 eq 2]; // Bruno Berselli, Apr 05 2011
    
  • Maple
    t1 := {}; for n from 0 to 500 do if isprime(3*n+2) then t1 := {op(t1),3*n+2}; fi; od: A003627 := convert(t1,list);
  • Mathematica
    Select[Range[-1, 600, 3], PrimeQ[#] &] (* Vincenzo Librandi, Jun 17 2015 *)
    Select[Prime[Range[200]],Mod[#,3]==2&] (* Harvey P. Dale, Jan 31 2023 *)
  • PARI
    is(n)=n%3==2 && isprime(n) \\ Charles R Greathouse IV, Mar 20 2013

Formula

From R. J. Mathar, Apr 03 2011: (Start)
Sum_{n>=1} 1/a(n)^2 = 0.30792... = A085548 - 1/9 - A175644.
Sum_{n>=1} 1/a(n)^3 = 0.134125... = A085541 - 1/27 - A175645. (End)

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

A024893 Numbers k such that 3*k+2 is prime.

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 13, 15, 17, 19, 23, 27, 29, 33, 35, 37, 43, 45, 49, 55, 57, 59, 63, 65, 75, 77, 79, 83, 85, 87, 89, 93, 97, 103, 105, 115, 117, 119, 127, 129, 133, 139, 143, 147, 149, 153, 155, 159, 163, 167, 169, 173, 185, 187, 189, 195, 197, 199, 205, 213, 215, 217, 219, 225, 227
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A003627 (associated primes), A091177 (gives prime index).

Programs

Formula

a(n) = A087370(n)-1 = A088879(n)+1.

A091178 Numbers k such that k-th prime is of the form 6*m+1.

Original entry on oeis.org

4, 6, 8, 11, 12, 14, 18, 19, 21, 22, 25, 27, 29, 31, 34, 36, 37, 38, 42, 44, 46, 47, 48, 50, 53, 58, 59, 61, 63, 65, 67, 68, 70, 73, 74, 75, 78, 80, 82, 84, 85, 88, 90, 93, 95, 99, 100, 101, 105, 106, 110, 111, 112, 114, 115, 117, 121, 122, 125, 127, 129, 130
Offset: 1

Views

Author

Ray Chandler, Dec 26 2003

Keywords

Comments

A002476 indexed by A000040.
Also k for which prime(k) == 1 (mod 3). - Bruno Berselli, Mar 04 2016
Sequence A091177 (indices of primes of the form 3*k-1) is this sequence's complement in the positive integers without {2}. - M. F. Hasler, Sep 02 2016
The asymptotic density of this sequence is 1/2 (by Dirichlet's theorem). - Amiram Eldar, Feb 28 2021

Crossrefs

Cf. A000040, A002476 (primes of the form 6*m+1), A091177 (indices of primes of the form 3*k-1), A024892, A024899.

Programs

  • Mathematica
    Select[Range[200],IntegerQ[(Prime[#]-1)/6]&] (* Harvey P. Dale, Aug 25 2013 *)
  • PARI
    isok(n) = !((prime(n)-1) % 6); \\ Michel Marcus, Mar 04 2016

Formula

a(n) = k such that A000040(k) = A002476(n).

Extensions

Definition edited by Zak Seidov, Oct 09 2014

A087370 Numbers n such that 3n - 1 is a prime.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 14, 16, 18, 20, 24, 28, 30, 34, 36, 38, 44, 46, 50, 56, 58, 60, 64, 66, 76, 78, 80, 84, 86, 88, 90, 94, 98, 104, 106, 116, 118, 120, 128, 130, 134, 140, 144, 148, 150, 154, 156, 160, 164, 168, 170, 174, 186, 188, 190, 196, 198, 200, 206, 214, 216
Offset: 1

Views

Author

Giovanni Teofilatto, Oct 21 2003

Keywords

Comments

3*n - 1 is an Eisenstein prime. - Vincenzo Librandi, Aug 08 2010
For all elements of this sequence there are no pairs (x,y) of positive integers such that a(n) = 3*x*y - x + y. - Pedro Caceres, Jan 28 2021

References

  • M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988
  • Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano 1997

Crossrefs

A003627 gives primes, A091177 gives prime index.
Cf. A010051, subsequence of A016789, A259645.

Programs

  • Haskell
    a087370 n = a087370_list !! (n-1)
    a087370_list = filter ((== 1) . a010051' . subtract 1 . (* 3)) [0..]
    -- Reinhard Zumkeller, Jul 03 2015

Formula

a(n)= A024893(n) + 1 = A088879(n) + 2.

Extensions

Corrected and extended by Ray Chandler, Oct 22 2003

A088879 Numbers n such that 3n + 5 is a prime.

Original entry on oeis.org

-1, 0, 2, 4, 6, 8, 12, 14, 16, 18, 22, 26, 28, 32, 34, 36, 42, 44, 48, 54, 56, 58, 62, 64, 74, 76, 78, 82, 84, 86, 88, 92, 96, 102, 104, 114, 116, 118, 126, 128, 132, 138, 142, 146, 148, 152, 154, 158, 162, 166, 168, 172, 184, 186, 188, 194, 196, 198, 204, 212, 214, 216, 218
Offset: 1

Views

Author

Giovanni Teofilatto, Nov 27 2003

Keywords

References

  • M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988
  • Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano 1997

Crossrefs

A003627 gives primes, A091177 gives prime index.
Cf. A016789.

Programs

Formula

a(n) = A024893(n) - 1 = A087370(n) - 2.

Extensions

Edited and extended by Ray Chandler, Dec 26 2003

A134323 a(n) = Legendre(-3, prime(n)).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 21 2007

Keywords

Comments

Value of lowest trit of prime(n) in balanced ternary representation (A059095) (original definition).
For p = prime(n) != 3, a(n) = +1 if p is of the form 3*k + 1, and -1 if the p is of the form 3*k - 1. - Joerg Arndt, Sep 16 2014

Examples

			For n=20, prime(20) = 71, and we verify that -3 is not a quadratic residue modulo 71, hence a(20) = -1. Also, we see that the balanced ternary representation row A059095(71) = {1, 0, -1, 0, -1} which ends in -1.
For n=21, prime(21) = 73, and we see that x^2 = -3 mod 73 has solutions like x = 17, 56, hence a(21) = 1. Also, the balanced ternary representation row A059095(73) = {1, 0 -1, 0, 1} which ends in 1.
		

Crossrefs

Cf. A000040, A039701, A049084, A112632 (partial sums), A059095 (balanced ternary)
Cf. A091177 (indices of -1's), A091178 (indices of +1's), A003627, A002476.
Other moduli: A070750, A257834.
Cf. A102283.

Programs

Formula

-1 if the n-th prime is 2 or == 5 mod 6, +1 if the n-th prime is == 1 mod 6, and 0 if it is 3.
a(n) = (1 - 0^A039701(n)) * (-1)^(A039701(n)+1).
a(n) != 0 for n != 2;
a(A049084(A003627(n))) = -1; a(A049084(A002476(n))) = +1.
a(n) = A102283(prime(n)). - Ridouane Oudra, Jan 09 2025

Extensions

Wording of definition changed by N. J. A. Sloane, Jun 21 2015
Name simplified by Alonso del Arte, Aug 02 2017

A133677 Integers k such that prime(k)*(2*prime(k)-1)/3 is an integer.

Original entry on oeis.org

1, 2, 3, 5, 7, 9, 10, 13, 15, 16, 17, 20, 23, 24, 26, 28, 30, 32, 33, 35, 39, 40, 41, 43, 45, 49, 51, 52, 54, 55, 56, 57, 60, 62, 64, 66, 69, 71, 72, 76, 77, 79, 81, 83, 86, 87, 89, 91, 92, 94, 96, 97, 98, 102, 103, 104, 107, 108, 109, 113, 116, 118, 119, 120, 123, 124, 126
Offset: 1

Views

Author

Roger L. Bagula, Dec 28 2007

Keywords

Comments

Apart from the term "2", the same as A091177. - Stefan Steinerberger, Dec 29 2007
Numbers n such that the number of distinct residues r in the congruence x^3 == r (mod p) is equal to p where p = prime(n). See A046530. - Michel Lagneau, Sep 28 2016
The asymptotic density of this sequence is 1/2 (by Dirichlet's theorem). - Amiram Eldar, Feb 28 2021

Examples

			4 is not in the sequence since prime(4)*(2*prime(4) - 1)/3 = 7*(2*7 - 1)/3 = 7*13/3 = 91/3 is not an integer, but 5 is in the sequence since prime(5)*(2*prime(5) - 1)/3 = 11*(2*11 - 1)/3 = 11*21/3 = 11*7 = 77 is an integer. - _Michael B. Porter_, Sep 28 2016
		

Crossrefs

Programs

  • Maple
    for n from 1 to 126 do if((ithprime(n) mod 3) mod 2=0) then print(n) fi od; # Gary Detlefs, Dec 06 2011
  • Mathematica
    Union[Table[If[IntegerQ[Prime[n]*(2*Prime[n] - 1)/3], n, {}], {n, 1, 100}]]
    pnQ[n_]:=Module[{pn=Prime[n]},IntegerQ[(pn(2pn-1))/3]]; Select[Range[ 150], pnQ] (* Harvey P. Dale, Oct 02 2011 *)
    Sort@ Join[{2}, Select[ Range@ 126, Mod[2*Prime[#], 3] == 1 &]] (* Robert G. Wilson v, Sep 28 2016 *)
    Select[Range[126], IntegerQ[Prime[#]*(2 *Prime[#] - 1)/3] &] (* Robert Price, Apr 19 2025 *)

Formula

Integers k such that (prime(k) mod 3) mod 2 = 0. - Gary Detlefs, Dec 06 2011

A276414 Index of the first prime which starts a run of n consecutive primes all congruent to each other mod 3 (or mod 6).

Original entry on oeis.org

1, 9, 15, 54, 271, 271, 2209, 11199, 13717, 13717, 34369, 136456, 172146, 1254203, 1254203, 4308948, 12762142, 21357253, 25813464, 25813464, 39500857, 39500857, 947438659, 947438659, 947438659, 5703167678, 5703167678, 16976360924, 57446769091, 57446769091, 57446769091
Offset: 1

Views

Author

M. F. Hasler, Sep 02 2016

Keywords

Comments

First term of runs of increasing length of consecutive integers in A270190. - M. F. Hasler, Sep 03 2016

Examples

			prime(9) = 23 starts the first run of 2 consecutive primes, {23, 29}, which are congruent to each other (mod 6). Therefore a(2) = 9.
prime(15) = 47 starts the first run of 3 consecutive primes, {47, 53, 59}, which are congruent to each other (mod 6). Therefore a(3) = 15.
prime(54) = 251 starts the first run of 4 consecutive primes, {251, 257, 263, 269}, which are congruent to each other (mod 6). Therefore a(4) = 54.
prime(271) = 1741 starts the first run of 5 consecutive primes, {1741, 1747, 1753, 1759, 1777}, which are congruent to each other (mod 6). Therefore a(5) = 271. This is the first case where the primes are of the form 3k+1.
prime(271) = 1741 also starts the first run of 6 consecutive primes, {1741, 1747, 1753, 1759, 1777, 1783}, which are all congruent to each other (mod 6). Therefore a(6) = 271, too.
		

Crossrefs

Subsequence of A270190 (after discarding 1 and duplicates of other terms).

Programs

  • PARI
    m=c=i=o=0;print1(1);forprime(p=1,,i++;(o-o=p)%3&&(!c||!c=0)&&next;c++>m||next;print1(",",i-m=c))

Formula

a(n) = A000720(A054679(n)).

Extensions

a(30)-a(31) from and name clarified by Jinyuan Wang, Feb 24 2020

A171820 Numbers n such that the n-th prime is of the form 3k + 1/2 +- 1/2.

Original entry on oeis.org

2, 4, 6, 8, 11, 12, 14, 18, 19, 21, 22, 25, 27, 29, 31, 34, 36, 37, 38, 42, 44, 46, 47, 48, 50, 53, 58, 59, 61, 63, 65, 67, 68, 70, 73, 74, 75, 78, 80, 82, 84, 85, 88, 90, 93, 95, 99, 100, 101, 105, 106, 110, 111, 112, 114, 115, 117, 121, 122, 125, 127, 129, 130, 131, 133
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 19 2009

Keywords

Comments

Numbers n such that the n-th prime is a generalized Cuban prime (A007645). A171820 UNION A091177 = A000027.
Essentially the same as A091178. - R. J. Mathar, Jan 28 2010

Examples

			2 is in the sequence because 2nd prime = 3*1 + 1/2 - 1/2;
4 is in the sequence because 4th prime = 3*2 + 1/2 + 1/2.
		

Crossrefs

Programs

  • PARI
    list(lim)=my(v=List(),n); forprime(p=2,, if(n++>lim, return(Vec(v))); if(p%3<2, listput(v,n))) \\ Charles R Greathouse IV, Feb 07 2017
Showing 1-10 of 10 results.