A065074 Near-repunit primes that contain the digit 0.
101, 10111, 101111, 11110111, 11111101, 101111111, 101111111111, 111011111111, 111111011111, 111111110111, 111111111101, 11111111101111111, 11111111111111101, 101111111111111111, 111110111111111111, 111111101111111111, 111111111111011111, 111111111111111011
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..956 (this replaces an older b-file by Robert G. Wilson v)
- Chris Caldwell, Repunit
Programs
-
Maple
N:= 20: # to get all terms of up to N digits A:= select(isprime,[seq(seq((10^n-1)/9 - 10^j,j=n-2..1,-1),n=3..N)]); # Robert Israel, Jun 23 2015
-
Mathematica
f[n_] := Block[{lst = {}, r = (10^(n - 1) - 1)/9}, AppendTo[ lst, Select[ FromDigits[ Permutations[ Append[ IntegerDigits@ r, 0]]], PrimeQ@# && # > 100 &]]; Union@ Flatten@ lst]; Array[f, 18] // Flatten (* Robert G. Wilson v, Jun 22 2015 *)
Extensions
Name changed by Arkadiusz Wesolowski, Sep 23 2011