A171042 In the sequence of prime numbers, replace all the '8' digits with '1' and vice versa.
2, 3, 5, 7, 88, 83, 87, 89, 23, 29, 38, 37, 48, 43, 47, 53, 59, 68, 67, 78, 73, 79, 13, 19, 97, 808, 803, 807, 809, 883, 827, 838, 837, 839, 849, 858, 857, 863, 867, 873, 879, 818, 898, 893, 897, 899, 288, 223, 227, 229, 233, 239, 248, 258, 257, 263
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
FromDigits[IntegerDigits[#]/.{8->p, 1->q}/.{p->1, q->8}]&/@Prime[Range[100]] (* Vincenzo Librandi, Mar 11 2013 *)
-
PARI
a(n)=my(v=[0,8,2,3,4,5,6,7,1,9]);subst(Pol(apply(k->v[k+1], digits(prime(n)))),'x,10) \\ Charles R Greathouse IV, Jul 26 2013