A176553 Numbers m such that concatenations of divisors of m are noncomposites.
1, 3, 7, 9, 13, 21, 31, 37, 67, 73, 79, 97, 103, 109, 121, 151, 163, 181, 183, 193, 219, 223, 229, 237, 277, 283, 307, 363, 367, 373, 381, 409, 433, 439, 471, 487, 489, 499, 511, 523, 571, 601, 603, 607, 613, 619, 657, 669, 709, 733, 787, 811, 817, 819, 823, 841, 867
Offset: 1
Examples
a(6) = 21: the divisors of 21 are 1,3,7,21, and their concatenation 13721 is noncomposite.
Links
- Bill McEachen, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[10^3], ! CompositeQ@ FromDigits@ Flatten@ IntegerDigits@ Divisors@ # &] (* Michael De Vlieger, Sep 23 2016 *)
-
PARI
is(n)=my(d=divisors(n)); d[1]="1"; isprime(eval(concat(d))) || n==1 \\ Charles R Greathouse IV, Sep 23 2016
-
Python
from sympy import divisors, isprime def ok(m): return m==1 or isprime(int("".join(str(d) for d in divisors(m)))) print([m for m in range(1, 900) if ok(m)]) # Michael S. Branicky, Feb 05 2022
Extensions
Edited and extended by Charles R Greathouse IV, Apr 30 2010
Data corrected by Bill McEachen, Nov 03 2021
Comments