cp's OEIS Frontend

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.

A038192 Bisection of A001317.

This page as a plain text file.
%I A038192 #25 Jul 08 2025 22:09:39
%S A038192 3,15,51,255,771,3855,13107,65535,196611,983055,3342387,16711935,
%T A038192 50529027,252645135,858993459,4294967295,12884901891,64424509455,
%U A038192 219043332147,1095216660735,3311419785987,16557098929935,56294136361779
%N A038192 Bisection of A001317.
%H A038192 Charles R Greathouse IV, <a href="/A038192/b038192.txt">Table of n, a(n) for n = 0..1000</a>
%F A038192 a(n) = 12*A089893(n) + 3.
%F A038192 a(n+1) = (2 * a(n)) XOR (3 * a(n)), where XOR is the bitwise exclusive or operator. - _Federico Provvedi_, Sep 14 2023
%t A038192 NestList[BitXor[2#,3#]&,3,30] (* _Federico Provvedi_, Sep 14 2023 *)
%o A038192 (PARI) a(n)=sum(k=0, 2*n+1, (binomial(2*n+1, k)%2)<<k) \\ _Charles R Greathouse IV_, Aug 08 2013
%o A038192 (PARI) A011371(n)=my(s);while(n>>=1,s+=n);s
%o A038192 A047999(n,k)=A011371(n)==A011371(k)+A011371(n-k)
%o A038192 a(n)=n+=n+1;sum(k=0, n, A047999(n, k)<<k) \\ _Charles R Greathouse IV_, Aug 09 2013
%o A038192 (Python)
%o A038192 def A038192(n): return sum((bool(~(m:=(n<<1)+1)&m-k)^1)<<k for k in range((n+1)<<1)) # _Chai Wah Wu_, May 02 2023
%Y A038192 Cf. A001317, A089893.
%K A038192 nonn
%O A038192 0,1
%A A038192 _N. J. A. Sloane_