OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MATHEMATICA
FromDigits[IntegerDigits[#]/.{3->p, 1->q}/.{p->1, q->3}]&/@Prime[Range[60]] (* Vincenzo Librandi, Jul 29 2013 *)
PROG
(PARI) a(n)=my(v=[0, 3, 2, 1, 4, 5, 6, 7, 8, 9]); apply(k->v[k+1], digits(prime(n))) \\ Charles R Greathouse IV, Jul 16 2013
(Python)
from sympy import prime
def a(n):
return int(str(prime(n)).translate({ord('1'):ord('3'), ord('3'):ord('1')}))
print([a(n) for n in range(1, 60)]) # Michael S. Branicky, Feb 01 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, Sep 01 2010
EXTENSIONS
Corrected by D. S. McNeil and R. J. Mathar, Sep 02 2010
STATUS
approved