OFFSET
1,1
COMMENTS
A number 999...9998 will be a term if it has two prime factors 2 and 4999...999. Therefore 999999999999998 and 999...9998 (with 54 9's) are both terms. See A056712.
100000000000 < a(15) <= 999999999999998. Robert P. P. McKone, May 07 2024
EXAMPLE
998 is a term as 998 = 2 * 499 = "2" * "994" when each prime factor is reversed. This gives "2994", and 2994 is divisible by 998.
15584 is a term as 15584 = 2 * 2 * 2 * 2 * 2 * 487 = "2" * "2" * "2" * "2" * "2" * "784" when each prime factor is reversed. This gives "22222784", and 22222784 is divisible by 15584.
MATHEMATICA
a[n_Integer] := Module[{f}, f = Flatten[ConstantArray @@@ FactorInteger[n]]; If[Length[f] < 2, Return[False]]; Mod[FromDigits[StringJoin[StringReverse[IntegerString[#, 10]] & /@ f], 10], n] == 0];
Select[Range[2, 10^5], a] (* Robert P. P. McKone, May 03 2024 *)
PROG
(Python)
from itertools import count, islice
from sympy import factorint
def A372046_gen(startvalue=4): # generator of terms >= startvalue
for n in count(max(startvalue, 4)):
f = factorint(n)
if sum(f.values()) > 1:
c = 0
for p in sorted(f):
a = pow(10, len(s:=str(p)), n)
q = int(s[::-1])
for _ in range(f[p]):
c = (c*a+q)%n
if not c:
yield n
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Scott R. Shannon, Apr 17 2024
EXTENSIONS
a(13)-a(14) from Robert P. P. McKone, May 05 2024
STATUS
approved