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.

A032912 Numbers whose set of base-5 digits is {1,3}.

Original entry on oeis.org

1, 3, 6, 8, 16, 18, 31, 33, 41, 43, 81, 83, 91, 93, 156, 158, 166, 168, 206, 208, 216, 218, 406, 408, 416, 418, 456, 458, 466, 468, 781, 783, 791, 793, 831, 833, 841, 843, 1031, 1033, 1041, 1043, 1081, 1083, 1091, 1093, 2031, 2033
Offset: 1

Views

Author

Keywords

Comments

Or, Numbers all of whose base-5 digits are odd.

Crossrefs

Cf. A007091.

Programs

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