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 A343500 #44 Feb 26 2025 01:55:27 %S A343500 2,8,10,12,18,26,28,32,34,40,42,44,48,50,58,60,66,72,74,76,82,90,92, %T A343500 98,104,106,108,112,114,122,124,128,130,136,138,140,146,154,156,160, %U A343500 162,168,170,172,176,178,186,188,192,194,200,202,204,210,218,220,226 %N A343500 Positions of 2's in A003324. %C A343500 Numbers of the form (2*k+1) * 2^e where e >= 1, k+e is odd. In other words, union of {(4*m+1) * 2^(2t-1)} and {(4*m+3) * 2^(2t)}, where m >= 0, t > 0. %C A343500 Numbers whose quaternary (base-4) expansion ends in 300...00 or 0200..00 or 2200..00. At least one trailing zero is required in the first case but not in the latter two cases. %C A343500 There are precisely 2^(N-2) terms <= 2^N for every N >= 2. %C A343500 Also even indices of -1 in A209615. - _Jianing Song_, Apr 24 2021 %C A343500 Complement of A343501 with respect to the even numbers. - _Jianing Song_, Apr 26 2021 %H A343500 Jianing Song, <a href="/A343500/b343500.txt">Table of n, a(n) for n = 1..16384</a> (all terms <= 2^16). %F A343500 a(n) = 2*A338692(n). - _Hugo Pfoertner_, Apr 26 2021 %e A343500 A003324 starts with 1, 2, 3, 4, 1, 4, 3, 2, 1, 2, 3, 2, 1, 4, 3, 4, ... We have A003324(2) = A003324(8) = A003324(10) = A003324(12) = ... = 2, so this sequence starts with 2, 8, 10, 12, ... %t A343500 okQ[n_] := If[OddQ[n], False, Module[{e = IntegerExponent[n, 2], k}, k = (n/2^e - 1)/2; OddQ[k + e]]]; %t A343500 Select[Range[1000], okQ] (* _Jean-François Alcover_, Apr 19 2021, after PARI *) %o A343500 (PARI) isA343500(n) = if(n%2, 0, my(e=valuation(n, 2), k=bittest(n,e+1)); (k+e)%2) %o A343500 (Python) %o A343500 def A343500(n): %o A343500 def f(x): return n+x-sum(((x>>i)-1>>2)+1 for i in range(1,x.bit_length(),2))-sum(((x>>i)-3>>2)+1 for i in range(2,x.bit_length(),2)) %o A343500 m, k = n, f(n) %o A343500 while m != k: m, k = k, f(k) %o A343500 return m # _Chai Wah Wu_, Feb 25 2025 %Y A343500 Cf. A003324, A343501 (positions of 4's), A209615, A338692. %Y A343500 Even terms in A338691. %K A343500 nonn,easy %O A343500 1,1 %A A343500 _Jianing Song_, Apr 17 2021