I have a power series idea that is

A) a real-valued vector of length n that originates from another loop and may be quite long, but let's suppose it is simple, for example

a<-1:10

and

B) a genuine facility, such as

c<-3

I want to explain the polynomial (in my example)

a[1]+a[2]*(x-3)+ a[3]*(x-3)^2+ .... + a[10]*(x-3)^9

as a result. Unfortunately

1) I am unable to use the function as.polynomial(a) since, as far as I can see, it only allows centre 0;

2) The list of coefficients can be too extensive to manually calculate.

3) In the future, I might require a multivariable version.

I'd prefer to define this "finite power series" using a loop, but I'm not sure how to achieve it.