OFFSET
1,3
COMMENTS
a(n>1) contains all positive integers exactly once.
FORMULA
Factor n, multiplying out prime(e_i + 1) generates all odd numbers >= 3. Subtract 2 and multiply by 2^(k - 1), where k is the number of occurrences of the same prime signature of n in (1..n) (A064839).
MATHEMATICA
z = 100; prisigs = Table[If[n == 1, {0}, Sort[Last /@ FactorInteger[n]]], {n, z}];
exps = Table[Count[Take[prisigs, n], prisigs[[n]]], {n, z}]; (*A064839*)
Table[2^(exps[[n]] - 1) (Times @@ Prime[1 + prisigs[[n]]] - 2), {n, z}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Friedjof Tellkamp, Apr 20 2024
STATUS
approved