login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A256992
Position of n in either of the complementary sequences, A005187 or A055938: a(n) = A213714(n) + A234017(n).
10
1, 1, 2, 3, 2, 3, 4, 5, 4, 6, 7, 5, 6, 7, 8, 9, 8, 10, 11, 9, 10, 12, 13, 11, 14, 15, 12, 13, 14, 15, 16, 17, 16, 18, 19, 17, 18, 20, 21, 19, 22, 23, 20, 21, 22, 24, 25, 23, 26, 27, 24, 25, 28, 29, 26, 30, 31, 27, 28, 29, 30, 31, 32, 33, 32, 34, 35, 33, 34, 36, 37, 35, 38, 39, 36, 37, 38, 40, 41, 39, 42, 43, 40, 41, 44, 45, 42
OFFSET
1,3
COMMENTS
In other words, if n = A005187(k) for some k >= 1, then a(n) = k, otherwise it must be that n = A055938(h) for some h, and then a(n) = h.
Each n occurs exactly twice, first at a(A005187(n)), then at a(A055938(n)). Cf. also A257126.
When iterating a(n), a(a(n)), a(a(a(n))), etc, A256993(n) gives the number of steps to reach one, from any starting value n >= 1.
LINKS
FORMULA
a(n) = A213714(n) + A234017(n).
a(n) = A256991(n) + A079559(n).
If A079559(n) = 1, a(n) = A213714(n), otherwise a(n) = A234017(n).
MATHEMATICA
With[{nn = 92}, Function[{g, h}, Flatten@ Table[If[MemberQ[g, n], First@ Position[g, n] - 1, First@ Position[h, n]], {n, Min[Length /@ {g, h}]}]] @@ {Table[2 n - DigitCount[2 n, 2, 1], {n, 0, nn}], Complement[Range@ Last@ #, #] &@ Table[IntegerExponent[(2 n)!, 2], {n, 0, nn}]} ] (* Michael De Vlieger, Dec 12 2016, after Harvey P. Dale at A005187 and Jean-François Alcover at A055938 *)
PROG
(Scheme)
(define (A256992 n) (+ (A213714 n) (A234017 n)))
(define (A256992 n) (if (not (zero? (A079559 n))) (A213714 n) (A234017 n)))
CROSSREFS
Cf. also A256991 (variant), A256993, A257126.
Sequence in context: A106249 A110516 A187180 * A261323 A134986 A336860
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 15 2015
STATUS
approved