OFFSET
1,2
EXAMPLE
a(3) = 4 is a term because 1234 = 2*617 and 4321 = 29*149 each have two prime factors.
MAPLE
dcat:= (a, b) -> a*10(1+ilog10(b))+b:
a:= 1: b:= 1: R:= 1:
for n from 2 to 40 do
a:= dcat(n, a);
b:= dcat(b, n);
if numtheory:-bigomega(a) = numtheory:-bigomega(b) then R:= R, n fi
od:
R;
MATHEMATICA
Select[Range[32], SameQ @@ PrimeOmega@{FromDigits@ Flatten@ #, FromDigits@ Flatten@ Reverse[#]} &@ IntegerDigits@ Range[#] &] (* Michael De Vlieger, Feb 17 2022 *)
PROG
(Python)
from sympy import primeomega
def afind(limit, startk=1):
k = startk
sk = "".join(str(i) for i in range(1, k))
skr = "".join(str(i) for i in range(k-1, 0, -1))
for k in range(startk, limit+1):
sk += str(k)
skr = str(k) + skr
if primeomega(int(sk)) == primeomega(int(skr)):
print(k, end=", ")
afind(23) # Michael S. Branicky, Feb 17 2022
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
J. M. Bergot and Robert Israel, Feb 17 2022
EXTENSIONS
a(17) from Michael S. Branicky, Feb 19 2022
STATUS
approved