|
|
A113076
|
|
Smallest prime obtained by appending one or more 7's to n, -1 if no such prime exists.
|
|
4
|
|
|
17, 277, 37, 47, 577, 67, -1, 877, 97, 107, 11777, 127, 137, -1, 157, 167, 1777, 1877, 197, 20777777, -1, 227, 2377, 2477, 257, 2677, 277, -1, 29777777777777777777777777777777777777777777777777, 307, 317, 3277777
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(17) = 1777 is the smallest prime obtained by appending two 7s to 17.
|
|
MATHEMATICA
|
For[n = 1, n < 50, n++, If[n/7 <= Floor[n/7], k := 1; While[Not[PrimeQ[10^k*n + (10^k - 1)*7/9]], k++ ]; Print[10^k*n + (10^k - 1)*7/9]]] (* Stefan Steinerberger, Jan 27 2006 *)
Select[Table[First[Select[Rest[FromDigits/@Table[PadRight[{x}, n, 7], {n, 50}]], PrimeQ]], {x, 35}], NumberQ]//Quiet (* Harvey P. Dale, Jan 16 2011 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|