OFFSET
1,2
COMMENTS
LINKS
Alois P. Heinz, Rows n = 1..8000, flattened (first 1000 rows from Reinhard Zumkeller)
OEIS Wiki, "Fermi-Dirac representation" of n
EXAMPLE
First rows:
. 1: 1
. 2: 2
. 3: 3
. 4: 4
. 5: 5
. 6: 2 3
. 7: 7
. 8: 2 4 8 = 2^2^0 * 2^2^1
. 9: 9
. 10: 2 5
.......
. 990: 2 5 9 11
. 991: 991
. 992: 2 16 31 992 = 2^2^0 * 2^2^2 * 31^2^0
. 993: 3 331
. 994: 2 7 71
. 995: 5 199
. 996: 3 4 83
. 997: 997
. 998: 2 499
. 999: 3 9 37 999 = 3^2^0 * 3^2^1 * 37^2^0
. 1000: 2 4 5 25 1000 = 2^2^0 * 2^2^1 * 5^2^0 * 5^2^1 .
MAPLE
T:= n-> `if`(n=1, [1], sort([seq((l-> seq(`if`(l[j]=1, i[1]^(2^(j-1)), [][]),
j=1..nops(l)))(convert(i[2], base, 2)), i=ifactors(n)[2])]))[]:
seq(T(n), n=1..60); # Alois P. Heinz, Feb 20 2018
MATHEMATICA
nmax = 50; FDPrimes = Reap[k = 1; While[lim = nmax^(1/k); lim > 2, Sow[Prime[Range[PrimePi[lim]]]^k]; k = 2 k]][[2, 1]] // Flatten // Union;
f[1] = 1; f[n_] := Reap[m = n; Do[If[m == 1, Break[], If[Divisible[m, p], m = m/p; Sow[p]]], {p, Reverse[FDPrimes]}]][[2, 1]] // Reverse;
Array[f, nmax] // Flatten (* Jean-François Alcover, Feb 05 2019 *)
PROG
(Haskell)
a213925 n k = a213925_row n !! (k-1)
a213925_row 1 = [1]
a213925_row n = reverse $ fd n (reverse $ takeWhile (<= n) a050376_list)
where fd 1 _ = []
fd x (q:qs) = if m == 0 then q : fd x' qs else fd x qs
where (x', m) = divMod x q
a213925_tabf = map a213925_row [1..]
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Reinhard Zumkeller, Mar 20 2013
EXTENSIONS
Example corrected (row 992) by Reinhard Zumkeller, Mar 11 2015
STATUS
approved