login
A135262
a(3n)=10^n. a(3n+1)=4*10^n. a(3n+2)=7*10^n.
1
1, 4, 7, 10, 40, 70, 100, 400, 700, 1000, 4000, 7000, 10000, 40000, 70000, 100000, 400000, 700000, 1000000, 4000000, 7000000, 10000000, 40000000, 70000000, 100000000, 400000000, 700000000, 1000000000, 4000000000, 7000000000
OFFSET
0,2
FORMULA
From R. J. Mathar, Jul 22 2008: (Start)
a(n) = 10*a(n-3).
O.g.f.: (1+4*x+7*x^2)/(1-10*x^3). (End)
MAPLE
seq(coeff(series((1+4*x+7*x^2)/(1-10*x^3), x, n+1), x, n), n = 0..30); # G. C. Greubel, Nov 21 2019
MATHEMATICA
Flatten[Table[FromDigits[PadRight[{i}, n, 0]], {n, 10}, {i, {1, 4, 7}}]] (* or *) LinearRecurrence[{0, 0, 10}, {1, 4, 7}, 30] (* Harvey P. Dale, Jun 06 2015 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1+4*x+7*x^2)/(1-10*x^3)) \\ G. C. Greubel, Nov 21 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1+4*x+7*x^2)/(1-10*x^3) )); // G. C. Greubel, Nov 21 2019
(Sage)
def A135262_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1+4*x+7*x^2)/(1-10*x^3)).list()
A135262_list(30) # G. C. Greubel, Nov 21 2019
(GAP) a:=[1, 4, 7];; for n in [4..30] do a[n]:=10*a[n-3]; od; a; # G. C. Greubel, Nov 21 2019
CROSSREFS
Sequence in context: A371458 A088405 A100591 * A061515 A071084 A175833
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Dec 01 2007
EXTENSIONS
Name edited by R. J. Mathar, Jul 22 2008
STATUS
approved