login
A351741
Numbers k such that the concatenation of 1,2,...,k and the concatenation of k,k-1,...,1 have the same number of prime factors, counted with multiplicity.
0
1, 3, 4, 5, 7, 10, 13, 16, 23, 26, 31, 32, 37, 39, 51, 54, 56
OFFSET
1,2
COMMENTS
Numbers k such that A001222(A007908(k)) = A001222(A000422(k)).
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