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.

A032914 Numbers whose set of base-7 digits is {1,3}.

Original entry on oeis.org

1, 3, 8, 10, 22, 24, 57, 59, 71, 73, 155, 157, 169, 171, 400, 402, 414, 416, 498, 500, 512, 514, 1086, 1088, 1100, 1102, 1184, 1186, 1198, 1200, 2801, 2803, 2815, 2817, 2899, 2901, 2913, 2915, 3487, 3489, 3501, 3503, 3585, 3587
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..4000] | Set(IntegerToSequence(n, 7)) subset {1, 3}]; // Vincenzo Librandi, Jun 01 2012
    
  • Mathematica
    Flatten[Table[FromDigits[#,7]&/@Tuples[{1,3},n],{n,5}]] (* Vincenzo Librandi, Jun 01 2012 *)
  • Python
    def A032914(n): return (int(bin(m:=n+1)[3:],7)<<1) + (7**(m.bit_length()-1)-1)//6 # Chai Wah Wu, Oct 13 2023