cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

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).

Original entry on oeis.org

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
Offset: 1

Views

Author

Benoit Cloitre, Mar 05 2002

Keywords

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

Examples

			(10^11 - 1)/9 = 11111111111 == 1 (mod 11), so 11 is a term.
We also have the congruence 10^11 == 10 (mod 9*11).
		

Crossrefs

Programs

  • 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 *)
  • PARI
    is(n)=n==1 || ((10^n-1)/9)%n==1 \\ Eric Chen, Jun 13 2018

A303608 Repunit pseudoprimes: composite numbers k such that (10^k - 1)/9 == 1 (mod k).

Original entry on oeis.org

10, 55, 91, 259, 370, 385, 451, 481, 505, 703, 715, 1045, 1105, 1729, 2035, 2465, 2821, 2981, 3367, 4141, 4187, 5005, 5461, 6533, 6541, 6565, 6601, 7471, 7777, 8149, 8401, 8695, 8905, 8911, 10001, 10585, 11111, 12403, 13366, 13981, 14245, 14645, 14701, 14911, 15211, 15841, 18685
Offset: 1

Views

Author

Thomas Ordowski, Apr 27 2018

Keywords

Comments

Composite numbers k such that 10^k == 10 (mod 9k).
If k is a term, then so is (10^k - 1)/9. Thus, the sequence is infinite.
No terms are divisible by 3. - Robert Israel, May 28 2018

Examples

			(10^10 - 1)/9 = 1111111111 == 1 (mod 10), so the composite 10 is a term.
Equivalently, we have the congruence 10^10 == 10 (mod 9*10).
		

Crossrefs

A000864 is a subsequence.
Composite numbers in A067934. - Michel Marcus, Apr 27 2018

Programs

  • Maple
    filter:=  n -> n mod 3 <> 0 and (10&^n - 10) mod n = 0\ and not isprime(n):
    select(filter,[$4..10^5]); # Robert Israel, May 28 2018
  • Mathematica
    Select[Range@ 20000, ! PrimeQ@# && PowerMod[10, #, 9 #] == 10 &] (* Robert G. Wilson v, Apr 28 2018 *)
  • PARI
    isok(n) = (n>1) && !isprime(n) && Mod(10, 9*n)^n == 10; \\ Michel Marcus, Apr 28 2018

Extensions

a(4) onward from Robert G. Wilson v, Apr 27 2018
Showing 1-2 of 2 results.