login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A163622 Composite numbers such that the sum of its smallest digit and the largest digit is a prime. 2
12, 14, 16, 20, 21, 25, 30, 32, 34, 38, 49, 50, 52, 56, 58, 65, 70, 74, 76, 85, 92, 94, 98, 102, 105, 112, 114, 116, 120, 121, 122, 124, 126, 130, 134, 136, 141, 142, 143, 144, 146, 150, 156, 161, 162, 164, 165, 166, 170, 200, 201, 202, 203, 205, 207, 210 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Numbers like 111 are ignored, at least two different digits are required.
LINKS
EXAMPLE
166 is a composite number whose sum of smallest digit and the largest digit is a prime.
MATHEMATICA
comprQ[n_]:=Module[{idn=IntegerDigits[n]}, CompositeQ[n]&&Length[Union[ idn]]>1&&PrimeQ[Min[idn]+Max[idn]]]; Select[Range[250], comprQ] (* Harvey P. Dale, Mar 29 2015 *)
PROG
(Python)
from sympy import isprime
def ok(n):
digits = list(map(int, str(n)))
repdigit, smlg = len(set(digits)) == 1, min(digits) + max(digits)
return not repdigit and isprime(smlg) and not isprime(n)
print([k for k in range(211) if ok(k)]) # Michael S. Branicky, Dec 14 2021
CROSSREFS
Sequence in context: A135739 A096923 A141642 * A159251 A208156 A135770
KEYWORD
nonn,base
AUTHOR
Parthasarathy Nambi, Aug 01 2009
EXTENSIONS
Corrected and extended by Harvey P. Dale, Mar 29 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 27 03:02 EDT 2024. Contains 375462 sequences. (Running on oeis4.)