login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A186635
Primes p such that the decimal expansion of 1/p has a periodic part of odd length.
3
2, 3, 5, 31, 37, 41, 43, 53, 67, 71, 79, 83, 107, 151, 163, 173, 191, 199, 227, 239, 271, 277, 283, 307, 311, 317, 347, 359, 397, 431, 439, 443, 467, 479, 523, 547, 563, 587, 599, 613, 631, 643, 683, 719, 733, 751, 757, 773, 787, 797, 827, 839, 853, 883, 907, 911, 919, 947, 991, 1013, 1031, 1039, 1093, 1123, 1151, 1163, 1187
OFFSET
1,1
COMMENTS
Interestingly, the initial terms of A040119 (Primes p such that x^4 = 10 has a solution mod p) are identical to the initial terms of this sequence except for 241 which is a term of A040119 but not of A186635. [John W. Layman, Feb 25 2011]
There are many numbers in A040119 that are not here: 241, 641, 769, 809, 1009, 1409, 1601, 1721.... - T. D. Noe, Feb 25 2011
MAPLE
Ax := proc(n) local st:
st := ithprime(n):
if (modp(numtheory[order](10, st), 2) <> 0) then
RETURN(st)
fi: end: seq(Ax(n), n=1..200);
MATHEMATICA
Union[{2, 5}, Select[Prime[Range[200]], OddQ[Length[RealDigits[1/#][[1, 1]]]] &]]
PROG
(PARI) select( {is_A186635(n)=isprime(n) && (n<7 || znorder(Mod(10, n))%2)}, [0..1234]) \\ M. F. Hasler, Nov 19 2024
(Python)
from sympy import isprime, n_order
is_A186635 = lambda n: isprime(n) and (n<7 or n_order(10, n)%2)
[n for n in range(1234) if is_A186635(n)] # M. F. Hasler, Nov 19 2024
CROSSREFS
Cf. A002371, A048595, A028416 (complement in the primes), A040119.
Sequence in context: A090475 A060301 A040119 * A265807 A106308 A036797
KEYWORD
nonn,base
AUTHOR
Jani Melik, Feb 24 2011
STATUS
approved