%I #41 Sep 08 2022 08:46:02
%S 1,1,7,5,31,21,127,85,511,341,2047,1365,8191,5461,32767,21845,131071,
%T 87381,524287,349525,2097151,1398101,8388607,5592405,33554431,
%U 22369621,134217727,89478485,536870911,357913941,2147483647,1431655765,8589934591,5726623061,34359738367,22906492245
%N Number of nonzero elements in GF(2^n) that are cubes.
%H Vincenzo Librandi, <a href="/A213243/b213243.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,5,0,-4).
%F a(n) = M / gcd( M, 3 ), where M=2^n-1.
%F Conjectures from _Colin Barker_, Aug 23 2014, verified by _Robert Israel_, Apr 22 2016: (Start)
%F a(n) = (-1)*((-2+(-1)^n)*(-1+2^n))/3.
%F a(n) = 5*a(n-2) - 4*a(n-4).
%F G.f.: x*(2*x^2+x+1) / ((x-1)*(x+1)*(2*x-1)*(2*x+1)). (End)
%F E.g.f.: (-1 + exp(x) - 2*exp(3*x) + 2*exp(4*x))*exp(-2*x)/3. - _Ilya Gutkovskiy_, Apr 22 2016
%p A213243:=n->(2^n-1)/gcd(2^n-1,3): seq(A213243(n), n=1..50); # _Wesley Ivan Hurt_, Aug 23 2014
%t Table[(2^n - 1)/GCD[2^n - 1, 3], {n, 50}] (* _Vincenzo Librandi_, Mar 16 2013 *)
%t LinearRecurrence[{0,5,0,-4},{1,1,7,5},40] (* _Harvey P. Dale_, Jan 05 2017 *)
%o (Magma) [(2^n - 1) / GCD (2^n - 1, 3): n in [1..40]]; // _Vincenzo Librandi_, Mar 16 2013
%o (PARI) a(n)=(2^n-1)/gcd(2^n-1,3) \\ _Edward Jiang_, Sep 04 2014
%Y Cf. A213244 (5th powers), A213245 (7th powers), A213246 (9th powers), A213247 (11th powers), A213248 (13th powers).
%K nonn
%O 1,3
%A _Joerg Arndt_, Jun 07 2012