login
A196147
Bits obtained using Pi and e's digits after the decimal: if, the corresponding digits' parities (cf. even vs. odd) are the same, output is 0; otherwise, output is 1.
1
0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1
OFFSET
1
EXAMPLE
For a(1): 1. digit of Pi (after decimal) = 1, 1. digit of e (after decimal) = 7, since parities are the same, a(1) = 0.
For a(2): 2. digit of Pi (after decimal) = 4, 2. digit of e (after decimal) = 1, since parities are not the same, a(2) = 1.
For a(3): 3. digit of Pi (after decimal) = 1, 3. digit of e (after decimal) = 8, since parities are not the same, a(3) = 1.
MAPLE
Digits := 120 ;
A196147 := proc(n)
ap := floor(10^n*Pi) mod 10 ;
ep := floor(10^n*exp(1)) mod 10 ;
if (ap mod 2) = (ep mod 2) then
0;
else
1;
end if;
end proc: # R. J. Mathar, Sep 28 2011
MATHEMATICA
f[n_]:=Mod[RealDigits[N[n, 200]][[1]], 2]; Abs[f[Pi-3]-f[E-2]] (* Zak Seidov, Sep 29 2011 *)
CROSSREFS
KEYWORD
nonn,less,base
AUTHOR
Umut Uludag, Sep 28 2011
STATUS
approved