A228188 Smallest triangular number divisible by 10^n.
10, 300, 195000, 43950000, 4106400000, 396606000000, 25271610000000, 83084100000000, 22661209000000000, 1596879960000000000, 3344565630000000000000, 3344565630000000000000, 3344565630000000000000, 1795096118003100000000000000, 33778738696128000000000000000
Offset: 1
Examples
a(2)=300 because 300 is the smallest triangular number divisible by 10^2.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..501
Programs
-
Mathematica
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]]; p = a /@ Range[15]; p*(p+1)/2
-
Python
from sympy.ntheory.modular import crt def A228188(n): return (k:=int(min(crt(m:=(1<<(n+1),5**n),(0,-1))[0], crt(m,(-1,0))[0])))*(k+1)>>1 # Chai Wah Wu, Jul 25 2022