A222213 Replace all (decimal) digits '0' with '4' and vice versa.
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
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Programs
-
Mathematica
Table[FromDigits[IntegerDigits[n]/.{0->z,4->f}/.{z->4,f->0}],{n,0,80}] (* Harvey P. Dale, Feb 25 2013 *)
-
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.
Comments