The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A216664 Odd numbers n such that the decimal expansion of 1/n contains the digit "9" at position (n + 1)/2. 2
11, 17, 19, 23, 29, 47, 59, 61, 73, 91, 95, 97, 101, 103, 109, 113, 127, 131, 137, 139, 149, 167, 179, 181, 189, 193, 211, 223, 229, 233, 251, 255, 257, 263, 269, 313, 325, 331, 337, 349, 353, 367, 379, 383, 389, 419, 421, 433, 441, 457, 461, 463, 477, 487, 491 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
First nine terms are primes.
This is not a subsequence of A187040: 189 belongs to this sequence but not to A187040.
LINKS
Arkadiusz Wesolowski, Table of n, a(n) for n = 1..1000
Wikipedia, Midy's theorem
EXAMPLE
1/17 = .058823529..., therefore 17 is a term.
1/21 = .04761904761..., therefore 21 is not a term.
MATHEMATICA
lst = {}; Do[l = (n + 1)/2; d = Flatten@RealDigits[1/n, 10, l]; If[Join[Table[0, {-1*Last@d}], Most@d][[l]] == 9, AppendTo[lst, n]], {n, 1, 491, 2}]; lst
PROG
(PARI) forstep(n=1, 491, 2, s=(n+1)/2; "\p s"; if(Mod(floor(10^s/n), 10)==9, print1(n, ", "))); \\ Arkadiusz Wesolowski, Aug 23 2013
(Python)
from itertools import count, islice
def A216664_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue+1-startvalue%2, 1), 2):
if 10**((n+1)//2)//n % 10 == 9:
yield n
A216664_list = list(islice(A216664_gen(), 20)) # Chai Wah Wu, Mar 04 2022
CROSSREFS
Cf. A187040.
Sequence in context: A050778 A316100 A049593 * A019412 A178641 A226682
KEYWORD
base,nonn
AUTHOR
STATUS
approved

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 June 15 11:51 EDT 2024. Contains 373407 sequences. (Running on oeis4.)