

A002371


Period of decimal expansion of 1/(nth prime) (0 by convention for the primes 2 and 5).
(Formerly M4050 N1680)


46



0, 1, 0, 6, 2, 6, 16, 18, 22, 28, 15, 3, 5, 21, 46, 13, 58, 60, 33, 35, 8, 13, 41, 44, 96, 4, 34, 53, 108, 112, 42, 130, 8, 46, 148, 75, 78, 81, 166, 43, 178, 180, 95, 192, 98, 99, 30, 222, 113, 228, 232, 7, 30, 50, 256, 262, 268, 5, 69, 28, 141, 146, 153, 155, 312, 79, 110
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

a(n) is the minimum solution x of modular equation 10^x == 1 (mod p), where p = prime(n).  Carmine Suriano, Oct 10 2012
a(n) = smallest m such that 111...11 (m 1's) is divisible by the nth prime, or 0 if no such m exists (with the exception that a(2) = 3 instead of 1). E.g., the 5th prime, 11, divides 11, so a(5) = 2.  N. J. A. Sloane, Oct 03 2013 [Comment corrected by Derek Orr, Jun 14 2014]
Numbers n such that A071126(n) = A000040(n)  1.  Hugo Pfoertner, Mar 18 2003
Except for n = 1 and 3, a(n) divides A006093(n).  Robert Israel, Jul 15 2016


REFERENCES

Albert H. Beiler, Recreations in the Theory of Numbers, 2nd ed. New York: Dover, 1966, pages 65, 309. ISBN 0486210960.
John H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, p. 162.
D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 15.
W. Shanks, On the number of figures in the period of the reciprocal of every prime number below 20 000, Proc. Royal Soc. London, 22 (1874), 200210.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).


LINKS

T. D. Noe, Table of n, a(n) for n = 1..1000
C. K. Caldwell, The Prime Glossary, Period of a prime
Eric Weisstein's World of Mathematics, Decimal Expansion
Index entries for sequences related to decimal expansion of 1/n


FORMULA

From Alexander Adamchuk, Jan 28 2007: (Start)
a(A000720(p)) = p  1 for primes p in A001913.
a(A060257(n)) = prime(A060257(n))  1. (End)


EXAMPLE

1/31 = .03225806451612903225806451612903225806452... has period 15.


MAPLE

seq(subs(FAIL=0, numtheory:order(10, ithprime(n))), n=1..100); # Robert Israel, Jul 15 2016


MATHEMATICA

Table[ Length[ RealDigits[1 / Prime[n]] [[1, 1]]], {n, 1, 70}]


PROG

(PARI) a(n)=if(n<4, n==2, znorder(Mod(10, prime(n))))


CROSSREFS

See A048595 for another version. Cf. A006883, A007732, A051626, A071126, A000040, A002275, A097443.
Cf. A001913 (full reptend primes), A060257 (1/prime(n) has period prime(n)  1).
Sequence in context: A221716 A195474 A021945 * A048595 A302346 A244922
Adjacent sequences: A002368 A002369 A002370 * A002372 A002373 A002374


KEYWORD

nonn,nice,easy,base


AUTHOR

N. J. A. Sloane


EXTENSIONS

More terms from Arlin Anderson (starship1(AT)gmail.com)
Edited by Charles R Greathouse IV, Mar 24 2010


STATUS

approved



