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”).

A222232
In the number n, replace all (decimal) digits '2' with '8' and vice versa.
1
0, 1, 8, 3, 4, 5, 6, 7, 2, 9, 10, 11, 18, 13, 14, 15, 16, 17, 12, 19, 80, 81, 88, 83, 84, 85, 86, 87, 82, 89, 30, 31, 38, 33, 34, 35, 36, 37, 32, 39, 40, 41, 48, 43, 44, 45, 46, 47, 42, 49, 50, 51, 58, 53, 54, 55, 56, 57, 52, 59, 60, 61, 68, 63, 64, 65, 66, 67, 62, 69
OFFSET
0,3
COMMENTS
The map which is applied to primes in A171043.
LINKS
MATHEMATICA
a[n_]:= IntegerDigits[n]/.{2->8, 8->2} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 30 2013 *)
PROG
(PARI) A222232(n, d=[0, 1, 8, 3, 4, 5, 6, 7, 2, 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)
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Feb 12 2013
STATUS
approved