OFFSET
1,3
COMMENTS
Permutation of nonnegative numbers.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..15303 (a(15303) = 2^29.)
Michael De Vlieger, Log log scatterplot of a(n), n = 1..10^6.
Michael De Vlieger, Plot terms S(n) = A272011(a(n)) at (x,y) = (n,S(n,k)) for n = 1..2^11.
FORMULA
Let S(n) be the set of indices of primorials P(i), reverse sorted, such that A129912(n) = Product_{k=1..m} S(n,k), where m = | S(n) |. Then a(n) = Sum_{k=1..m} 2^(S(n,k)-1).
EXAMPLE
a(1) = 0 by convention.
a(8) = 8 comes before a(9) = 7, since we interpret 8 = 2^3 instead as P(4) = 210, while for a(9), 7 = 2^2 + 2^1 + 2^0 becomes P(3)*P(2)*P(1) = 30*6*2 = 360. Because 210 < 360, 8 appears before 7 in this sequence.
Table relating a(n), n=1..19 with the set S(n) of indices of distinct primorial factors of A129912(n):
-----------------------------------------
1 1 0
2 2 1 1 0
3 6 2 2 1
4 12 2,1 3 1,0
5 30 3 4 2
6 60 3,1 5 2,0
7 180 3,2 6 2,1
8 210 4 8 3
9 360 3,2,1 7 2,1,0
10 420 4,1 9 3,0
11 1260 4,2 10 3,1
12 2310 5 16 4
13 2520 4,2,1 11 3,1,0
14 4620 5,1 17 4,0
15 6300 4,3 12 3,2
16 12600 4,3,1 13 3,2,0
17 13860 5,2 18 4,1
18 27720 5,2,1 19 4,1,0
19 30030 6 32 5
...
MATHEMATICA
a6939[n_] := Product[Prime[n + 1 - i]^i, {i, n}];
g[m_] := Block[{f, j = 1},
f[n_, i_, e_] :=
If[n < m, Block[{p = Prime[i + 1]}, If[e == 1, Sow@ n];
f[n p^e, i + 1, e];
If[e > 1, f[n p^(e - 1), i + 1, e - 1]]]];
Sort@ Reap[While[a6939[j] < m, f[2^j, 1, j]; j++]][[-1, 1]] ];
Map[Total@
Map[2^(# - 1) &,
Table[LengthWhile[#1, # >= j &], {j, #2}] & @@ {#, Max[#]} ] &[
FactorInteger[#][[All, -1]]] &, g[2^31]] (* Michael De Vlieger, Jun 08 2023, after Giovanni Resta at A129929 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Jun 08 2023
STATUS
approved