cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A004647 Powers of 2 written in base 8.

Original entry on oeis.org

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

Views

Author

Keywords

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

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