A004663 Powers of 3 written in base 9.
1, 3, 10, 30, 100, 300, 1000, 3000, 10000, 30000, 100000, 300000, 1000000, 3000000, 10000000, 30000000, 100000000, 300000000, 1000000000, 3000000000, 10000000000, 30000000000, 100000000000, 300000000000, 1000000000000, 3000000000000, 10000000000000, 30000000000000
Offset: 0
Links
- Robert Israel, Table of n, a(n) for n = 0..1997
- Index entries for linear recurrences with constant coefficients, signature (0,10).
Crossrefs
Programs
-
Maple
seq(op([10^i,3*10^i]),i=0..100); # Robert Israel, Jun 25 2018
-
Mathematica
Table[FromDigits[IntegerDigits[3^n, 9]], {n, 0, 100}] (* G. C. Greubel, Oct 12 2018 *)
-
PARI
a(n)=3^bittest(n,0)*10^(n\2) \\ M. F. Hasler, Jun 25 2018
Formula
From Paul Barry, Jul 14 2004: (Start)
G.f.: (1 + 3*x)/(1 - 10*x^2);
a(n) = 2*a(n-1) + 3*a(n-2) + 10^floor((n-2)/2);
a(n) = Sum_{k=0..floor(n/2)} binomial(floor(n/2), k)*3^(n-2*k). (End)
a(n) = 3*a(n-1) + ((1 + (-1)^n)/2)*a(n-2) with a(0)=1, a(1)=3. - Taras Goy, Mar 20 2019
E.g.f.: cosh(sqrt(10)*x) + 3*sinh(sqrt(10)*x)/sqrt(10). - Stefano Spezia, Mar 31 2023