login
A276389
Numbers n such that n! ends in the same number of 0's in both base 10 and base 16.
1
0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 20, 21, 22, 23, 28, 29, 32, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 65, 70, 71, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 90, 91, 95, 100, 101
OFFSET
1,3
REFERENCES
Bill Gosper, Posting to Math Fun List, Sep 03 2016
MATHEMATICA
esn0Q[n_]:=Module[{z10=Split[IntegerDigits[n!]][[-1]], z16=Split[IntegerDigits[n!, 16]][[-1]]}, MemberQ[z10, 0]&&MemberQ[z16, 0]&&Length[z10]==Length[z16]]; Join[ {0, 1, 2, 3, 4}, Select[Range[0, 120], esn0Q]] (* Harvey P. Dale, Oct 03 2022 *)
PROG
(Python)
A276389_list, m = [0], 1
for n in range(1, 10**3):
m *= n
s, h = str(m), hex(m)
if not len(s)-len(s.rstrip('0'))+len(h.rstrip('0'))-len(h):
A276389_list.append(n) # Chai Wah Wu, Sep 04 2016
CROSSREFS
Sequence in context: A132329 A230313 A052413 * A302058 A183302 A323733
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 04 2016
STATUS
approved