OFFSET
1,3
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
Block[{a = {2}, b, c, f, k, m, n, q = {1}, lim = 105}, f[w_] := Block[{p = w[[1]], i = w[[2]]}, ((Log[(p^(i + 2) - 1)/(p^(i + 1) - 1)])/Log[p]) - 1]; m = {{2, 1}, {3, 0}}; c = 1; b = Array[f[m[[#]]] &, c + 1]; For[n = 2, n <= lim, n++, k = Position[b, Max[b]][[1, 1]]; AppendTo[a, m[[k, 1]]]; AppendTo[q, Boole[m[[k, 1]] == 2]]; m[[k, 2]]++; If[k > c, c++; AppendTo[m, {Prime[k + 1], 0}]; AppendTo[b, f[m[[-1]]]]]; b[[k]] = f[m[[k]]]]; Accumulate@ q] (* Michael De Vlieger, Mar 12 2021, after T. D. Noe at A073751 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 08 2021
STATUS
approved