A050608 Numbers k such that base 7 expansion matches (0|1|2|3)*((0|1|2)(4|5|6))?(0|1|2|3)*.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28, 29, 30, 31, 35, 36, 37, 38, 42, 43, 44, 45, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 77, 78, 79, 80, 84, 85, 86, 87, 91, 92, 93, 94, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113
Offset: 1
Programs
-
Perl
# For conv_x_base_n function, see A050607. for($i=0; $i <= 1000; $i++) { if(("0" . conv_x_base_n($i,7)) =~ /^(0|1|2|3)*((0|1|2)(4|5|6))?(0|1|2|3)*$/) { print $i, ","; } }
Extensions
a(1)=0 inserted by Georg Fischer, Jun 26 2021
Comments