OFFSET
1,2
COMMENTS
Or, Numbers all of whose base-5 digits are odd.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MATHEMATICA
Flatten[Table[FromDigits[#, 5]&/@Tuples[{1, 3}, n], {n, 5}]] (* Vincenzo Librandi, Jun 01 2012 *)
PROG
(Magma) [n: n in [1..2500] | Set(IntegerToSequence(n, 5)) subset {1, 3}]; // 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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved