login
A004647
Powers of 2 written in base 8.
5
1, 2, 4, 10, 20, 40, 100, 200, 400, 1000, 2000, 4000, 10000, 20000, 40000, 100000, 200000, 400000, 1000000, 2000000, 4000000, 10000000, 20000000, 40000000, 100000000, 200000000, 400000000, 1000000000
OFFSET
0,2
COMMENTS
Or, numbers of form 10^n, 2*10^n, 4*10^n.
Or, numbers n such that the digits of n^3 are decreasing. - Dmitry Kamenetsky, Jun 15 2006
LINKS
Thomas Harriot, Manuscript 6782, p. 1, c. 1599.
D. Panario, M. Sahin, and Q. Wang, A family of Fibonacci-like conditional sequences, INTEGERS, Vol. 13, 2013, #A78.
FORMULA
a(0)=1, a(1)=2, a(2)=4, a(n)=10*a(n-3). - Harvey P. Dale, Aug 16 2012
G.f.: (1 + 2*x + 4*x^2)/(1 - 10*x^3 ). - R. J. Mathar, Mar 13 2015
MATHEMATICA
Table[FromDigits[IntegerDigits[2^n, 8]], {n, 0, 30}] (* or *) LinearRecurrence[ {0, 0, 10}, {1, 2, 4}, 30] (* Harvey P. Dale, Aug 16 2012 *)
PROG
(PARI) a(n)=2^(n%3)*10^(n\3) \\ Charles R Greathouse IV, Oct 22 2014
(Magma) [Seqint(Intseq(2^n, 8)): n in [0..30]]; // G. C. Greubel, Sep 10 2018
(Python)
def A004647(n): return int(oct(2**n)[2:]) # Chai Wah Wu, May 23 2022
CROSSREFS
Sequence in context: A263993 A189585 A239346 * A265096 A236572 A283213
KEYWORD
nonn,base,easy
STATUS
approved