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 A292245 #19 Sep 18 2017 09:23:19 %S A292245 1,2,2,5,4,4,11,4,8,17,10,18,9,8,22,17,8,8,17,22,36,41,8,42,17,16,44, %T A292245 21,34,32,35,20,32,33,36,64,69,18,34,73,16,74,37,44,82,33,34,34,89,16, %U A292245 64,69,16,68,65,34,64,33,44,64,33,72,16,65,82,68,85,16,128,137,84,72,69,34,138,145,32,84,145,88,88,149,42,162,65,68,164,45,64 %N A292245 Base-2 expansion of a(n) encodes the steps where numbers of the form 3k+1 are encountered when map x -> A253889(x) is iterated down to 1, starting from x=n. %H A292245 Antti Karttunen, <a href="/A292245/b292245.txt">Table of n, a(n) for n = 1..16384</a> %H A292245 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A292245 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %F A292245 a(1) = 1; for n > 1, a(n) = 2*a(A253889(n)) + [n ≡ 1 (mod 3)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 3k+1, and 0 otherwise. %F A292245 a(n) = A289813(A292243(n)). %F A292245 Other identities. For all n >= 1: %F A292245 a(A048673(n)) = A292248(n). %F A292245 a(n) + A292244(n) = A064216(n). %F A292245 a(n) AND A292244(n) = a(n) AND A292246(n) = 0, where AND is a bitwise-AND (A004198). %e A292245 For n=1 (the termination value of the iteration), 1 is of the form 3k+1, thus a(1) = 1*(2^0) = 1. %e A292245 For n=2, 2 is not of the form 3k+1, while A253889(2) = 1 is, thus a(2) = 0*(2^0) + 1*2(^1) = 2. %e A292245 For n=4, 4 is of the form 3k+1, while A253889(4) = 2 is not, but then A253889(2) = 1 again is, thus a(4) = 1*(2^0) + 0*(2^1) + 1*(2^2) = 5. %t A292245 f[n_] := Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1]; g[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n; Map[FromDigits[#, 2] &[IntegerDigits[#, 3] /. 2 -> 0] &, Array[a, 98]] (* _Michael De Vlieger_, Sep 16 2017 *) %o A292245 (Scheme, with memoization-macro definec) %o A292245 (definec (A292245 n) (if (= 1 n) 1 (+ (if (= 1 (modulo n 3)) 1 0) (* 2 (A292245 (A253889 n)))))) %Y A292245 Cf. A048673, A064216, A289813, A292243, A292244, A292246, A292248. %K A292245 nonn,base %O A292245 1,2 %A A292245 _Antti Karttunen_, Sep 15 2017