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.

A169965 Numbers whose decimal expansion contains only 0's and 2's.

Original entry on oeis.org

0, 2, 20, 22, 200, 202, 220, 222, 2000, 2002, 2020, 2022, 2200, 2202, 2220, 2222, 20000, 20002, 20020, 20022, 20200, 20202, 20220, 20222, 22000, 22002, 22020, 22022, 22200, 22202, 22220, 22222, 200000, 200002, 200020, 200022, 200200, 200202, 200220, 200222
Offset: 1

Views

Author

N. J. A. Sloane, Aug 07 2010

Keywords

Crossrefs

Programs

  • Haskell
    a169965 n = a169965_list !! (n-1)
    a169965_list = map (* 2) a007088_list
    -- Reinhard Zumkeller, Jan 10 2012
  • Mathematica
    Map[FromDigits,Tuples[{0,2},6]] (* Paolo Xausa, Oct 30 2023 *)
  • PARI
    print1(0);for(d=1,5,for(n=2^(d-1),2^d-1,print1(", ");forstep(i=d-1,0,-1,print1((n>>i)%2*2)))) \\ Charles R Greathouse IV, Nov 16 2011
    
  • PARI
    lista(N) = vector(N, i, fromdigits(binary(i-1)*2)); \\ Ruud H.G. van Tol, Oct 26 2024
    

Formula

a(n+1) = Sum_{k>=0} A030308(n,k)*A093136(k+1). - Philippe Deléham, Oct 16 2011
a(n) = 2 * A007088(n-1).