cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A208279 Central terms of Pascal's triangle mod 10 (A008975).

This page as a plain text file.
%I A208279 #27 Dec 09 2023 18:12:42
%S A208279 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,
%T A208279 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,
%U A208279 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
%N A208279 Central terms of Pascal's triangle mod 10 (A008975).
%C A208279 From _Chai Wah Wu_, Dec 08 2023: (Start)
%C A208279 Last digit of central binomial coefficient binomial(2n,n) in base 10.
%C A208279 A000984 mod 10.
%C A208279 A073095 are numbers n such that a(n) = A008904(n).
%C A208279 a(n) is even for n>0. (End)
%C A208279 From _Robert Israel_, Dec 08 2023: (Start)
%C A208279 If at least one base-5 digit of n is 3 or 4, then a(n) = 0.
%C A208279 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)
%H A208279 Reinhard Zumkeller, <a href="/A208279/b208279.txt">Table of n, a(n) for n = 0..1000</a>
%F A208279 a(n) = A008975(2*n,n) = binomial(2n,n) mod 10.
%p A208279 f:= proc(n) local A,v;
%p A208279    A:= convert(n,base,5);
%p A208279    if select(`>=`,A,3) <> [] then return 0 fi;
%p A208279    v:= numboccur(1,A);
%p A208279    if v > 0 then 2^v mod 10
%p A208279    else 6
%p A208279    fi
%p A208279 end proc:
%p A208279 f(0):= 1:
%p A208279 map(f, [$0..200]); # _Robert Israel_, Dec 08 2023
%t A208279 Array[Mod[Binomial[2#,#],10]&,100,0] (* _Paolo Xausa_, Dec 09 2023 *)
%o A208279 (Haskell)
%o A208279 a208279 n = a008975 (2*n) n
%o A208279 (Python)
%o A208279 from sympy.ntheory.factor_ import digits
%o A208279 def A208279(n):
%o A208279     if n == 0: return 1
%o A208279     s = digits(n,5)[1:]
%o A208279     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
%Y A208279 Cf. A000984, A008904, A008975, A073095.
%K A208279 nonn,base
%O A208279 0,2
%A A208279 _Reinhard Zumkeller_, Feb 25 2012