Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #24 Dec 11 2019 08:53:34
%S 0,11,21,12,31,1121,41,13,22,1131,51,1221,61,1141,2131,14,71,1122,81,
%T 1231,2141,1151,91,1321,32,1161,23,1241,101,112131,111,15,2151,1171,
%U 3141,1222,121,1181,2161,1331,131,112141,141,1251,2231,1191,151,1421,42,1132,2171
%N a(n) = concatenation of all (i, e_i) with e_i > 0, when n = Product_{i >= 1} prime(i)^e_i.
%C The conventional a(1) = 0 represents the empty concatenation.
%C Due to simple concatenation, this encoding of the positive integers becomes ambiguous from n = 613 = prime(112)^1 on, which has the same encoding a(n) = 1121 as 6 = prime(1)^1*prime(2)^1. To get a unique encoding, one could use, e.g., the digit 9 as delimiter to separate indices and exponents, written in base 9 as to use only digits 0..8, as soon as a term would be the duplicate of an earlier term (or for all n >= 613). Then one would have, e.g., a(613) = prime(134_9)^1 = 13491.
%C Sequence A067599 is based on the same idea, but uses the primes instead of their indices. In A037276 the prime factors are repeated, instead of giving the exponent. In A080670 exponents 1 are omitted. In A124010 only the prime signature is given. In A054841 the sum e_i*10^(i-1) is given, i.e., exponents are used as digits in base 10, while they are listed individually in the rows of A067255.
%e 2 = prime(1)^1 => a(2) = 11,
%e 3 = prime(2)^1 => a(3) = 21,
%e 4 = prime(1)^2 => a(4) = 12,
%e 5 = prime(3)^1 => a(5) = 31,
%e 6 = prime(1)^1*prime(2)^1 => a(1) = 1121,
%e 7 = prime(3)^1 => a(7) = 41,
%e 8 = prime(1)^3 => a(8) = 13, and so on.
%p a:= n-> `if`(n=1, 0, parse(cat(seq([numtheory[pi]
%p (i[1]), i[2]][], i=sort(ifactors(n)[2]))))):
%p seq(a(n), n=1..60); # _Alois P. Heinz_, Mar 16 2018
%t Array[FromDigits@ Flatten@ Map[{PrimePi@ #1, #2} & @@ # &, FactorInteger@ #] &, 51] (* _Michael De Vlieger_, Mar 16 2018 *)
%o (PARI) A299400(n)=if(n=factor(n),eval(concat(apply(f->Str(primepi(f[1]),f[2]), Col(n)~))))
%Y Cf. A067599 (decimal encoding of prime factorization).
%K nonn,base
%O 1,2
%A _M. F. Hasler_, Mar 08 2018