OFFSET
1,1
LINKS
Martin Ehrenstein, Table of n, a(n) for n = 1..39
EXAMPLE
a(3) = 66 is a term because the concatenation of its prime factors is 2311 and 2311 == 1 (mod 66).
MAPLE
filter:= proc(n) local L, t;
lcat(map(t -> t[1]$t[2], sort( ifactors(n)[2], (a, b) -> a[1] < b[1]))) mod n = 1;
end proc:
select(filter, [$1..10^7]);
MATHEMATICA
upto=10^5; a={}; Do[If[Mod[FromDigits[Flatten[Map[IntegerDigits[ConstantArray[First[#], Last[#]]]&, FactorInteger[k]]]], k]==1, AppendTo[a, k]], {k, upto}]; a (* Paolo Xausa, Nov 26 2021 *)
PROG
(Python)
from sympy import factorint
def ok(k): return int("".join(map(str, factorint(k, multiple=True))))%k == 1
print([k for k in range(2, 10**5) if ok(k)]) # Michael S. Branicky, Nov 26 2021
(Python)
from itertools import count, islice
from sympy import factorint
def A349705_gen(startvalue=1): # generator of terms >= startvalue
for k in count(max(startvalue, 1)):
c = 0
for d in sorted(factorint(k, multiple=True)):
c = (c*10**len(str(d)) + d) % k
if c == 1:
yield k
CROSSREFS
KEYWORD
nonn,hard
AUTHOR
J. M. Bergot and Robert Israel, Nov 25 2021
EXTENSIONS
a(28)-a(32) from Martin Ehrenstein, Nov 27 2021
STATUS
approved