OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
FORMULA
k such that A008904(k) = binomial(2k, k) reduced (mod 10).
EXAMPLE
12! = 479001600, binomial(24,12) = 2704156, and the last nonzero digit of 12! is the same as the last digit of binomial(24,12), hence 12 is in the sequence.
MATHEMATICA
Select[Range[1500], Mod[#!/10^IntegerExponent[#!, 10], 10]==Mod[Binomial[2 #, #], 10]&] (* Harvey P. Dale, Sep 13 2022 *)
PROG
(Python)
from math import comb
from functools import reduce
from itertools import count, zip_longest, islice
from sympy.ntheory.factor_ import digits
from sympy.ntheory.modular import crt
def A073095_gen(startvalue=2): # generator of terms >= startvalue
for n in count(max(startvalue, 2)):
s, s2 = digits(n, 5)[-1:0:-1], digits(n<<1, 5)[-1:0:-1]
if reduce(lambda x, y:x*y%10, (((6, 2, 4, 8, 6, 2, 4, 8, 2, 4, 8, 6, 6, 2, 4, 8, 4, 8, 6, 2)[(a<<2)|(i*a&3)] if i*a else (1, 1, 2, 6, 4)[a]) for i, a in enumerate(s)), 6)==crt([2, 5], [0, reduce(lambda x, y:x*y%5, (comb(a, b) for a, b in zip_longest(s2, s, fillvalue=0)))])[0]:
yield n
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Benoit Cloitre, Aug 18 2002
STATUS
approved