%I #85 Aug 05 2024 14:08:03
%S 2,6,14,18,26,30,50,74,86,90,98,134,146,158,174,186,194,210,230,254,
%T 270,278,306,326,330,338,350,354,378,386,398,410,414,426,438,470,530,
%U 554,558,606,614,618,638,650,686,690,726,746,774,810,818,834,846,866,870
%N Even terms in the sequence of Queneau numbers A054639.
%C Previous name was: a(n) is the n-th A_0-prime (Archimedes_0 prime).
%C 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^*.
%H P. R. J. Asveld, <a href="/A163777/b163777.txt">Table of n, a(n) for n = 1..3378</a>.
%H P. R. J. Asveld, <a href="http://dx.doi.org/10.1016/j.dam.2011.07.019">Permuting operations on strings and their relation to prime numbers</a>, Discrete Applied Mathematics 159 (2011), 1915-1932.
%H P. R. J. Asveld, <a href="http://eprints.eemcs.utwente.nl/20685/">Permuting operations on strings and the distribution of their prime numbers</a> (2011), TR-CTIT-11-24, Dept. of CS, Twente University of Technology, Enschede, The Netherlands.
%H P. R. J. Asveld, <a href="http://eprints.eemcs.utwente.nl/15678/">Some Families of Permutations and Their Primes </a> (2009), TR-CTIT-09-27, Dept. of CS, Twente University of Technology, Enschede, The Netherlands.
%H P. R. J. Asveld, <a href="https://citeseerx.ist.psu.edu/pdf/9d8542763057ef03a22b57f87085d69497ddaf46">Permuting Operations on Strings-Their Permutations and Their Primes</a>, Twente University of Technology, 2014. <a href="http://doc.utwente.nl/67513">Another link</a>.
%H <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>
%F a(n) = 2*A137310(n). - _Andrew Howroyd_, Nov 11 2017
%t okQ[n_] := EvenQ[n] && PrimeQ[2n+1] && MultiplicativeOrder[2, 2n+1] == 2n;
%t Select[Range[1000], okQ] (* _Jean-François Alcover_, Sep 10 2019, from PARI *)
%o (PARI)
%o Follow(s, f)={my(t=f(s), k=1); while(t>s, k++; t=f(t)); if(s==t, k, 0)}
%o ok(n)={n>1 && n==Follow(1, j->ceil((n+1)/2) - (-1)^j*ceil((j-1)/2))}
%o select(ok, [1..1000]) \\ _Andrew Howroyd_, Nov 11 2017
%o (PARI)
%o ok(n)={n%2==0 && isprime(2*n+1) && znorder(Mod(2, 2*n+1)) == 2*n}
%o select(ok, [1..1000]) \\ _Andrew Howroyd_, Nov 11 2017
%Y 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).
%Y Cf. A137310.
%K nonn
%O 1,1
%A _Peter R. J. Asveld_, Aug 11 2009
%E Definition simplified by _Michel Marcus_, May 27 2013
%E a(33)-a(55) from _Andrew Howroyd_, Nov 11 2017
%E New name from _Joerg Arndt_, Mar 23 2018, edited by _M. F. Hasler_, Mar 24 2018