login
Search: a222254 -id:a222254
     Sort: relevance | references | number | modified | created      Format: long | short | data
In the sequence of prime numbers, replace all digits '1' with '0' and vice versa.
+10
47
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,1
LINKS
FORMULA
a(n) = A222210(A000040(n)). - M. F. Hasler, Feb 13 2013
MATHEMATICA
FromDigits[IntegerDigits[#]/.{1->p, 0->q}/.{p->0, q->1}]&/@Prime[Range[100]] (* Vincenzo Librandi, Jul 06 2012 *)
PROG
(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
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved
Replace any decimal digit '1' with '2' and vice versa.
+10
2
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,2
COMMENTS
The map which is applied to primes in A171015. - M. F. Hasler, Feb 12 2013
LINKS
MATHEMATICA
a[n_]:= IntegerDigits[n]/.{1->2, 2->1} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 29 2013 *)
PROG
(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
KEYWORD
nonn,base,easy
EXTENSIONS
Definition rephrased by M. F. Hasler, Oct 26 2013
STATUS
approved
In the number n, replace all (decimal) digits '3' with '5' and vice versa.
+10
2
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,3
COMMENTS
The map which is applied to primes in A171026.
LINKS
MATHEMATICA
a[n_]:= IntegerDigits[n]/.{3->5, 5->3} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 30 2013 *)
PROG
(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)
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Feb 12 2013
STATUS
approved
In the number n, replace all (decimal) digits '6' with '9' and vice versa.
+10
2
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,3
COMMENTS
The map which is applied to primes in A171055.
LINKS
MATHEMATICA
a[n_]:= IntegerDigits[n]/.{6->9, 9->6} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 31 2013 *)
PROG
(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
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Feb 13 2013
STATUS
approved
Exchange 2 and 3.
+10
1
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,3
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
LINKS
MATHEMATICA
FromDigits[IntegerDigits[#]/.{2->3, 3->2}]&/@Range[0, 68] (* Zak Seidov, Feb 15 2013 *)
PROG
(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
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved
In the number n, replace all (decimal) digits '0' with '2' and vice versa.
+10
1
2, 1, 0, 3, 4, 5, 6, 7, 8, 9, 12, 11, 10, 13, 14, 15, 16, 17, 18, 19, 2, 1, 0, 3, 4, 5, 6, 7, 8, 9, 32, 31, 30, 33, 34, 35, 36, 37, 38, 39, 42, 41, 40, 43, 44, 45, 46, 47, 48, 49, 52, 51, 50, 53, 54, 55, 56, 57, 58, 59, 62, 61, 60, 63, 64, 65, 66, 67, 68, 69, 72, 71, 70, 73, 74, 75
OFFSET
0,1
COMMENTS
The map which is applied to primes in A171014.
Programs should omit leading '0' digits in the resulting terms. - Georg Fischer, Apr 06 2019
LINKS
MATHEMATICA
a[n_]:= IntegerDigits[n]/.{0->2, 2->0} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 29 2013 *)
PROG
(PARI) A222211(n, d=[2, 1, 0, 3, 4, 5, 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)
(Perl) print join(", ", map{tr/02/20/; $_+0}(0..75)); # Georg Fischer, Apr 06 2019
CROSSREFS
Cf. A222210-A222254 (other digit pairs), A171013-A171057, A175770 (in prime numbers).
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Feb 12 2013
STATUS
approved
In the number n, replace all (decimal) digits '0' with '3' and vice versa.
+10
1
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,1
COMMENTS
The map which is applied to primes in A171016.
LINKS
MATHEMATICA
a[n_]:= IntegerDigits[n]/.{0->3, 3->0} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 29 2013 *)
PROG
(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
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Feb 12 2013
STATUS
approved
Replace all (decimal) digits '0' with '4' and vice versa.
+10
1
4, 1, 2, 3, 0, 5, 6, 7, 8, 9, 14, 11, 12, 13, 10, 15, 16, 17, 18, 19, 24, 21, 22, 23, 20, 25, 26, 27, 28, 29, 34, 31, 32, 33, 30, 35, 36, 37, 38, 39, 4, 1, 2, 3, 0, 5, 6, 7, 8, 9, 54, 51, 52, 53, 50, 55, 56, 57, 58, 59, 64, 61, 62, 63, 60, 65, 66, 67, 68, 69, 74, 71, 72, 73, 70, 75
OFFSET
0,1
COMMENTS
The map which is applied to primes in A171019.
LINKS
MATHEMATICA
Table[FromDigits[IntegerDigits[n]/.{0->z, 4->f}/.{z->4, f->0}], {n, 0, 80}] (* Harvey P. Dale, Feb 25 2013 *)
PROG
(PARI) A222213(n, d=[4, 1, 2, 3, 0, 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.
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Feb 12 2013
STATUS
approved
In the number n, replace all (decimal) digits '0' with '5' and vice versa.
+10
1
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,1
COMMENTS
The map which is applied to primes in A171023.
LINKS
MATHEMATICA
a[n_]:= IntegerDigits[n]/.{0->5, 5->0} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 29 2013 *)
PROG
(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)
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Feb 12 2013
STATUS
approved
In the number n, replace all (decimal) digits '0' with '6' and vice versa.
+10
1
6, 1, 2, 3, 4, 5, 0, 7, 8, 9, 16, 11, 12, 13, 14, 15, 10, 17, 18, 19, 26, 21, 22, 23, 24, 25, 20, 27, 28, 29, 36, 31, 32, 33, 34, 35, 30, 37, 38, 39, 46, 41, 42, 43, 44, 45, 40, 47, 48, 49, 56, 51, 52, 53, 54, 55, 50, 57, 58, 59, 6, 1, 2, 3, 4, 5, 0, 7, 8, 9, 76, 71, 72, 73, 74, 75
OFFSET
0,1
COMMENTS
The map which is applied to primes in A171028.
LINKS
MATHEMATICA
a[n_]:= IntegerDigits[n]/.{0->6, 6->0} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 29 2013 *)
PROG
(PARI) A222215(n, d=[6, 1, 2, 3, 4, 5, 0, 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)
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Feb 12 2013
STATUS
approved

Search completed in 0.017 seconds