OFFSET
1,1
COMMENTS
2, 4 and 8 were chosen because they are powers of 2.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
53 is prime and so are 23, 43, 83, so 53 is a term of the sequence.
MATHEMATICA
(*replaces the leading digit of n by m*) f[n_, m_] := FromDigits[Flatten[Append[IntegerDigits[m], Drop[IntegerDigits[n], 1]]]]; Select[Range[10^4], PrimeQ[ # ] && PrimeQ[f[ #, 2]] && PrimeQ[f[ #, 4]] && PrimeQ[f[ #, 8]] & ]
Select[Prime[Range[700]], AllTrue[FromDigits/@Table[Join[{i}, Rest[ IntegerDigits[ #]]], {i, {2, 4, 8}}], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 04 2017 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Joseph L. Pe, Feb 20 2002
EXTENSIONS
Offset corrected to 1 and title simplified by M. F. Hasler, Nov 01 2014
STATUS
approved