login
A208279
Central terms of Pascal's triangle mod 10 (A008975).
3
1, 2, 6, 0, 0, 2, 4, 2, 0, 0, 6, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 2, 0, 0, 4, 8, 4, 0, 0, 2, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 2, 6, 0, 0, 2, 4, 2, 0, 0, 6, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
0,2
COMMENTS
From Chai Wah Wu, Dec 08 2023: (Start)
Last digit of central binomial coefficient binomial(2n,n) in base 10.
A000984 mod 10.
A073095 are numbers n such that a(n) = A008904(n).
a(n) is even for n>0. (End)
From Robert Israel, Dec 08 2023: (Start)
If at least one base-5 digit of n is 3 or 4, then a(n) = 0.
Otherwise, if k 1's occur in the base-5 expansion of n, then a(n) = 2^k (mod 10) if k > 0, or 6 if k = 0. (End)
LINKS
FORMULA
a(n) = A008975(2*n,n) = binomial(2n,n) mod 10.
MAPLE
f:= proc(n) local A, v;
A:= convert(n, base, 5);
if select(`>=`, A, 3) <> [] then return 0 fi;
v:= numboccur(1, A);
if v > 0 then 2^v mod 10
else 6
fi
end proc:
f(0):= 1:
map(f, [$0..200]); # Robert Israel, Dec 08 2023
MATHEMATICA
Array[Mod[Binomial[2#, #], 10]&, 100, 0] (* Paolo Xausa, Dec 09 2023 *)
PROG
(Haskell)
a208279 n = a008975 (2*n) n
(Python)
from sympy.ntheory.factor_ import digits
def A208279(n):
if n == 0: return 1
s = digits(n, 5)[1:]
return 0 if any(x>2 for x in s) else ((6, 2, 4, 8)[a&3] if (a:=s.count(1)) else 6) # Chai Wah Wu, Dec 08 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Feb 25 2012
STATUS
approved