Using a range in Symbolics.jl

Registering this function is fine. You just need to use the right syntax.

@variables a b
sumsq(a, b) = sum(l -> l^2, a:b)
@register_symbolic sumsq(a,b)