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

A001122 Primes with primitive root 2.

Original entry on oeis.org

3, 5, 11, 13, 19, 29, 37, 53, 59, 61, 67, 83, 101, 107, 131, 139, 149, 163, 173, 179, 181, 197, 211, 227, 269, 293, 317, 347, 349, 373, 379, 389, 419, 421, 443, 461, 467, 491, 509, 523, 541, 547, 557, 563, 587, 613, 619, 653, 659, 661, 677, 701, 709, 757, 773, 787, 797
Offset: 1

Views

Author

Keywords

Comments

Artin conjectured that this sequence is infinite.
Conjecture: sequence contains infinitely many pairs of twin primes. - Benoit Cloitre, May 08 2003
Pieter Moree writes (Oct 20 2004): Assuming the Generalized Riemann Hypothesis, it can be shown that the density of primes p such that a prescribed integer g has order (p-1)/t, with t fixed, exists and, moreover, it can be computed. This density will be a rational number times the so-called Artin constant. For 2 and 10 the density of primitive roots is A, the Artin constant itself.
It seems that this sequence consists of A050229 \ {1,2}.
Primes p such that 1/p, when written in base 2, has period p-1, which is the greatest period possible for any integer.
Positive integer 2*m-1 is in the sequence iff A179382(m)=m-1. - Vladimir Shevelev, Jul 14 2010
These are the odd primes p for which the polynomial 1+x+x^2+...+x^(p-1) is irreducible over GF(2). - V. Raman, Sep 17 2012 [Corrected by N. J. A. Sloane, Oct 17 2012]
Prime(n) is in the sequence if (and conjecturally only if) A133954(n) = prime(n). - Vladimir Shevelev, Aug 30 2013
Pollack shows that, on the GRH, that there is some C such that a(n+1) - a(n) < C infinitely often (in fact, 1 can be replaced by any positive integer). Further, for any m, a(n), a(n+1), ..., a(n+m) are consecutive primes infinitely often. - Charles R Greathouse IV, Jan 05 2015
From Jianing Song, Apr 27 2019: (Start)
All terms are congruent to 3 or 5 modulo 8. If we define
Pi(N,b) = # {p prime, p <= N, p == b (mod 8)};
Q(N) = # {p prime, p <= N, p in this sequence},
then by Artin's conjecture, Q(N) ~ C*N/log(N) ~ 2*C*(Pi(N,3) + Pi(N,5)), where C = A005596 is Artin's constant.
Conjecture: if we further define
Q(N,b) = # {p prime, p <= N, p == b (mod 8), p in this sequence},
then we have:
Q(N,3) ~ (1/2)*Q(N) ~ C*Pi(N,3);
Q(N,5) ~ (1/2)*Q(N) ~ C*Pi(N,5). (End)
Conjecture: for a prime p > 5, p has primitive root 2 iff p == +-3 (mod 8) divides 2^k + 3 for some k < p - 1 and divides 2^m + 5 for some m < p - 1. It seems that all primes of the form 2^k + 3 for k <> 2 (A057732) have primitive root 2. - Thomas Ordowski, Nov 27 2023

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. 864.
  • E. Bach and Jeffrey Shallit, Algorithmic Number Theory, I; see p. 221.
  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, New York, 1996; see p. 169.
  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 56.
  • Lehmer, D. H. and Lehmer, Emma; Heuristics, anyone? in Studies in mathematical analysis and related topics, pp. 202-210, Stanford Univ. Press, Stanford, Calif., 1962.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 20.
  • D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, p. 81.
  • 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. A002326 for the multiplicative order of 2 mod 2n+1. (Alternatively, the least positive value of m such that 2n+1 divides 2^m-1).
Cf. A216838 (Odd primes for which 2 is not a primitive root).

