A086930 Smallest b>1 such that in base b representation the n-th prime is a repunit.
2, 4, 2, 10, 3, 16, 18, 22, 28, 2, 36, 40, 6, 46, 52, 58, 60, 66, 70, 8, 78, 82, 88, 96, 100, 102, 106, 108, 112, 2, 130, 136, 138, 148, 150, 12, 162, 166, 172, 178, 180, 190, 192, 196, 198, 14, 222, 226, 228, 232, 238, 15, 250, 256, 262, 268, 270, 276, 280, 282
Offset: 2
Examples
n=6: A000040(6) = 13 = 1*3^2 + 1*3^1 + 1*3^0: ternary(13)='111' and binary(13)='1101', therefore a(6)=3.
Links
- Robert G. Wilson v, Table of n, a(n) for n = 2..1001
- Eric Weisstein's World of Mathematics, Repunit
Crossrefs
Programs
-
Mathematica
f[n_] := Block[{i = 1, d, p = Prime@ n}, d = Rest@ Divisors[p - 1]; While[id = IntegerDigits[p, d[[i]]]; id != Reverse@ id || Union@ id != {1}, i++]; d[[i]]]; Array[f, 60, 2]
Comments