OFFSET
1,1
COMMENTS
From Charles R Greathouse IV, Feb 13 2009: (Start)
Essentially the same as A014662.
Also primes p for which p^2 divides 2^n+1 for some n. If p | 2^g + 1, then 2^g = kp - 1 for some k, so 2^gp = (kp - 1)^p = (-1)^p + (-1)^(p-1) * kp * (p choose 1) + ... and so 2^gp = -1 (mod p^2). (End)
LINKS
T. D. Noe, Table of n, a(n) for n=1..1000
Alexi Block Gorman, Tyler Genao, Heesu Hwang, Noam Kantor, Sarah Parsons, and Jeremy Rouse, The density of primes dividing a particular non-linear recurrence sequence, arXiv:1508.02464 [math.NT], 2015 (see Introduction).
H. H. Hasse, Über die Dichte der Primzahlen p, für die eine vorgegebene ganzrationale Zahl a != 0 von durch eine vorgegebene Primzahl l != 2 teilbarer bzw. unteilbarer Ordnung mod. p ist, Math. Ann., 162 (1965), 74-76.
H. H. Hasse, Über die Dichte der Primzahlen p, für die eine vorgegebene ganzrationale Zahl a != 0 von gerader bzw. ungerader Ordnung mod. p ist, Math. Ann., 166 (1966), 19-23.
Eugen J. Ionascu, Florian Luca, and Thomas Merino, On the average value of the minimal Hamming multiple, arXiv:2412.10839 [math.NT], 2024. See pp. 4, 17.
J. C. Lagarias, The set of primes dividing the Lucas numbers has density 2/3, Pacific J. Math., 118. No. 2, (1985), 449-461.
C. Smyth, The terms in Lucas Sequences divisible by their indices, JIS 13 (2010) #10.2.4.
FORMULA
Has density 17/24 (Hasse 1966).
MAPLE
2, op(select(t -> isprime(t) and numtheory:-order(2, t)::even, [seq(2*i+1, i=1..1000)])); # Robert Israel, Aug 12 2015
MATHEMATICA
Join[{2}, Select[Prime[Range[100]], EvenQ[MultiplicativeOrder[2, #/ (2^IntegerExponent[#, 2])]]&]] (* Jean-François Alcover, Sep 02 2018 *)
PROG
(PARI) isA091317(p)=!bitand(znorder(Mod(2, p)), 1) \\ Charles R Greathouse IV, Feb 13 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 21 2004
STATUS
approved