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).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 25 2012

Keywords

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)

Crossrefs

Programs

  • Haskell
    a208279 n = a008975 (2*n) n
    
  • 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 *)
  • 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

Formula

a(n) = A008975(2*n,n) = binomial(2n,n) mod 10.