cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A175770 In the sequence of prime numbers, replace all the '3' digits with '1' and vice versa.

This page as a plain text file.
%I A175770 #15 Feb 02 2021 02:09:13
%S A175770 2,1,5,7,33,31,37,39,21,29,13,17,43,41,47,51,59,63,67,73,71,79,81,89,
%T A175770 97,303,301,307,309,331,327,313,317,319,349,353,357,361,367,371,379,
%U A175770 383,393,391,397,399,233,221,227,229,211,219,243,253,257,261,269,273,277
%N A175770 In the sequence of prime numbers, replace all the '3' digits with '1' and vice versa.
%H A175770 Vincenzo Librandi, <a href="/A175770/b175770.txt">Table of n, a(n) for n = 1..1000</a>
%t A175770 FromDigits[IntegerDigits[#]/.{3->p, 1->q}/.{p->1, q->3}]&/@Prime[Range[60]] (* _Vincenzo Librandi_, Jul 29 2013 *)
%o A175770 (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
%o A175770 (Python)
%o A175770 from sympy import prime
%o A175770 def a(n):
%o A175770   return int(str(prime(n)).translate({ord('1'):ord('3'), ord('3'):ord('1')}))
%o A175770 print([a(n) for n in range(1, 60)]) # _Michael S. Branicky_, Feb 01 2021
%Y A175770 Cf. A000040 (the prime numbers), A171013-A171016, A171018-A171057.
%K A175770 nonn,base,easy
%O A175770 1,1
%A A175770 _Vincenzo Librandi_, Sep 01 2010
%E A175770 Corrected by _D. S. McNeil_ and _R. J. Mathar_, Sep 02 2010