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.

Showing 1-10 of 45 results. Next

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

Original entry on oeis.org

2, 3, 5, 7, 0, 3, 7, 9, 23, 29, 30, 37, 40, 43, 47, 53, 59, 60, 67, 70, 73, 79, 83, 89, 97, 10, 13, 17, 19, 3, 27, 30, 37, 39, 49, 50, 57, 63, 67, 73, 79, 80, 90, 93, 97, 99, 200, 223, 227, 229, 233, 239, 240, 250, 257, 263, 269, 270, 277, 280, 283, 293, 317
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    FromDigits[IntegerDigits[#]/.{1->p,0->q}/.{p->0,q->1}]&/@Prime[Range[100]] (* Vincenzo Librandi, Jul 06 2012 *)
  • PARI
    a(n)=my(v=[1,0,2,3,4,5,6,7,8,9]);apply(k->v[k+1],digits(prime(n))) \\ Charles R Greathouse IV, Jul 16 2013

Formula

a(n) = A222210(A000040(n)). - M. F. Hasler, Feb 13 2013

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

Original entry on oeis.org

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

Views

Author

Vincenzo Librandi, Sep 01 2010

Keywords

Crossrefs

Cf. A000040 (the prime numbers), A171013-A171016, A171018-A171057.

Programs

  • Mathematica
    FromDigits[IntegerDigits[#]/.{3->p, 1->q}/.{p->1, q->3}]&/@Prime[Range[60]] (* Vincenzo Librandi, Jul 29 2013 *)
  • 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

Extensions

Corrected by D. S. McNeil and R. J. Mathar, Sep 02 2010

A222254 In the number n, replace all (decimal) digits '8' with '9' and vice versa.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 8, 10, 11, 12, 13, 14, 15, 16, 17, 19, 18, 20, 21, 22, 23, 24, 25, 26, 27, 29, 28, 30, 31, 32, 33, 34, 35, 36, 37, 39, 38, 40, 41, 42, 43, 44, 45, 46, 47, 49, 48, 50, 51, 52, 53, 54, 55, 56, 57, 59, 58, 60, 61, 62, 63, 64, 65, 66, 67, 69, 68, 70, 71, 72, 73, 74, 75
Offset: 0

Views

Author

M. F. Hasler, Feb 13 2013

Keywords

Comments

The map which is applied to primes in A171057.

Crossrefs

Programs

  • Mathematica
    a[n_]:= IntegerDigits[n]/.{8->9, 9->8}//FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 29 2013 *)
  • PARI
    A222254(n,d=[0, 1, 2, 3, 4, 5, 6, 7, 9, 8])=sum(i=1,#n=digits(n),d[n[i]+1]*10^(#n-i),!n*d[1]) \\ N.B.: digits(0)=[] in PARI (v.2.6)

A035043 Replace any decimal digit '1' with '2' and vice versa.

Original entry on oeis.org

0, 2, 1, 3, 4, 5, 6, 7, 8, 9, 20, 22, 21, 23, 24, 25, 26, 27, 28, 29, 10, 12, 11, 13, 14, 15, 16, 17, 18, 19, 30, 32, 31, 33, 34, 35, 36, 37, 38, 39, 40, 42, 41, 43, 44, 45, 46, 47, 48, 49, 50, 52, 51, 53, 54, 55, 56, 57, 58, 59, 60, 62, 61, 63, 64, 65, 66, 67, 68
Offset: 0

Views

Author

Keywords

Comments

The map which is applied to primes in A171015. - M. F. Hasler, Feb 12 2013

Crossrefs

Programs

  • Mathematica
    a[n_]:= IntegerDigits[n]/.{1->2, 2->1} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 29 2013 *)
  • PARI
    A035043(n, d=[0, 2, 1, 3, 4, 5, 6, 7, 8, 9])=sum(i=1, #n=digits(n), d[n[i]+1]*10^(#n-i)) \\ gives correct value for n=0 iff d[1]=0, since digits(0)=[] in PARI (v.2.6) M. F. Hasler, Feb 12 2013

Extensions

Definition rephrased by M. F. Hasler, Oct 26 2013

A222235 In the number n, replace all (decimal) digits '3' with '5' and vice versa.

Original entry on oeis.org

0, 1, 2, 5, 4, 3, 6, 7, 8, 9, 10, 11, 12, 15, 14, 13, 16, 17, 18, 19, 20, 21, 22, 25, 24, 23, 26, 27, 28, 29, 50, 51, 52, 55, 54, 53, 56, 57, 58, 59, 40, 41, 42, 45, 44, 43, 46, 47, 48, 49, 30, 31, 32, 35, 34, 33, 36, 37, 38, 39, 60, 61, 62, 65, 64, 63, 66, 67, 68, 69, 70, 71, 72, 75, 74, 73
Offset: 0

Views

Author

M. F. Hasler, Feb 12 2013

Keywords

Comments

The map which is applied to primes in A171026.

Crossrefs

Programs

  • Mathematica
    a[n_]:= IntegerDigits[n]/.{3->5, 5->3} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 30 2013 *)
  • PARI
    A222235(n,d=[0,1,2,5,4,3,6,7,8,9])={sum(i=1,#n=digits(n),d[n[i]+1]*10^(#n-i),!n*d[1])} \\ N.B.: digits(0)=[] in PARI (v.2.6)

A222251 In the number n, replace all (decimal) digits '6' with '9' and vice versa.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 9, 7, 8, 6, 10, 11, 12, 13, 14, 15, 19, 17, 18, 16, 20, 21, 22, 23, 24, 25, 29, 27, 28, 26, 30, 31, 32, 33, 34, 35, 39, 37, 38, 36, 40, 41, 42, 43, 44, 45, 49, 47, 48, 46, 50, 51, 52, 53, 54, 55, 59, 57, 58, 56, 90, 91, 92, 93, 94, 95, 99, 97, 98, 96, 70, 71, 72, 73, 74, 75
Offset: 0

Views

Author

M. F. Hasler, Feb 13 2013

Keywords

Comments

The map which is applied to primes in A171055.

Crossrefs

Programs

  • Mathematica
    a[n_]:= IntegerDigits[n]/.{6->9, 9->6} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 31 2013 *)
  • PARI
    A222251(n,d=[0, 1, 2, 3, 4, 5, 9, 7, 8, 6])=sum(i=1,#n=digits(n),d[n[i]+1]*10^(#n-i),!n*d[1]) \\ N.B.: digits(0)=[] in PARI (v.2.6)
    
  • Python
    def flp69(s): return s.replace("6", "-").replace("9", "6").replace("-", "9")
    def aupto(lim): return [int(flp69(s)) for s in map(str, range(lim+1))]
    print(aupto(75)) # Michael S. Branicky, Sep 07 2021

A035044 Exchange 2 and 3.

Original entry on oeis.org

0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 13, 12, 14, 15, 16, 17, 18, 19, 30, 31, 33, 32, 34, 35, 36, 37, 38, 39, 20, 21, 23, 22, 24, 25, 26, 27, 28, 29, 40, 41, 43, 42, 44, 45, 46, 47, 48, 49, 50, 51, 53, 52, 54, 55, 56, 57, 58, 59, 60, 61, 63, 62, 64, 65, 66, 67, 68
Offset: 0

Views

Author

Keywords

Comments

The map which is applied to primes in A171018. - M. F. Hasler, Feb 12 2013
Rearrangement of A001477 (the nonnegative integers). - Zak Seidov, Feb 15 2013

Crossrefs

Programs

  • Mathematica
    FromDigits[IntegerDigits[#]/.{2->3,3->2}]&/@Range[0,68] (* Zak Seidov, Feb 15 2013 *)
  • PARI
    A222227(n, d=[0, 1, 3, 2, 4, 5, 6, 7, 8, 9])=sum(i=1, #n=digits(n), d[n[i]+1]*10^(#n-i)) \\ gives correct value for n=0 iff d[1]=0, since digits(0)=[] in PARI (v.2.6), M. F. Hasler, Feb 12 2013

A180518 Primes that become a different prime under the mapping 0 <=> 3.

Original entry on oeis.org

37, 101, 107, 109, 131, 137, 139, 307, 311, 317, 337, 347, 359, 367, 379, 389, 397, 401, 409, 431, 439, 601, 631, 709, 739, 809, 839, 907, 937, 1019, 1021, 1031, 1061, 1201, 1231, 1301, 1319, 1321, 1361, 1409, 1439, 1607, 1637, 1801, 1831, 1901, 1931, 2011
Offset: 1

Views

Author

Zak Seidov and Robert G. Wilson v, Sep 09 2010

Keywords

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{id = IntegerDigits@n}, (MemberQ[id, 0] || MemberQ[id, 3]) && PrimeQ[ FromDigits[ id /. {0 -> 3, 3 -> 0}] ]]; Select[ Prime@ Range@ 350, fQ]
    dp03Q[n_]:=Module[{c=FromDigits[IntegerDigits[n]/.{0->3,3->0}]},c!=n && PrimeQ[ c]]; Select[Prime[Range[350]],dp03Q] (* Harvey P. Dale, Oct 16 2016 *)

A222212 In the number n, replace all (decimal) digits '0' with '3' and vice versa.

Original entry on oeis.org

3, 1, 2, 0, 4, 5, 6, 7, 8, 9, 13, 11, 12, 10, 14, 15, 16, 17, 18, 19, 23, 21, 22, 20, 24, 25, 26, 27, 28, 29, 3, 1, 2, 0, 4, 5, 6, 7, 8, 9, 43, 41, 42, 40, 44, 45, 46, 47, 48, 49, 53, 51, 52, 50, 54, 55, 56, 57, 58, 59, 63, 61, 62, 60, 64, 65, 66, 67, 68, 69, 73, 71, 72, 70, 74, 75
Offset: 0

Views

Author

M. F. Hasler, Feb 12 2013

Keywords

Comments

The map which is applied to primes in A171016.

Crossrefs

Programs

  • Mathematica
    a[n_]:= IntegerDigits[n]/.{0->3, 3->0} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 29 2013 *)
  • PARI
    A222212(n,d=[3,1,2,0,4,5,6,7,8,9])=sum(i=1,#n=digits(n),d[n[i]+1]*10^(#n-i))+!n*d[1] \\ N.B.: PARI's digits() function returns [] for 0.
    
  • PARI
    a(n)=if(n, fromdigits(apply(d->if(d>3,d,[3,1,2,0][d+1]), digits(n))), 3) \\ Charles R Greathouse IV, Sep 27 2015

A222214 In the number n, replace all (decimal) digits '0' with '5' and vice versa.

Original entry on oeis.org

5, 1, 2, 3, 4, 0, 6, 7, 8, 9, 15, 11, 12, 13, 14, 10, 16, 17, 18, 19, 25, 21, 22, 23, 24, 20, 26, 27, 28, 29, 35, 31, 32, 33, 34, 30, 36, 37, 38, 39, 45, 41, 42, 43, 44, 40, 46, 47, 48, 49, 5, 1, 2, 3, 4, 0, 6, 7, 8, 9, 65, 61, 62, 63, 64, 60, 66, 67, 68, 69, 75, 71, 72, 73, 74, 70
Offset: 0

Views

Author

M. F. Hasler, Feb 12 2013

Keywords

Comments

The map which is applied to primes in A171023.

Crossrefs

Programs

  • Mathematica
    a[n_]:= IntegerDigits[n]/.{0->5, 5->0} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 29 2013 *)
  • PARI
    A222214(n,d=[5,1,2,3,4,0,6,7,8,9])={sum(i=1,#n=digits(n),d[n[i]+1]*10^(#n-i),!n*d[1])} \\ N.B.: digits(0)=[] in PARI (v.2.6)
Showing 1-10 of 45 results. Next