login
A228188
Smallest triangular number divisible by 10^n.
2
10, 300, 195000, 43950000, 4106400000, 396606000000, 25271610000000, 83084100000000, 22661209000000000, 1596879960000000000, 3344565630000000000000, 3344565630000000000000, 3344565630000000000000, 1795096118003100000000000000, 33778738696128000000000000000
OFFSET
1,1
LINKS
FORMULA
a(n) = A228191(n)*(A228191(n)+1)/2. - Chai Wah Wu, Jul 25 2022
EXAMPLE
a(2)=300 because 300 is the smallest triangular number divisible by 10^2.
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
PROG
(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
CROSSREFS
Sequence in context: A221953 A293963 A152165 * A041425 A217505 A222972
KEYWORD
nonn,base
AUTHOR
Shyam Sunder Gupta, Aug 15 2013
STATUS
approved