Computing integer sequences via integrals

Georgi Guninski <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <CAGUWgD-LuV7t1v3cf2rFc+D_d-unmtP6OMqoQSG+oEN9HdUDOQ@mail.gmail.com>
I am trying to compute integer sequences via closed
forms of definite integrals, but probably this is impossible.

The question is: which integer sequences can be computed
by integrals?

Partial results:

Trying to "discretize" the reals, we are using floor()
and the area of the definite integrals.

For a start consider the plot of floor(x).
? ploth(x=1,10,floor(x))

The area is the union of rectangles and for integer
bounds the area is integer.

sagemath computes the following indefinite integrals:
sage: integrate(floor(x),x)
1/2*(2*x - floor(x) - 1)*floor(x)
sage: integrate(floor(x)^2,x)
x*floor(x)^2

The area for floor(x) and the sum(i=1,N-1,x) appear to be computed correctly:
sage: I1=integrate(floor(x),x)
sage: N=13;[I1(x=N)-I1(x=1)-N*(N-1)/2]
[0]

The area for floor(x)^2 doesn't work for me, why?

floor() might not be elementary function, but there is closed
form for it using exp() and log(), taking the principal
branch of the logarithm:

? floor1(x)=x - 1/2*I*log(-exp(-2*I*Pi*x))/Pi - 1/2
%12 = (x)->x-1/2*I*log(-exp(-2*I*Pi*x))/Pi-1/2
? floor1(13.1)
%13 = 13.000000000000000000000000000000000000 + 0.E-39*I
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.