OFFSET
1,1
COMMENTS
Indeed: a(n) is the sum of 2*10^(2n-1)+1 and the palindrome built by repetition of the digits 2 and 5 such that it recalls the number 525.
Let x = 10^n, y = floor(x/3), and B(n) = Sum_{k<=10^n} binomial(floor(k/3),2).
6*B(n) differs from a(n) by (x*(x+1)*(1+(2*x+1)/3))/4-3*y*(3*y+1).
LINKS
R. J. Cano, Table of n, a(n) for n = 1..49
Index entries for linear recurrences with constant coefficients, signature (1111,-112110,1111000,-1000000).
FORMULA
a(n) = Sum_{k<=10^n} A181482(k).
From Colin Barker, Oct 31 2015: (Start)
a(n) = 1111*a(n-1)-112110*a(n-2)+1111000*a(n-3)-1000000*a(n-4) for n>4.
G.f.: -4*x*(250000*x^3-157875*x^2+6795*x-19) / ((x-1)*(10*x-1)*(100*x-1)*(1000*x-1)).
(End)
EXAMPLE
When n=1, 10^n is 10. By looking at A181482 for its first 10 terms we have the sum: 1+3+0+4+9+3+10+18+9+19, then a(1)=76.
PROG
(PARI) repdigit(n, k)=(n!=0)*floor((10/9)*n*10^(k-1));
palindrome(n)=repdigit(5, n)*10^(2*n-1)+repdigit(2, n-1)*10^n+repdigit(5, n);
a(n)=palindrome(n)+(1+2*10^(2*n-1));
(PARI) Vec(-4*x*(250000*x^3-157875*x^2+6795*x-19)/((x-1)*(10*x-1)*(100*x-1)*(1000*x-1)) + O(x^100)) \\ Colin Barker, Oct 31 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. J. Cano, Mar 07 2013
STATUS
approved