This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A361581 #12 Mar 22 2023 08:07:33 %S A361581 1,2,3,2,5,32,7,42,3,52,11,6432,13,72,53,842,17,9632,19,1542,73,112, %T A361581 23,2186432,5,312,93,41742,29,51016532,31,61842,113,712,75,812196432, %U A361581 37,912,313,2018542,41,12417632,43,221142,51953,322,47,42612186432,7,520152 %N A361581 If n is composite, replace n with the concatenation of its nontrivial divisors, written in decreasing order, each divisor being written in base 10 with its digits in reverse order, otherwise a(n) = n. %e A361581 Nontrivial divisors of 20 are 2,4,5,10, so a(20)=1542. %o A361581 (PARI) a(n) = if (isprime(n) || (n==1), n, my(d=divisors(n)); my(s=""); forstep(k=#d-1, 2, -1, my(dk = digits(d[k])); for (i=1, #dk, s=concat(s, Str(dk[#dk-i+1])))); eval(s)); \\ _Michel Marcus_, Mar 16 2023 %o A361581 (Python) %o A361581 from sympy import divisors, isprime %o A361581 def a(n): %o A361581 if n == 1 or isprime(n): return n %o A361581 return int("".join(str(d)[::-1] for d in divisors(n)[-2:0:-1])) %o A361581 print([a(n) for n in range(1, 51)]) # _Michael S. Branicky_, Mar 21 2023 %Y A361581 Cf. A130142, A130139, A037279. %K A361581 nonn,base %O A361581 1,2 %A A361581 _Tyler Busby_, Mar 16 2023