login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers where 7 is the only odd decimal digit.
1

%I #16 Jul 27 2021 15:12:50

%S 7,27,47,67,70,72,74,76,77,78,87,207,227,247,267,270,272,274,276,277,

%T 278,287,407,427,447,467,470,472,474,476,477,478,487,607,627,647,667,

%U 670,672,674,676,677,678,687,700,702,704,706,707,708,720,722,724,726

%N Numbers where 7 is the only odd decimal digit.

%C This is a 10-automatic language. - _Charles R Greathouse IV_, Oct 03 2011

%H <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>

%p q:= n-> is(select(c-> c::odd, {convert(n, base, 10)[]})={7}):

%p select(q, [$1..887])[]; # _Alois P. Heinz_, Jul 27 2021

%t Select[Range[1000],Union[Select[IntegerDigits[#],OddQ]]=={7}&] (* _Harvey P. Dale_, May 24 2012 *)

%o (Perl) for (0..1000) {

%o print "$_, " if (/^[024678]*7[024678]*$/)

%o } # _Charles R Greathouse IV_, Oct 05 2011

%o (Python)

%o def ok(n): return set("13579") & set(str(n)) == {'7'}

%o print(list(filter(ok, range(727)))) # _Michael S. Branicky_, Jul 27 2021

%K base,easy,nonn

%O 1,1

%A _Eric Angelini_, Oct 21 2004