login
A056728
Palindromic primes using only two distinct digits and only the exterior digit is different.
2
101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 13331, 15551, 16661, 19991, 72227, 75557, 76667, 78887, 79997, 1333331, 1444441, 1777771, 3222223, 3444443, 7666667, 9222229, 9888889
OFFSET
1,1
COMMENTS
Primes of the form a*(10^c + 1) + b*(10^c - 10)/9 for 1<=a<=9, 0<=b<=9, c >= 2, a <> b. - Robert Israel, Nov 02 2014
MAPLE
f:= (a, b, n) -> a*(10^n + 1) + b*(10^n - 10)/9:
select(isprime, [seq(seq(seq(f(a, b, n), b={$0..9} minus {a}), a=1..9), n=2..8)]);
# Robert Israel, Nov 02 2014
MATHEMATICA
Select[Union[Flatten[Table[FromDigits[Join[{a}, PadRight[{}, n, b], {a}]], {n, 1, 7, 2}, {b, 0, 9}, {a, {1, 3, 7, 9}}]]], PrimeQ] (* Harvey P. Dale, Mar 07 2015 *)
CROSSREFS
Sequence in context: A056730 A077798 A089360 * A085112 A059758 A158089
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Aug 11 2000
EXTENSIONS
Links added by Patrick De Geest, Nov 02 2014
STATUS
approved