login
Composite numbers that divide the reverse of the concatenation of their ascending order prime factors, with repetition.
4

%I #23 Apr 28 2024 16:29:24

%S 26,38,46,378,26579,84941,178838,30791466,39373022,56405502,227501395,

%T 904085931,1657827142

%N Composite numbers that divide the reverse of the concatenation of their ascending order prime factors, with repetition.

%C a(14) > 10^10, if it exists. - _Daniel Suteu_, Apr 28 2024

%e 26 is a term as 26 = 2 * 13 = "213" which is reverse is "312", and 312 is divisible by 26.

%e 227501395 is a term as 227501395 = 5 * 11 * 17 * 23 * 71 * 149 = "511172371149" which in reverse is "941173271115", and 941173271115 is divisible by 227501395.

%o (Python)

%o from itertools import count, islice

%o from sympy import isprime, factorint

%o def ok(k): return not isprime(k) and int("".join(str(p)[::-1]*e for p, e in list(factorint(k).items())[::-1]))%k == 0

%o def agen(): yield from filter(ok, count(4))

%o print(list(islice(agen(), 7))) # Michael S. Branicky, Apr 13 2024

%o (Python)

%o from itertools import count, islice

%o from sympy import factorint

%o def A371696_gen(startvalue=4): # generator of terms >= startvalue

%o for n in count(max(startvalue,4)):

%o f = factorint(n)

%o if sum(f.values()) > 1:

%o c = 0

%o for p in sorted(f,reverse=True):

%o a = pow(10,len(s:=str(p)),n)

%o q = int(s[::-1])

%o for _ in range(f[p]):

%o c = (c*a+q)%n

%o if not c:

%o yield n

%o A371696_list = list(islice(A371696_gen(),6)) # _Chai Wah Wu_, Apr 13 2024

%Y Cf. A027746, A037276, A259047, A371641, A371666.

%K nonn,base,more

%O 1,1

%A _Scott R. Shannon_, Apr 03 2024

%E a(13) from _Daniel Suteu_, Apr 28 2024