A331603 a(1) = 1; for n > 1, if a(n-1) is composite then a(n) is the concatenation of all the prime factors in order of a(n-1), otherwise a(n) is the smallest number not yet appearing in the sequence.
1, 2, 3, 4, 22, 211, 5, 6, 23, 7, 8, 222, 2337, 31941, 33371313, 311123771, 7149317941, 22931219729, 112084656339, 3347911118189, 11613496501723, 97130517917327, 531832651281459, 3331113965338635107, 9, 33, 311, 10, 25, 55, 511, 773, 11, 12, 223, 13, 14, 27, 333, 3337, 4771, 13367, 15
Offset: 1
Examples
a(5) = 22 as a(4) = 4 which has a factorization 4 = 2*2, so the concatenation of factors is '22'. a(7) = 5 as a(6) = 211 which is prime, and 5 is the smallest number not yet appearing in the sequence. a(14) = 31941 as a(13) = 2337 which has a factorization 2337 = 3*19*41, so the concatenation of factors is '31941'.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..200
- Eric Weisstein's World of Mathematics, Home Prime.
Programs
-
Mathematica
nn = 43; c[] = 0; a[1] = c[1] = u = 1; While[c[u] > 0, u++]; Do[If[CompositeQ[#], k = FromDigits@ Flatten@ Map[IntegerDigits[#] &, ConstantArray[##] & @@@ FactorInteger[#]], k = u] &@ a[i - 1]; Set[{a[i], c[k]}, {k, i}]; If[k == u, While[c[u] > 0, u++]], {i, 2, nn}]; Array[a, nn] (* _Michael De Vlieger, Apr 12 2022 *)
Comments