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 A329181 #50 Jan 08 2025 11:15:09 %S A329181 1,2,3,211,5,23,7,223,311,773,11,21179,13,313,1129,3137,17,3449,19,59, %T A329181 37,211,23,223,773,3251,313,47,29,613,31,4373,311,21179,1129,3449,37, %U A329181 373,313,229,41,67,43,3137,59,223,47,4373,131321,33391,317,2333,53 %N A329181 a(n) = n if n is 1 or prime; otherwise (1) let m = (concatenation of the two divisors in the middle of rows of A027750(n)), (2) if m is prime then a(n) = m, otherwise return to (1) with n=m. %C A329181 A term is a prime (or 1 for the first one) obtained by concatenating its two factors that are closest to its square root. Once they are concatenated (as strings), the process is iterated until concatenation gives a prime. Only composite numbers are processed. %C A329181 At each iteration, we choose a couple (d, d') of divisors this way: n = d * d' and d = max({d >= 1 such that d|n and d<=sqrt(n)}), we replace n with the string concatenation of d and d' digits. The process ends with d = 1 (n is a prime). %C A329181 This sequence is the balanced version of A316941. %C A329181 Apparently it is only a conjecture that the process in the definition will alwats terminate. - _N. J. A. Sloane_, Feb 23 2020 %H A329181 David Cobac, <a href="/A329181/b329181.txt">Table of n, a(n) for n = 1..590</a> %H A329181 David Cobac, <a href="https://huit.re/A329181_C">C code</a> %e A329181 First three positive integers 1, 2, 3 do not change, so a(n)=n, for n <= 3. %e A329181 4th term: sqrt(4)=2 and n=4=2*2 then n=22=2*11 and n=211 is a prime, so a(4)=211. %e A329181 8th term: floor(sqrt(8))=2 and n=8=2*4 then n=24 but floor(sqrt(24))=4 so n=24=4*6 but floor(sqrt(46))=6 and 46's nearest factor to 6 is 2; thus 46=2*23 and 223 is a prime, so a(8)=223. %e A329181 Thus a(8)=a(24)=a(46)=a(223)=223. %t A329181 Array[If[! CompositeQ@ #, #, NestWhile[Block[{k = Floor@ Sqrt@ #}, While[Mod[#, k] != 0, k--]; FromDigits@ Flatten[IntegerDigits /@ {k, #/k}]] &, #, !PrimeQ@ # &]] &, 53] (* _Michael De Vlieger_, Nov 15 2019 *) %o A329181 (C) /* See Cobac link. */ %o A329181 (PARI) a(n) = {if (n==1, return (1)); if (isprime(n), return (n)); while (!isprime(n), my(d = divisors(n)); if (#d % 2 == 1, n = eval(concat(Str(d[#d\2+1]), Str(d[#d\2+1]))), n = eval(concat(Str(d[#d/2]), Str(d[#d/2+1]))));); n;} \\ _Michel Marcus_, Nov 15 2019 %Y A329181 Same process as A316941 with different factors. %Y A329181 Cf. A002808 (the composite numbers), A027750 (the divisors of n). %K A329181 nonn,base %O A329181 1,2 %A A329181 _David Cobac_, Nov 07 2019