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”).

A120712
Numbers k with the property that the concatenation of the nontrivial divisors of k (i.e., excluding 1 and k) is a prime.
9
4, 6, 9, 21, 22, 25, 33, 39, 46, 49, 51, 54, 58, 78, 82, 93, 99, 111, 115, 121, 133, 141, 142, 147, 153, 154, 159, 162, 166, 169, 174, 177, 186, 187, 189, 201, 205, 219, 226, 235, 237, 247, 249, 253, 262, 267, 274, 286, 289, 291, 294, 301, 318
OFFSET
1,1
EXAMPLE
k | divisors | concatenation
---+----------------+--------------
4 | (1) 2 (4) | 2
6 | (1) 2, 3 (6) | 23
9 | (1) 3 (9) | 3
21 | (1) 3, 7 (21) | 37
22 | (1) 2, 11 (22) | 211
25 | (1) 5 (25) | 5
33 | (1) 3, 11 (33) | 311
39 | (1) 3, 13 (39) | 313
MAPLE
with(numtheory):
for k from 2 to 1000 do:
v0:=divisors(k):
nn:=nops(v0):
if nn > 2 then
v1:=[seq(v0[j], j=2..nn-1)]:
v2:=cat(seq(convert(v1[n], string), n=1..nops(v1))):
v3:=parse(v2):
if isprime(v3) = true then lprint(k, v3) fi:
fi:
MATHEMATICA
fQ[n_] := PrimeQ@ FromDigits@ Most@ Rest@ Divisors@ n; Select[ Range[2, 320], fQ]
PROG
(Python)
from sympy import divisors, isprime
def ok(n):
s = "".join(str(d) for d in divisors(n)[1:-1])
return s != "" and isprime(int(s))
print([k for k in range(319) if ok(k)]) # Michael S. Branicky, Oct 01 2024
KEYWORD
nonn,base
AUTHOR
Eric Angelini, Jul 19 2007
EXTENSIONS
Name edited by Michel Marcus, Mar 09 2023
STATUS
approved