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!)
A232747 Inverse function to Hofstadter's A005228. 6
1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
This is an inverse function to Hofstadter's A005228 in the sense that for all n, n = a(A005228(n)). a(n) = 0 when n is not in A005228, but instead in its complement A030124.
Note that a(n)*A232749(n) = 0 for all n.
Used to compute the permutation A232751.
LINKS
FORMULA
a(1)=1, and for n>1, a(n) = A232746(n) * (A232746(n)-A232746(n-1)).
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}]];
a46[n_] := For[k = 1, True, k++, If[A5228[[k]] > n, Return[k - 1]]];
a[n_] := If[n == 1, 1, a46[n] (a46[n] - a46[n - 1])];
Array[a, nmax] (* Jean-François Alcover, Dec 09 2021 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(definec (A232747 n) (cond ((< n 2) n) (else (* (A232746 n) (- (A232746 n) (A232746 (- n 1)))))))
CROSSREFS
A030124 gives the positions of zeros.
Sequence in context: A284273 A083927 A154724 * A130460 A132440 A218272
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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)