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

Original entry on oeis.org

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, 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, 24, 13, 41, 5, 39, 38, 3, 6, 22, 12, 33, 15, 31, 5, 29, 2, 27, 26
Offset: 1

Views

Author

Jason Earls, Aug 03 2005

Keywords

Comments

Are 374 and 2057 the only n such that a(n) = a(n+1)?

Examples

			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.
		

Crossrefs

Programs

  • 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))));
    a(n) = my(m=1); foreach(factor(n)~, f, m=max(m, g(f[1], f[2]))); m; \\ Jinyuan Wang, Aug 09 2025