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”).
%I #25 Feb 12 2019 01:18:15
%S 1,9,10,39,49,69,90,91,92,93,94,95,96,98,99,100,110,111,119,129,159,
%T 169,189,190,192,194,195,196,198,209,219,249,259,279,289,290,291,292,
%U 294,295,296,297,298,299,309,319,329,339,369,390,391,392,393,394,395,396
%N Nonprimes whose largest digit is an odd nonprime.
%C I.e., nonprimes whose largest digit is 1 or 9. - _Jon E. Schoenfield_, Feb 11 2019
%H G. C. Greubel, <a href="/A154389/b154389.txt">Table of n, a(n) for n = 1..1000</a>
%e 1 is a term because it is nonprime and its largest digit, 1, is an odd nonprime.
%e 9 is a term because it is nonprime and its largest digit, 9, is an odd nonprime.
%e 10 is a term because it is nonprime and its largest digit, 1, is an odd nonprime.
%e 39 is a term because it is nonprime and its largest digit, 9, is an odd nonprime.
%p A141468 := proc(n) option remember; if n <= 3 then op(n,[0,1,4]) ; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do: end if; end proc:
%p A054055 := proc(n) max( op(convert(n,base,10)) ) ; end proc:
%p for n from 1 to 500 do c := A141468(n) ; if A054055(c) in {1,9} then printf("%d,",c ) ; end if; end do: # _R. J. Mathar_, May 05 2010
%t ldQ[n_] := Module[{midn = Max[IntegerDigits[n]]}, OddQ[midn] && !PrimeQ[midn]]
%t Select[Complement[Range[450], Prime[Range[PrimePi[450]]]], ldQ] (* _Harvey P. Dale_, Jan 31 2011 *)
%o (PARI) isok(n) = !isprime(n) && (d = vecmax(digits(n))) && (d % 2) && ! isprime(d); \\ _Michel Marcus_, Sep 16 2016
%Y Cf. A054055 (largest digit).
%Y Cf. A141468 (0 together with the nonprime numbers).
%K nonn,base
%O 1,2
%A _Juri-Stepan Gerasimov_, Jan 08 2009
%E Corrected (69 inserted, 111 inserted, 189 inserted, ...) by _R. J. Mathar_, May 05 2010
%E Example section edited by _Jon E. Schoenfield_, Feb 11 2019