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 A292941 #14 Sep 30 2017 16:07:06 %S A292941 0,1,2,2,4,4,9,4,4,8,18,8,37,18,8,8,74,8,149,16,16,36,298,16,9,74,8, %T A292941 36,596,16,1193,16,36,148,16,16,2387,298,72,32,4774,32,9549,72,16,596, %U A292941 19098,32,19,18,148,148,38196,16,33,72,296,1192,76392,32,152785,2386,32,32,72,72,305571,296,596,32,611142,32,1222285,4774,16,596,32 %N A292941 a(1) = 0, a(2) = 1, and for n > 2, a(n) = 2*a(A252463(n)) + [n == 1 (mod 6)]. %C A292941 Base-2 expansion of a(n) encodes the steps where numbers of the form 6k+1 are encountered when map x -> A252463(x) is iterated down to 1, starting from x=n. An exception is the most significant bit of a(n) which corresponds with the final 1, but is shifted one bit-position towards right (less significant end). %C A292941 The AND - XOR formulas just restate the fact that J(-3|n) = J(-1|n)*J(3|n), as the Jacobi-symbol is multiplicative (also) with respect to its upper argument. %H A292941 Antti Karttunen, <a href="/A292941/b292941.txt">Table of n, a(n) for n = 1..2048</a> %H A292941 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A292941 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %F A292941 a(1) = 0, a(2) = 1, and for n > 2, a(n) = 2*a(A252463(n)) + [n == 1 (mod 6)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 6k+1, and 0 otherwise. %F A292941 Also, for n > 2, a(n) = 2*a(A252463(n)) + [n == 1 (mod 2)]*[J(-3|n) = 1], where J is the Jacobi-symbol. %F A292941 a(n) = A292263(n) AND (A292253(n) XOR A292383(n)), where AND is bitwise-and (A004198) and XOR is bitwise-XOR (A003987). %F A292941 a(n) = A292263(n) AND (A292255(n) XOR A292385(n)). [See comments.] %F A292941 For n >= 0, a(A163511(n)) = A292942(n). %F A292941 For n >= 1, a(n) + A292943(n) + A292945(n) = A243071(n). %o A292941 (Scheme) (define (A292941 n) (if (<= n 2) (- n 1) (+ (if (= 1 (modulo n 6)) 1 0) (* 2 (A292941 (A252463 n)))))) %Y A292941 Cf. A005940, A163511, A243071, A292942, A292943, A292945. %Y A292941 Cf. also A292253, A292263, A292381, A292385. %K A292941 nonn %O A292941 1,3 %A A292941 _Antti Karttunen_, Sep 28 2017