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.

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

Views

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