The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A067934 Let rep(k) = (10^k - 1)/9 be the k-th repunit number = 11111..1111 with k 1 digits, then sequence gives values of k such that rep(k) == 1 (mod k). 2
 1, 2, 5, 7, 10, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 55, 59, 61, 67, 71, 73, 79, 83, 89, 91, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 259 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Due to Fermat's little theorem, all prime numbers except 3 are in the sequence. E.g., rep(17) = 1 + 17*653594771241830. Numbers n such that 10^n == 10 (mod 9n). The number (10^n - 1)/9 is a term if and only if n is a term. - Thomas Ordowski, Apr 28 2018 Generally, the repunit theorem: Let integer b <> 1 and n be a positive integer. Define R_b(n) = (b^n-1)/(b-1) = N. Then R_b(N) == 1 (mod N) if and only if N == 1 (mod n). - Thomas Ordowski, Apr 28 2018 Proof: (b^N-1)/(b-1)-1 = (b^N-b)/(b-1) is divisible by N if and only if b^N-b is divisible by b^n-1. Since b^N-b == b^(N mod n)-b (mod b^n-1), we have that b^N-b is divisible by b^n-1 if and only if N == 1 (mod n). QED. - Max Alekseyev, Apr 28 2018 Terms which are not prime are 1 U A303608. - Robert G. Wilson v, Jun 13 2018 No multiples of 3 are in this sequence. - Eric Chen, Jun 13 2018 A005939 is subsequence. - Eric Chen, Jun 13 2018 LINKS Michael De Vlieger, Table of n, a(n) for n = 1..10000 EXAMPLE (10^11 - 1)/9 = 11111111111 == 1 (mod 11), so 11 is a term. We also have the congruence 10^11 == 10 (mod 9*11). MATHEMATICA {1}~Join~Select[Range[260], Mod[#2, #1] == 1 & @@ {#, (10^# - 1)/9} &] (* Michael De Vlieger, May 06 2018 *) fQ[n_] := PowerMod[10, n, 9 n] == 10; fQ[1] = True; Select[Range@260, fQ] (* Robert G. Wilson v, Jun 13 2018 *) PROG (PARI) is(n)=n==1 || ((10^n-1)/9)%n==1 \\ Eric Chen, Jun 13 2018 CROSSREFS Cf. A000864, A015919, A303608, A005939. Sequence in context: A261034 A330777 A259749 * A284470 A112730 A288602 Adjacent sequences:  A067931 A067932 A067933 * A067935 A067936 A067937 KEYWORD nonn AUTHOR Benoit Cloitre, Mar 05 2002 STATUS approved

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

Last modified October 1 11:59 EDT 2020. Contains 337443 sequences. (Running on oeis4.)