login
Trisection of A001317.
5

%I #27 May 03 2023 09:13:25

%S 1,15,85,771,4369,65535,327685,3342387,16843009,252645135,1431655765,

%T 12884901891,73014444049,1095216660735,5519032976645,56294136361779,

%U 281479271743489,4222189076152335,23925738098196565

%N Trisection of A001317.

%C For n>=1, all terms are in A001969.

%C Or rows of triangle A008287 mod 2 converted to decimal.

%H Gheorghe Coserea, <a href="/A177882/b177882.txt">Table of n, a(n) for n = 0..200</a>

%F a(n) = A001317(3*n).

%t f[n_] := BitXor[n, BitShiftLeft[n, 1]]; Table[Nest[f, 1, x], {x, 0, 54, 3}]

%o (PARI)

%o a(n) = subst(lift(Pol(Mod([1, 1, 1, 1], 2), 'x)^n), 'x, 2);

%o vector(19, n, a(n-1)) \\ _Gheorghe Coserea_, Jun 12 2016

%o (Python)

%o def A177882(n): return sum((bool(~(3*n)&3*n-k)^1)<<k for k in range(3*n+1)) # _Chai Wah Wu_, May 02 2023

%Y Cf. A001317, A001969, A005190, A007318, A008287.

%K nonn

%O 0,2

%A _Vladimir Shevelev_, Dec 14 2010

%E Definition rewritten by _N. J. A. Sloane_, Jan 01 2011