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 A265716 #23 Feb 16 2025 08:33:27 %S A265716 0,2,5,6,11,10,13,14,23,22,21,22,27,26,29,30,47,46,45,46,43,42,45,46, %T A265716 55,54,53,54,59,58,61,62,95,94,93,94,91,90,93,94,87,86,85,86,91,90,93, %U A265716 94,111,110,109,110,107,106,109,110,119,118,117,118,123,122 %N A265716 a(n) = n IMPL (2*n), where IMPL is the bitwise logical implication. %C A265716 The scatterplot exhibits fractal qualities. - _Bill McEachen_, Dec 27 2022 %H A265716 Reinhard Zumkeller, <a href="/A265716/b265716.txt">Table of n, a(n) for n = 0..8191</a> <= 2^13-1 %H A265716 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Implies.html">Implies</a> %F A265716 a(n) = A265705(2*n,n): central terms of triangle A265705; %F A265716 a(A247648(n)) = 2*A247648(n). %F A265716 a(n)= bitor(A003817(n)-n, 2*n) (conjectured). - _Bill McEachen_, Dec 13 2021 %F A265716 2n <= a(n) <= 3n. - _Charles R Greathouse IV_, Jan 20 2023 %e A265716 . 2*21=42 | 101010 2*6=12 | 1100 %e A265716 . 21 | 10101 6 | 110 %e A265716 . -----------+------- ----------+----- %e A265716 . 21 IMPL 42 | 101010 -> a(21) = 42 6 IMPL 12 | 1101 -> a(6) = 13 . %p A265716 A265716 := n -> Bits:-Implies(n, 2*n): %p A265716 seq(A265716(n), n=0..61); # _Peter Luschny_, Sep 23 2019 %t A265716 IMPL[n_, k_] := If[n == 0, 0, BitOr[2^Length[IntegerDigits[k, 2]]-1-n, k]]; %t A265716 a[n_] := n ~IMPL~ (2n); %t A265716 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Nov 16 2021 *) %o A265716 (Haskell) %o A265716 a265716 n = n `bimpl` (2 * n) where %o A265716 bimpl 0 0 = 0 %o A265716 bimpl p q = 2 * bimpl p' q' + if u <= v then 1 else 0 %o A265716 where (p', u) = divMod p 2; (q', v) = divMod q 2 %o A265716 (PARI) a(n)=bitor(bitneg(n, exponent(n)+1), 2*n) \\ _Charles R Greathouse IV_, Jan 20 2023 %Y A265716 Cf. A265705, A247648, A003817. %K A265716 nonn,look,easy %O A265716 0,2 %A A265716 _Reinhard Zumkeller_, Dec 15 2015