cp's OEIS Frontend

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.

A037271 Number of steps to reach a prime under "replace n with concatenation of its prime factors" when applied to n-th composite number, or -1 if no such number exists.

This page as a plain text file.
%I A037271 #40 Feb 16 2025 08:32:37
%S A037271 2,1,13,2,4,1,5,4,4,1,15,1,1,2,3,4,4,1,2,2,1,5,3,2,2,1,9,2,9,6,1,15
%N A037271 Number of steps to reach a prime under "replace n with concatenation of its prime factors" when applied to n-th composite number, or -1 if no such number exists.
%C A037271 a(33) is presently unknown: starting with 49, no prime has been reached after 110 steps. See A037274 for the latest information.
%H A037271 Patrick De Geest, <a href="http://www.worldofnumbers.com/topic1.htm">Home Primes</a>
%H A037271 M. Herman and J. Schiffman, <a href="http://www.jstor.org/stable/10.5951/mathteacher.107.8.0606">Investigating home primes and their families</a>, Math. Teacher, 107 (No. 8, 2014), 606-614.
%H A037271 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HomePrime.html">Home Prime</a>
%e A037271 Starting with 14 (the seventh composite number) we get 14=2*7, 27=3*3*3, 333=3*3*37, 3337=47*71, 4771=13*367, 13367 is prime; so a(7)=5.
%t A037271 maxComposite = 49; maxIter = 40; concat[n_] := FromDigits[ Flatten[ IntegerDigits /@ Flatten[ Apply[ Table, {#[[1]], {#[[2]]}} & /@ FactorInteger[n], {1}]]]]; composites = Select[ Range[2, maxComposite], ! PrimeQ[#] &]; a[n_] := ( lst = NestWhileList[ concat, composites[[n]], ! PrimeQ[#] &, 1, maxIter]; If[PrimeQ[ Last[lst]], Length[lst] - 1, - 1]); Table[a[n], {n, 1, Length[composites]}] (* _Jean-François Alcover_, Jul 10 2012 *)
%o A037271 (Haskell)
%o A037271 a037271 = length . takeWhile ((== 0) . a010051'') .
%o A037271                              iterate a037276 . a002808
%o A037271 -- _Reinhard Zumkeller_, Apr 03 2012
%Y A037271 Cf. A037272, A037273, A037274, A056938, A002808, A037276, A027746, A230305.
%K A037271 nonn,nice,base,more,hard
%O A037271 1,1
%A A037271 _Jeff Burch_