A228191 a(n) is the smallest number m such that the m-th triangular number ends in n zeros.
4, 24, 624, 9375, 90624, 890624, 7109375, 12890624, 212890624, 1787109375, 81787109375, 81787109375, 81787109375, 59918212890624, 259918212890624, 3740081787109375, 56259918212890624, 256259918212890624, 7743740081787109375, 7743740081787109375
Offset: 1
Examples
a(2)=24 because 24 is the smallest number such that 24th triangular number i.e. 300 ends in 2 '0's.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..1000 (terms 1..100 from Giovanni Resta)
Programs
-
Mathematica
a = {}; m = 1; Do[b = n*(n + 1)/2; If[Mod[b, 10^m] == 0, m = m + 1; AppendTo[a, n]], {n, 1, 1000000000}]; a sol[k_, u_] := Block[{x}, Min[x /. List@ToRules[Reduce[Mod[x + u, 2*2^k] == 0 && Mod[x + 1 - u, 5^k] == 0 && x > 0, {x}, Integers] /. C[1] -> 0]]]; a[n_] := Min[sol[n, 0], sol[n, 1]]; a /@ Range[20] (* Giovanni Resta, Aug 15 2013 *)
-
Python
from sympy.ntheory.modular import crt def A228191(n): return int(min(crt(m:=(1<<(n+1),5**n),(0,-1))[0], crt(m,(-1,0))[0])) # Chai Wah Wu, Jul 25 2022
Extensions
a(10)-a(20) from Giovanni Resta, Aug 15 2013
Comments