OFFSET
1,1
COMMENTS
Apart from the first term, identical to A091317. - Charles R Greathouse IV, Feb 13 2009
Dirichlet density is 5/24 (Fein, Gordon, & Smith); they show a result on expressing -1 as the sum of two squares relating to this sequence. - Charles R Greathouse IV, May 15 2024
REFERENCES
P. Moree, Appendix to V. Pless et al., Cyclic Self-Dual Z_4 Codes, Finite Fields Applic., vol. 3 pp. 48-69, 1997.
LINKS
Klaus Brockhaus, Table of n, a(n) for n = 1..1000
Burton Fein, Basil Gordon, and John H. Smith, On the representation of -1 as a sum of two squares in an algebraic number field J. Num. Theor. (1971) Vol. 3, Issue 3, 310-315.
C. Smyth, The terms in Lucas Sequences divisible by their indices, JIS 13 (2010) #10.2.4.
MAPLE
select(t -> isprime(t) and numtheory:-order(2, t)::even, [2*i+1 $ i=1..1000]); # Robert Israel, Aug 12 2014
MATHEMATICA
Select[Prime[Range[80]], EvenQ[MultiplicativeOrder[2, #/(2^IntegerExponent[ #, 2])]]&] (* Jean-François Alcover, Sep 02 2018 *)
PROG
(Magma) [ p: p in PrimesInInterval(3, 419) | IsEven(Modorder(2, p)) ] // Klaus Brockhaus, Dec 09 2008
(PARI) isok(p) = isprime(p) && !(znorder(Mod(2, p/2^valuation(p, 2))) % 2); \\ Michel Marcus, Sep 02 2018
(PARI) is(n)=n>2 && Mod(2, n)^(n>>valuation(n-1, 2))!=1 && isprime(n) \\ Charles R Greathouse IV, May 07 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Klaus Brockhaus, Dec 09 2008
STATUS
approved