login
A222237
In the number n, replace all (decimal) digits '3' with '7' and vice versa.
1
0, 1, 2, 7, 4, 5, 6, 3, 8, 9, 10, 11, 12, 17, 14, 15, 16, 13, 18, 19, 20, 21, 22, 27, 24, 25, 26, 23, 28, 29, 70, 71, 72, 77, 74, 75, 76, 73, 78, 79, 40, 41, 42, 47, 44, 45, 46, 43, 48, 49, 50, 51, 52, 57, 54, 55, 56, 53, 58, 59, 60, 61, 62, 67, 64, 65, 66, 63, 68, 69, 30, 31, 32, 37, 34, 35
OFFSET
0,3
COMMENTS
The map which is applied to primes in A171037.
LINKS
MATHEMATICA
a[n_]:= IntegerDigits[n]/.{3->7, 7->3} // FromDigits; Table[a[n], {n, 0, 80}] (* Vincenzo Librandi, Jul 30 2013 *)
PROG
(PARI) A222237(n, d=[0, 1, 2, 7, 4, 5, 6, 3, 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 13 2013
STATUS
approved