%I #25 Aug 03 2023 03:45:23
%S 3,3,3,27,287,287,287,287,783,783,783,19099,20249,34391,80577,92589,
%T 211183,211183,211183,1995137,4270443,4270443,4270443,4270443,
%U 17026791,317108969,317108969,317108969,979104339,979104339,6044000725,21911775681,21911775681,26576734759
%N a(n) is the minimal odd evil k, such that k^i, i=1,2,...,n, all are evil, and a(n)=0, if there is no such k.
%C We conjecture that a(n)>0 for all n.
%H Vladimir Shevelev, <a href="http://list.seqfan.eu/oldermail/seqfan/2013-October/author.html">"Odious-evil stability" of integers</a>, post to the SeqFan Mailing List, Oct 20 2013.
%t fQ[n_] := EvenQ[DigitCount[n, 2,1]]; a[n_] := Module[{k=3}, While[ LengthWhile[ Range[n], fQ[k^#] &] != n, k+=2]; k]; Array[a, 12] (* _Amiram Eldar_, Dec 10 2018 *)
%o (PARI) isevil(n) = (hammingweight(n) % 2) == 0; \\ A000069
%o isok(k, n) = {if (!isevil(k), return (0)); for (i=1, n, if (!isevil(k^i), return (0));); return (1);}
%o a(n) = {my(k=1); while(!isok(k,n), k += 2); k;}
%Y Cf. A000069, A001969, A230454.
%K nonn,base
%O 1,1
%A _Vladimir Shevelev_ and _Peter J. C. Moses_, Oct 21 2013
%E a(26) from _Michel Marcus_, Dec 10 2018
%E a(27)-a(34) from _Amiram Eldar_, Aug 03 2023
|