OFFSET
1,2
COMMENTS
I.e., nonprimes whose largest digit is 1 or 9. - Jon E. Schoenfield, Feb 11 2019
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
EXAMPLE
1 is a term because it is nonprime and its largest digit, 1, is an odd nonprime.
9 is a term because it is nonprime and its largest digit, 9, is an odd nonprime.
10 is a term because it is nonprime and its largest digit, 1, is an odd nonprime.
39 is a term because it is nonprime and its largest digit, 9, is an odd nonprime.
MAPLE
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:
A054055 := proc(n) max( op(convert(n, base, 10)) ) ; end proc:
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
MATHEMATICA
ldQ[n_] := Module[{midn = Max[IntegerDigits[n]]}, OddQ[midn] && !PrimeQ[midn]]
Select[Complement[Range[450], Prime[Range[PrimePi[450]]]], ldQ] (* Harvey P. Dale, Jan 31 2011 *)
PROG
(PARI) isok(n) = !isprime(n) && (d = vecmax(digits(n))) && (d % 2) && ! isprime(d); \\ Michel Marcus, Sep 16 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Juri-Stepan Gerasimov, Jan 08 2009
EXTENSIONS
Corrected (69 inserted, 111 inserted, 189 inserted, ...) by R. J. Mathar, May 05 2010
Example section edited by Jon E. Schoenfield, Feb 11 2019
STATUS
approved