This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A232746 #21 Dec 09 2021 03:14:37 %S A232746 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, %T A232746 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, %U A232746 10,10,10,10,10,10,10,10,10,10,10,10,10,10 %N A232746 n occurs A030124(n) times; a(n) = one less than the least k such that A005228(k) > n. %C A232746 The characteristic function for Hofstadter's A005228 is given by X_A005228(1)=1, and for n>1, X_A005228(n) = a(n)-a(n-1). %C A232746 The characteristic function for Hofstadter's A030124 is given by X_A030124(1)=0, and for n>1, X_A030124(n) = 1-(a(n)-a(n-1)). %C A232746 Useful when computing A232747, A232748, A232750 & A225850. %H A232746 <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a> %F A232746 a(n) = one less than the least k such that A005228(k) > n. %t A232746 nmax = 100; A5228 = {1}; Module[{d = 2, k = 1}, Do[While[MemberQ[A5228, d], d++]; k += d; d++; AppendTo[A5228, k], {n, 1, nmax}]]; %t A232746 a[n_] := For[k = 1, True, k++, If[A5228[[k]] > n, Return[k-1]]]; %t A232746 Array[a, nmax] (* _Jean-François Alcover_, Dec 09 2021 *) %o A232746 (Scheme, with _Antti Karttunen_'s IntSeq-library) %o A232746 (define A232746 (COMPOSE -1+ (LEAST-GTE-I 1 1 (COMPOSE -1+ A005228)))) %Y A232746 Cf. A005228, A030124, A232747, A232748, A232750, A232753, A225850. %K A232746 nonn %O A232746 1,3 %A A232746 _Antti Karttunen_, Nov 30 2013