login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A175770
In the sequence of prime numbers, replace all the '3' digits with '1' and vice versa.
47
2, 1, 5, 7, 33, 31, 37, 39, 21, 29, 13, 17, 43, 41, 47, 51, 59, 63, 67, 73, 71, 79, 81, 89, 97, 303, 301, 307, 309, 331, 327, 313, 317, 319, 349, 353, 357, 361, 367, 371, 379, 383, 393, 391, 397, 399, 233, 221, 227, 229, 211, 219, 243, 253, 257, 261, 269, 273, 277
OFFSET
1,1
LINKS
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
Cf. A000040 (the prime numbers), A171013-A171016, A171018-A171057.
Sequence in context: A088014 A193662 A279508 * A268950 A141507 A193603
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