%I #9 Mar 31 2017 20:30:10
%S 4,3,5,7,11,13,17,19,43,49,31,37,21,23,27,53,59,61,67,71,73,79,83,89,
%T 97,101,103,107,109,113,147,131,137,139,129,151,157,163,167,173,179,
%U 181,191,193,197,199,411,443,447,449,433,439,421,451,457,463
%N In the sequence of prime numbers, replace all the '4' digits with '2' and vice versa.
%H Vincenzo Librandi, <a href="/A171021/b171021.txt">Table of n, a(n) for n = 1..1000</a>
%t FromDigits[IntegerDigits[#]/.{4->p, 2->q}/.{p->2, q->4}]&/@Prime[Range[100]] (* _Vincenzo Librandi_, Apr 07 2013 *)
%o (PARI) a(n)=my(v=[0,1,4,3,2,5,6,7,8,9]);subst(Pol(apply(k->v[k+1], digits(prime(n)))),'x,10) \\ _Charles R Greathouse IV_, Jul 16 2013
%K nonn,base,easy
%O 1,1
%A _N. J. A. Sloane_ and _Vincenzo Librandi_, Sep 04 2010
|