OFFSET
1,1
COMMENTS
Primes p for which 10 has multiplicative order (p-1)/2. - Robert Israel, Jul 15 2016
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (Terms 2..1001 from T. D. Noe.)
Makoto Kamada, Factorizations of 11...11 (Repunit).
EXAMPLE
13 is a half-period prime because 1/13 = 0.076923076923076923076923..., which has period 6, or (13-1)/2.
MAPLE
select(t -> isprime(t) and numtheory:-order(10, t) = (t-1)/2,
[seq(t, t = 3..1000, 2)]); # Robert Israel, Jul 15 2016
MATHEMATICA
f[n_Integer] := Block[{ds = Divisors[n - 1]}, (n - 1)/Take[ ds, Position[ PowerMod[ 10, ds, n], 1] [[1, 1]]] [[ -1]]]; Select[ Prime[ Range[4, 200]], f[ # ] == 2 &] (* Robert G. Wilson v, Sep 14 2004 *)
PROG
(PARI) is(n)= gcd(10, n)==1 && isprime(n) && znorder(Mod(10, n))==(n-1)/2 \\ Dana Jacobsen, Jul 19 2016
(Perl) use ntheory ":all"; forprimes { say if znorder(10, $_) == ($_-1)/2; } 1, 1000; # Dana Jacobsen, Jul 19 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Julien Peter Benney (jpbenney(AT)ftml.net), Aug 23 2004
EXTENSIONS
Edited (including prepending 3), at the suggestion of Georg Fischer, by N. J. A. Sloane, Oct 19 2018
STATUS
approved