OFFSET
1,1
COMMENTS
See a comment in A093137.
LINKS
Colin Barker, Table of n, a(n) for n = 1..333
Index entries for linear recurrences with constant coefficients, signature (1111,-112110,1111000,-1000000).
FORMULA
From Colin Barker, Feb 08 2017: (Start)
G.f.: x*(407 - 112110*x + 1815000*x^2 - 2000000*x^3) / ((1 - x)*(1 - 10*x)*(1 - 100*x)*(1 - 1000*x)).
a(n) = (1 + 2^(1+n)*5^n + 2^(1+2*n)*25^n + 1000^n) / 3.
a(n) = 1111*a(n-1) - 112110*a(n-2) + 1111000*a(n-3) - 1000000*a(n-4) for n>4. (End)
EXAMPLE
Curious cubic identities: 407 = 4^3 + 0^3 + 7^3, 340067 = 34^3 + (00)^3 + 67^3, 334000677 = 334^3 + (000)^3 + 677^3, ...
MATHEMATICA
Table[FromDigits@ Join[ReplacePart[ConstantArray[3, n], -1 -> 4], ConstantArray[0, n], ReplacePart[ConstantArray[6, n], -1 -> 7]], {n, 12}] (* Michael De Vlieger, Feb 08 2017 *)
LinearRecurrence[{1111, -112110, 1111000, -1000000}, {407, 340067, 334000667, 333400006667}, 20] (* Harvey P. Dale, May 10 2018 *)
PROG
(PARI) Vec(x*(407 - 112110*x + 1815000*x^2 - 2000000*x^3) / ((1 - x)*(1 - 10*x)*(1 - 100*x)*(1 - 1000*x)) + O(x^30)) \\ Colin Barker, Feb 08 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Feb 08 2017
STATUS
approved