Programs

  • Mathematica
    Select[ Prime@Range@200, PrimitiveRoot@# == 2 &] (* Robert G. Wilson v, May 11 2001 *)
    pr = 2; Select[Prime[Range[200]], MultiplicativeOrder[pr, # ] == # - 1 &] (* N. J. A. Sloane, Jun 01 2010 *)
  • PARI
    forprime(p=3, 1000, if(znorder(Mod(2, p))==(p-1), print1(p,", "))); \\ [corrected by Michel Marcus, Oct 08 2014]
    
  • Python
    from itertools import islice
    from sympy import nextprime, is_primitive_root
    def A001122_gen(): # generator of terms
        p = 2
        while (p:=nextprime(p)):
            if is_primitive_root(2,p):
                yield p
    A001122_list = list(islice(A001122_gen(),30)) # Chai Wah Wu, Feb 13 2023

Formula

Delta(a(n),2^a(n)*x) = a(n)*Delta(a(n),2*x), where Delta(k,x) is the difference between numbers of evil(A001969) and odious(A000069) integers divisible by k in interval [0,x). - Vladimir Shevelev, Aug 30 2013
For n >= 2, a(n) = 1 + 2*A163782(n-1). - Antti Karttunen, Oct 07 2017

A163800 a(n) is the n-th J_20-prime (Josephus_20 prime).

Original entry on oeis.org

2, 5, 30, 54, 81, 109, 149, 186, 513, 1089, 8158, 8533, 17178, 34478, 913274, 976402
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 04 2009, Aug 12 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclicly mark the 20th unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_20-prime if this permutation consists of a single cycle of length N.
There are 16 J_20-primes in the interval 2..1000000 only. No formula is known; the J_20-primes were found by exhaustive search.

Examples

			2 is a J_20-prime (trivial).
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

See A163782 through A163799 for J_2- through J_19-primes.

A071642 Numbers n such that x^n + x^(n-1) + x^(n-2) + ... + x + 1 is irreducible over GF(2).

Original entry on oeis.org

0, 1, 2, 4, 10, 12, 18, 28, 36, 52, 58, 60, 66, 82, 100, 106, 130, 138, 148, 162, 172, 178, 180, 196, 210, 226, 268, 292, 316, 346, 348, 372, 378, 388, 418, 420, 442, 460, 466, 490, 508, 522, 540, 546, 556, 562, 586, 612, 618, 652, 658, 660, 676, 700, 708, 756, 772
Offset: 1

Views

Author

N. J. A. Sloane, Jun 22 2002

Keywords

Comments

All such polynomials of odd degree > 1 are reducible over GF(2).
For n >= 2, a(n) = A001122(n-2) - 1 due to the relationship between cycles and irreducibility. - T. D. Noe, Sep 09 2003
n such that a type-1 optimal normal basis of GF(2^n) (over GF(2)) exists. The corresponding field polynomial is the all-ones polynomial x^n+x^(n-1)+...+1. - Joerg Arndt, Feb 25 2008
From Peter R. J. Asveld, Aug 13 2009: (Start)
a(n) is also the n-th S-prime (Shuffle prime)
For N>=2, the family of shuffle permutations is defined by
p(m,N) = 2m (mod N+1) if N is even,
p(m,N) = 2m (mod N) if N is odd and 1<=m
p(N,N) = N if N is odd.
N is S-prime if p(m,N) consists of a single cycle of length N.
So all S-primes are even.
N is S-prime iff p=N+1 is an odd prime number and +2 generates Z_p^* (the multiplicative group of Z_p).
a(n)/2 results in the Josephus_2-primes (A163782). Considered as sets a(n)/2 is the union of A163777 and A163779. If b(n) denotes the dual shuffle primes (A163776), then the union of a(n)/2 and b(n)/2 is equal to the Twist-primes or Queneau numbers (A054639); their intersection is equal to the Archimedes_0-primes (A163777). (End)
Conjecture: Terms >= 2 are numbers n such that P^n + P^(n-1) + P^(n-2) + ... + P + 1 is irreducible over GF(2), where P=x^2+x+1. - Luis H. Gallardo, Dec 23 2019

Examples

			For n=4 and n=6 we obtain the permutations (1 2 4 3) and (1 2 4)(3 6 5): 4 is S-prime, but 6 is not. [_Peter R. J. Asveld_, Aug 13 2009]
		

Crossrefs

Cf. A001122 (primes with primitive root 2).

Programs

  • Mathematica
    Join[{0, 1}, Reap[For[p = 2, p < 10^3, p = NextPrime[p], If[ MultiplicativeOrder[2, p] == p-1, Sow[p-1]]]][[2, 1]]] (* Jean-François Alcover, Dec 10 2015, adapted from PARI *)
  • PARI
    forprime(p=3,1000,if(znorder(Mod(2,p))==p-1,print1(p-1,", "))) /* Joerg Arndt, Jul 05 2011 */

Extensions

Extended by Robert G. Wilson v, Jun 24 2002
Initial terms of b-file corrected by N. J. A. Sloane, Aug 31 2009

A054639 Queneau numbers: numbers n such that the Queneau-Daniel permutation {1, 2, 3, ..., n} -> {n, 1, n-1, 2, n-2, 3, ...} is of order n.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 11, 14, 18, 23, 26, 29, 30, 33, 35, 39, 41, 50, 51, 53, 65, 69, 74, 81, 83, 86, 89, 90, 95, 98, 99, 105, 113, 119, 131, 134, 135, 146, 155, 158, 173, 174, 179, 183, 186, 189, 191, 194, 209, 210, 221, 230, 231, 233, 239
Offset: 1

Author

Gilles Esposito-Farese (gef(AT)cpt.univ-mrs.fr), May 17 2000

Keywords

Comments

The troubadour Arnaut Daniel composed sestinas based on the permutation 123456 -> 615243, which cycles after 6 iterations.
Roubaud quotes the number 141, but the corresponding Queneau-Daniel permutation is only of order 47 = 141/3.
This appears to coincide with the numbers n such that a type-2 optimal normal basis exists for GF(2^n) over GF(2). But are these two sequences really the same? - Joerg Arndt, Feb 11 2008
The answer is Yes - see Theorem 2 of the Dumas reference. [Jean-Guillaume Dumas (Jean-Guillaume.Dumas(AT)imag.fr), Mar 20 2008]
From Peter R. J. Asveld, Aug 17 2009: (Start)
a(n) is the n-th T-prime (Twist prime). For N >= 2, the family of twist permutations is defined by
p(m,N) == +2m (mod 2N+1) if 1 <= m < k = ceiling((N+1)/2),
p(m,N) == -2m (mod 2N+1) if k <= m < N.
N is T-prime if p(m,N) consists of a single cycle of length N.
The twist permutation is the inverse of the Queneau-Daniel permutation.
N is T-prime iff p=2N+1 is a prime number and exactly one of the following three conditions holds;
(1) N == 1 (mod 4) and +2 generates Z_p^* (the multiplicative group of Z_p) but -2 does not,
(2) N == 2 (mod 4) and both +2 and -2 generate Z_p^*,
(3) N == 3 (mod 4) and -2 generate Z_p^* but +2 does not. (End)
The sequence name says the permutation is of order n, but P. R. J. Asveld's comment says it's an n-cycle. Is there a proof that those conditions are equivalent for the Queneau-Daniel permutation? (They are not equivalent for any arbitrary permutation; e.g., (123)(45)(6) has order 6 but isn't a 6-cycle.) More generally, I have found that for all n <= 9450, (order of Queneau-Daniel permutation) = (length of orbit of 1) = A003558(n). Does this hold for all n? - David Wasserman, Aug 30 2011

Examples

			For N=6 and N=7 we obtain the permutations (1 2 4 5 3 6) and (1 2 4 7)(3 6)(5): 6 is T-prime, but 7 is not. - _Peter R. J. Asveld_, Aug 17 2009
		

References

  • Raymond Queneau, Note complémentaire sur la Sextaine, Subsidia Pataphysica 1 (1963), pp. 79-80.
  • Jacques Roubaud, Bibliothèque Oulipienne No 65 (1992) and 66 (1993).

Crossrefs

Not to be confused with Queneau's "s-additive sequences", see A003044.
A005384 is a subsequence.
Union of A163782 (Josephus_2-primes) and A163781 (dual Josephus_2-primes); also the union of A163777 (Archimedes_0-primes) and A163778 (Archimedes_1-primes); also the union of A071642/2 (shuffle primes) and A163776/2 (dual shuffle primes). - Peter R. J. Asveld, Aug 17 2009
Cf. A216371, A003558 (for which a(n) == n).

Programs

  • Maple
    QD:= proc(n) local i;
      if n::even then map(op,[seq([n-i,i+1],i=0..n/2-1)])
      else map(op, [seq([n-i,i+1],i=0..(n-1)/2-1),[(n+1)/2]])
      fi
    end proc:
    select(n -> GroupTheory:-PermOrder(Perm(QD(n)))=n, [$1..1000]); # Robert Israel, May 01 2016
  • Mathematica
    a[p_] := Sum[Cos[2^n Pi/((2 p + 1) )], {n, 1, p}];
    Select[Range[500],Reduce[a[#] == -1/2, Rationals] &] (* Gerry Martens, May 01 2016 *)
  • PARI
    is(n)=
    {
        if (n==1, return(1));
        my( m=n%4 );
        if ( m==4, return(0) );
        my(p=2*n+1, r=znorder(Mod(2,p)));
        if ( !isprime(p), return(0) );
        if ( m==3 && r==n, return(1) );
        if ( r==2*n, return(1) ); \\ r == 1 or 2
        return(0);
    }
    for(n=1,10^3, if(is(n),print1(n,", ")) );
    \\ Joerg Arndt, May 02 2016

Formula

a(n) = (A216371(n)-1)/2. - L. Edson Jeffery, Dec 18 2012
a(n) >> n log n, and on the Bateman-Horn-Stemmler conjecture a(n) << n log^2 n. I imagine a(n) ≍ n log n, and numerics suggest that perhaps a(n) ~ kn log n for some constant k (which seems to be around 1.122). - Charles R Greathouse IV, Aug 02 2023

A051732 Number of rounds of shuffling required to restore a deck of n cards to its original order: shuffling is done by keeping first card, putting second at end of deck, keeping next, putting next at end and so on.

Original entry on oeis.org

1, 1, 2, 2, 3, 5, 6, 6, 4, 9, 4, 28, 10, 9, 14, 12, 5, 70, 18, 24, 10, 7, 210, 126, 110, 60, 26, 120, 9, 29, 30, 60, 6, 33, 308, 42, 60, 990, 30, 374, 27, 41, 60, 2618, 840, 840, 420, 1386, 24, 15, 50, 644, 840, 53, 18, 1386, 14, 13300, 2520, 1260, 55, 6930, 50, 60, 7
Offset: 1

Author

Marie-Christine Haton (Marie-Christine.Haton(AT)loria.fr)

Keywords

Comments

From Andrew Howroyd, Nov 11 2017:(Start)
The shuffling process is the same as the 'deal one, skip one' method described in A289386 except that dealt cards are placed face up. With this variation the first card always remains the first card.
Equivalently, place the numbers 1..n-1 on a circle and cyclically mark the 2nd unmarked number until all numbers are marked. The sequence in which the numbers are marked defines a permutation. The order of this permutation is a(n). The numbers 1..n can also be used, but in that case the number 1 should be marked first.
(End)

Examples

			From _Andrew Howroyd_, Nov 11 2017: (Start)
a(6) = 5 because it takes 5 rounds of shuffling to return the cards to their original order as illustrated below:
1 2 3 4 5 6
1 3 5 2 6 4
1 5 6 3 4 2
1 6 4 5 2 3
1 4 2 6 3 5
1 2 3 4 5 6
(End)
		

Crossrefs

Programs

  • PARI
    P(n,i)={my(d=2*n+1-2*i); while(ds, k++; t=f(t)); if(s==t, k, 0)}
    CyclePoly(n,x)={my(q=0); for(i=1, n, my(l=Follow(i,j->P(n,j))); if(l,q+=x^l)); q}
    a(n)={my(q=CyclePoly(n,x), m=1); for(i=1,poldegree(q),if(polcoeff(q,i), m=lcm(m,i))); m} \\ Andrew Howroyd, Nov 11 2017

Formula

a(2^n+1) = n+1. - Ripatti A. (ripatti(AT)inbox.ru), Feb 04 2010
a(A163782(n)+1) = A163782(n). - Andrew Howroyd, Nov 11 2017

Extensions

Name clarified by Andrew Howroyd, Nov 11 2017

A163777 Even terms in the sequence of Queneau numbers A054639.

Original entry on oeis.org

2, 6, 14, 18, 26, 30, 50, 74, 86, 90, 98, 134, 146, 158, 174, 186, 194, 210, 230, 254, 270, 278, 306, 326, 330, 338, 350, 354, 378, 386, 398, 410, 414, 426, 438, 470, 530, 554, 558, 606, 614, 618, 638, 650, 686, 690, 726, 746, 774, 810, 818, 834, 846, 866, 870
Offset: 1

Author

Peter R. J. Asveld, Aug 11 2009

Keywords

Comments

Previous name was: a(n) is the n-th A_0-prime (Archimedes_0 prime).
We have: (1) N is A_0-prime if and only if N is even, p = 2N + 1 is a prime number and both +2 and -2 generate Z_p^* (the multiplicative group of Z_p); (2) N is A_0-prime if and only if N = 2 (mod 4), p = 2N + 1 is a prime number and both +2 and -2 generate Z_p^*.

Crossrefs

The A_0-primes are the even T- or Twist-primes, these T-primes are equal to the Queneau-numbers (A054639). For the related A_1-, A^+_1- and A^-_1-primes, see A163778, A163779 and A163780. Considered as sets A163777 is the intersection of the Josephus_2-primes (A163782) and the dual Josephus_2-primes (A163781), it also equals the difference of A054639 and the A_1-primes (A163779).
Cf. A137310.

Programs

  • Mathematica
    okQ[n_] := EvenQ[n] && PrimeQ[2n+1] && MultiplicativeOrder[2, 2n+1] == 2n;
    Select[Range[1000], okQ] (* Jean-François Alcover, Sep 10 2019, from PARI *)
  • PARI
    Follow(s, f)={my(t=f(s), k=1); while(t>s, k++; t=f(t)); if(s==t, k, 0)}
    ok(n)={n>1 && n==Follow(1, j->ceil((n+1)/2) - (-1)^j*ceil((j-1)/2))}
    select(ok, [1..1000]) \\ Andrew Howroyd, Nov 11 2017
    
  • PARI
    ok(n)={n%2==0 && isprime(2*n+1) && znorder(Mod(2, 2*n+1)) == 2*n}
    select(ok, [1..1000]) \\ Andrew Howroyd, Nov 11 2017

Formula

a(n) = 2*A137310(n). - Andrew Howroyd, Nov 11 2017

Extensions

Definition simplified by Michel Marcus, May 27 2013
a(33)-a(55) from Andrew Howroyd, Nov 11 2017
New name from Joerg Arndt, Mar 23 2018, edited by M. F. Hasler, Mar 24 2018

A292270 Sum of all partial fractions in the algorithm used for calculation of A002326(n).

Original entry on oeis.org

1, 1, 4, 1, 13, 25, 36, 1, 38, 81, 12, 26, 124, 121, 196, 1, 103, 73, 324, 42, 224, 175, 91, 147, 232, 14, 676, 170, 303, 841, 900, 1, 264, 1089, 385, 364, 93, 301, 585, 563, 1093, 1681, 44, 355, 152, 118, 83, 484, 1254, 763, 2500, 1043, 156, 2809, 996, 564, 952, 931, 71, 387, 3325, 176, 3124, 1, 649, 4225, 554, 1081
Offset: 0

Author

Keywords

Comments

This sequence gives important additional insight into the algorithm for the calculation of A002326 (see A179680 for its description). Let us estimate how many steps are required before (the first) 1 will appear. Note that all partial fractions (which are indeed, integers) are odd residues modulo 2*n+1 from the interval [1,2*n-1]. So, if there is no repetition, then the number of steps does not exceed n. Suppose then that there is a repetition before the appearance of 1. Then for an odd residue k from [1, 2*n-1], 2^m_1 == 2^m_2 == k (mod 2*n+1) such that m_2 > m_1. But then 2^(m_2-m_1) == 1 (mod 2*n+1). So, since m_2 - m_1 < m_2, it means that 1 should appear earlier than the repetition of k, which is a contradiction. So the number of steps <= n. For example, for n=9, 2*n+1 = 19, we have exactly 9 steps with all other odd residues <= 17 modulo 19 appearing before the final 1: 5, 3, 11, 15, 17, 9, 7, 13, 1.
A001122 gives the odd numbers k such that a((k-1)/2) = A000290((k-1)/2).

Examples

			Let n = 9. According to the comment, a(9) = 5 + 3 + 11 + 15 + 17 + 9 + 7 + 13 + 1 = 81.
		

Crossrefs

Cf. A000225 (gives the positions of ones), A292938 (of squares), A292939 (and the corresponding odd numbers), A292940 (odd numbers corresponding to squares larger than one), A292379 (odd numbers corresponding to squares less than n^2).

Programs

  • PARI
    A000265(n) = (n >> valuation(n, 2));
    A006519(n) = 2^valuation(n, 2);
    A292270(n) = { my(x = n+n+1, z = ((1+x)/A006519(1+x)), m = A000265(1+x)); while(m!=1, z += ((x+m)/A006519(x+m)); m = A000265(x+m)); z; };
    
  • Scheme
    (define (A292270 n) (let ((x (+ n n 1))) (let loop ((z (/ (+ 1 x) (A006519 (+ 1 x)))) (k 1)) (let ((m (A000265 (+ x k)))) (if (= 1 m) z (loop (+ z (/ (+ x m) (A006519 (+ x m)))) m))))))

Formula

For all n >= 1, A000196(a((A001122(1+n)-1)/2)) = (A001122(1+n)-1)/2, in other words, a(A163782(n)) = A000290(A163782(n)).

A163779 Numbers k of the form 4*j + 1 such that 2*k + 1 is a prime with primitive root 2.

Original entry on oeis.org

1, 5, 9, 29, 33, 41, 53, 65, 69, 81, 89, 105, 113, 173, 189, 209, 221, 233, 245, 261, 273, 281, 293, 309, 329, 393, 413, 429, 441, 453, 473, 509, 545, 561, 585, 593, 629, 641, 645, 653, 713, 725, 741, 749, 761, 765, 785, 809, 833, 873, 893, 933, 953, 965, 989, 993
Offset: 1

Author

Peter R. J. Asveld, Aug 12 2009

Keywords

Comments

Previous name was: a(n) is the n-th A^+_1-prime (Archimedes^+_1 prime).
N is A^+_1-prime iff N=1 (mod 4), p=2N+1 is a prime number and +2 generates Z_p^* (the multiplicative group of Z_p) but -2 does not.

Crossrefs

The A^+_1-primes are the T- or Twist-primes congruent 1 (mod 4), these T-primes are equal to the Queneau-numbers (A054639). For the related A_0-, A_1- and A^-_1-primes, see A163777, A163778 and A163780. Considered as sets the union of A163779 and A163780 equals A163778, the union of A163779 and A163777 is equal to A163782 (J_2-primes).

Programs

  • Mathematica
    okQ[n_] := Mod[n, 4] == 1 && PrimeQ[2n+1] && MultiplicativeOrder[2, 2n+1] == 2n;
    Select[Range[1000], okQ] (* Jean-François Alcover, Jun 30 2018, after Andrew Howroyd *)
  • PARI
    ok(n) = n%4==1 && isprime(2*n+1) && znorder(Mod(2, 2*n+1))==2*n;
    select(ok, [1..1000]) \\ Andrew Howroyd, Nov 11 2017

Formula

2 * a(n) + 1 = A213051(n+1). - Joerg Arndt, Mar 23 2018

Extensions

a(32)-a(55) from Andrew Howroyd, Nov 11 2017
Term 1 prepended and new name from Joerg Arndt, Mar 23 2018

A163781 a(n) is the n-th dJ_2 prime (dual Josephus_2 prime).

Original entry on oeis.org

2, 3, 6, 11, 14, 18, 23, 26, 30, 35, 39, 50, 51, 74, 83, 86, 90, 95, 98, 99, 119, 131, 134, 135, 146, 155, 158, 174, 179, 183, 186, 191, 194, 210, 230, 231, 239, 243, 251, 254, 270, 278, 299, 303, 306, 323, 326, 330, 338, 350, 354, 359, 371, 375, 378
Offset: 1

Author

Peter R. J. Asveld, Aug 17 2009

Keywords

Comments

The family of dual Josephus_2 (or dJ_2) permutations is defined by p(m,N)=(2N + 1 - F(m,2N + 1))/2 if 1<=m<=N, N>=2, where F(x,y) is the odd number such that 1<=F(x,y)=0. Note that F(2k + 1,y)=2k + 1 for 2k + 1
dJ_2 permutations can also be defined using a numbering/elimination procedure similar to the definition of the Josephus_2 permutations in [R.L. Graham et al.], or in A163782; see [P. R. J. Asveld].
No formula is known for a(n): the dJ_2 primes have been found by exhaustive search. But we have: (1) N is dJ_2 prime iff p=2N+1 is a prime number and -2 generates Z_p^* (the multiplicative group of Z_p); (2) N is dJ_2 prime iff p=2N+1 is a prime number and exactly one of the following holds:
(a) N=2 (mod 4) and both +2 and -2 generate Z_p^*,
(b) N=3 (mod 4) and -2 generates Z_p^* but +2 does not.

Examples

			For N=6 we have
  m       | 1   2   3   4   5   6
  --------+----------------------
  F(m,13) | 1   7   3  11   5   9
  t       | 0   2   0   1   0   3
  p(m,6)  | 6   3   5   1   4   2
So the permutation is (1 6 2 3 5 4) and 6 is dJ_2 prime.
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

Considered as sets the union of A163781 and A163782 (J_2 primes) equals A054639 (T-primes or Queneau numbers), their intersection is equal to A163777 (Archimedes_0 primes). A163781 equals the union of A163777 and A163780 (Archimedes^-_1 primes).

Programs

  • Mathematica
    okQ[n_] := Mod[n, 4] >= 2 && PrimeQ[2n+1] && MultiplicativeOrder[2, 2n+1] == If[OddQ[n], n, 2n];
    Select[Range[1000], okQ] (* Jean-François Alcover, Sep 23 2019, from PARI *)
  • PARI
    ok(n)={n%4>=2 && isprime(2*n+1) && znorder(Mod(2, 2*n+1)) == if(n%2,n,2*n)};
    select(ok, [1..1000]) \\ Andrew Howroyd, Nov 11 2017

Extensions

a(37)-a(55) from Andrew Howroyd, Nov 11 2017

A103579 Sophie Germain primes that are not Lucasian primes: primes p not 3 (mod 4) such that 2p + 1 is prime.

Original entry on oeis.org

2, 5, 29, 41, 53, 89, 113, 173, 233, 281, 293, 509, 593, 641, 653, 761, 809, 953, 1013, 1049, 1229, 1289, 1409, 1481, 1601, 1733, 1889, 1901, 1973, 2069, 2129, 2141, 2273, 2393, 2549, 2693, 2741, 2753, 2969, 3329, 3389, 3413, 3449, 3593, 3761, 3821, 4073, 4349, 4373, 4409, 4481, 4733, 4793, 5081
Offset: 1

Author

Jonathan Vos Post, Mar 23 2005

Keywords

Comments

For n > 1, the prime 2*a(n) + 1 is the smallest prime divisor of (2^a(n) + 1)/3. - Emmanuel Vantieghem, Aug 12 2018
Primes p such that 2*p+1 divides 2^p+1. - Hilko Koning, Sep 21 2021
Subset of Josephus_2 primes {A163782} that are themselves also prime. - Joe Nellis, Dec 27 2022

Crossrefs

Programs

  • Maple
    select(t -> isprime(t) and isprime(2*t+1),[2,seq(4*k+1,k=1..10000)]); # Robert Israel, May 20 2015
  • Mathematica
    Select[Prime[Range[500]], PrimeQ[2#+ 1 ] && Mod[#, 4] != 3 &] (* Harvey P. Dale, Jun 15 2013 *)
    Select[4Range[100] + 1, PrimeQ[#] && PrimeQ[2# + 1] &] (* Alonso del Arte, Jun 01 2019 *)
  • PARI
    forprime(p=2,10^4,if((p%4!=3)&&isprime(2*p+1),print1(p,", "))); \\ Joerg Arndt, Nov 18 2014

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Jul 07 2009
Showing 1-10 of 30 results. Next