A232746 n occurs A030124(n) times; a(n) = one less than the least k such that A005228(k) > n.
1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 1
Keywords
Programs
-
Mathematica
nmax = 100; A5228 = {1}; Module[{d = 2, k = 1}, Do[While[MemberQ[A5228, d], d++]; k += d; d++; AppendTo[A5228, k], {n, 1, nmax}]]; a[n_] := For[k = 1, True, k++, If[A5228[[k]] > n, Return[k-1]]]; Array[a, nmax] (* Jean-François Alcover, Dec 09 2021 *)
Formula
a(n) = one less than the least k such that A005228(k) > n.
Comments