OFFSET
0,3
COMMENTS
It appears that a(n) is the number of (n+11)-digit fixed points under the base-7 Kaprekar map A165071 (see A165075 for the list of fixed points). - Joseph Myers, Sep 04 2009
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 225
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1,0,0,0,0,1,0,-2,0,1).
FORMULA
G.f.: 1/((1-x^2)^2*(1-x^9)).
a(n) = 2*a(n-2) - a(n-4) + a(n-9) - 2*a(n-11) + a(n-13). - R. J. Mathar, Dec 18 2014
MAPLE
1/((1-x^2)^2*(1-x^9)); seq(coeff(series(%, x, n+1), x, n), n = 0..80); # modified by G. C. Greubel, Sep 09 2019
MATHEMATICA
LinearRecurrence[{0, 2, 0, -1, 0, 0, 0, 0, 1, 0, -2, 0, 1}, {1, 0, 2, 0, 3, 0, 4, 0, 5, 1, 6, 2, 7}, 80] (* Ray Chandler, Jul 15 2015 *)
PROG
(PARI) my(x='x+O('x^80)); Vec(1/((1-x^2)^2*(1-x^9))) \\ G. C. Greubel, Sep 09 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 80); Coefficients(R!( 1/((1-x^2)^2*(1-x^9)) )); // G. C. Greubel, Sep 09 2019
(Sage)
def A008722_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 1/((1-x^2)^2*(1-x^9)) ).list()
A008722_list(80) # G. C. Greubel, Sep 09 2019
(GAP) a:=[1, 0, 2, 0, 3, 0, 4, 0, 5, 1, 6, 2, 7];; for n in [14..80] do a[n]:= 2*a[n-2] -a[n-4]+a[n-9]-2*a[n-11]+a[n-13]; od; a; # G. C. Greubel, Sep 09 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved