login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A232746 n occurs A030124(n) times; a(n) = one less than the least k such that A005228(k) > n. 7
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
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).
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)).
Useful when computing A232747, A232748, A232750 & A225850.
LINKS
FORMULA
a(n) = one less than the least k such that A005228(k) > n.
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 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(define A232746 (COMPOSE -1+ (LEAST-GTE-I 1 1 (COMPOSE -1+ A005228))))
CROSSREFS
Sequence in context: A087233 A104147 A227568 * A052146 A097882 A108955
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 30 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 12:15 EDT 2024. Contains 371969 sequences. (Running on oeis4.)