OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..501
FORMULA
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
KEYWORD
nonn,base
AUTHOR
Shyam Sunder Gupta, Aug 15 2013
STATUS
approved