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

A349705
Numbers k such that the concatenation in increasing order of their prime factors, with multiplicity, is congruent to 1 (mod k).
1
36, 39, 66, 1435, 5714, 6410, 13861, 22564, 27346, 33137, 45542, 79260, 171860, 268218, 442068, 486127, 675423, 2287527, 3710027, 9610766, 14318290, 26293568, 29361702, 49703324, 227358366, 433100023, 442960845, 479174118, 1221238938, 1243718114, 4053362596, 8620689655
OFFSET
1,1
LINKS
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
A349705_list = list(islice(A349705_gen(), 10)) # Chai Wah Wu, Feb 28 2022
CROSSREFS
Sequence in context: A337861 A261373 A248372 * A129288 A083248 A360765
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