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.

A109631 Smallest number m such that n divides (10's complement factorial of m).

This page as a plain text file.
%I A109631 #8 Aug 09 2025 05:02:28
%S A109631 1,2,1,2,5,2,3,2,1,5,12,2,22,3,5,4,15,2,24,5,3,12,31,2,10,22,4,3,13,5,
%T A109631 38,6,12,15,5,2,26,24,22,5,18,3,14,12,5,31,53,4,16,10,15,22,47,4,12,3,
%U A109631 24,13,41,5,39,38,3,6,22,12,33,15,31,5,29,2,27,26
%N A109631 Smallest number m such that n divides (10's complement factorial of m).
%C A109631 Are 374 and 2057 the only n such that a(n) = a(n+1)?
%H A109631 Jinyuan Wang, <a href="/A109631/b109631.txt">Table of n, a(n) for n = 1..10000</a>
%e A109631 a(7)=3 because 7 divides (10-3)*(10-2)*(10-1) and 7 does not divide (10's complement factorial of k) for k < 3.
%o A109631 (PARI) g(p, e) = my(t=0); for(i=logint(p, 10), oo, forstep(j=10^i+(9*10^i)%p, 10^(i+1)-1, p, if(e<=t+=valuation(10^(i+1)-j, p), return(j))));
%o A109631 a(n) = my(m=1); foreach(factor(n)~, f, m=max(m, g(f[1], f[2]))); m; \\ _Jinyuan Wang_, Aug 09 2025
%Y A109631 Cf. A002034, A109640, A110396.
%K A109631 nonn,base
%O A109631 1,2
%A A109631 _Jason Earls_, Aug 03 2005