A004647 Powers of 2 written in base 8.
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
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- 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.
- Index entries for linear recurrences with constant coefficients, signature (0,0,10).
Programs
-
Magma
[Seqint(Intseq(2^n, 8)): n in [0..30]]; // G. C. Greubel, Sep 10 2018
-
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 *)
-
PARI
a(n)=2^(n%3)*10^(n\3) \\ Charles R Greathouse IV, Oct 22 2014
-
Python
def A004647(n): return int(oct(2**n)[2:]) # Chai Wah Wu, May 23 2022
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
Comments