login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A097443 Half-period primes, i.e., primes p for which the decimal expansion of 1/p has period (p-1)/2. 17

%I #37 Nov 27 2022 10:03:00

%S 3,13,31,43,67,71,83,89,107,151,157,163,191,197,199,227,283,293,307,

%T 311,347,359,373,401,409,431,439,443,467,479,523,557,563,569,587,599,

%U 601,631,653,677,683,719,761,787,827,839,877,881,883,911,919,929,947,991

%N Half-period primes, i.e., primes p for which the decimal expansion of 1/p has period (p-1)/2.

%C Primes p for which 10 has multiplicative order (p-1)/2. - _Robert Israel_, Jul 15 2016

%H Robert Israel, <a href="/A097443/b097443.txt">Table of n, a(n) for n = 1..10000</a> (Terms 2..1001 from T. D. Noe.)

%H Makoto Kamada, <a href="https://stdkmd.net/nrr/repunit/">Factorizations of 11...11 (Repunit)</a>.

%H <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a>

%e 13 is a half-period prime because 1/13 = 0.076923076923076923076923..., which has period 6, or (13-1)/2.

%p select(t -> isprime(t) and numtheory:-order(10, t) = (t-1)/2,

%p [seq(t,t = 3..1000,2)]); # _Robert Israel_, Jul 15 2016

%t 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 *)

%o (PARI) is(n)= gcd(10,n)==1 && isprime(n) && znorder(Mod(10,n))==(n-1)/2 \\ _Dana Jacobsen_, Jul 19 2016

%o (Perl) use ntheory ":all"; forprimes { say if znorder(10,$_) == ($_-1)/2; } 1,1000; # _Dana Jacobsen_, Jul 19 2016

%Y Almost the same as A001914.

%Y Cf. A001913, A055628, A056157, A056210-A056217, A098680

%Y Cf. also A000040, A007732, A006883, A097443, A097955.

%K nonn

%O 1,1

%A Julien Peter Benney (jpbenney(AT)ftml.net), Aug 23 2004

%E Edited (including prepending 3), at the suggestion of _Georg Fischer_, by _N. J. A. Sloane_, Oct 19 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)