%I #21 Jul 23 2021 02:08:16
%S 8,32,56,64,96,128,144,155,170,176,192,196,204,215,221,224,238,248,
%T 255,256,272,288,320,322,336,341,352,368,372,374,384,432,448,465,476,
%U 496,510,512,527,544,574,576,608,612,623,635,640,644,645,658,663,672,682,697,704,714,731,736,744
%N Numbers k such that A276976(k) > A270096(k).
%C Odd terms are 155, 215, 221, 255, 341, 465, 527, 623, 635, 645, 663, ...
%C These odd terms are odd numbers k such that (k mod A002322(k)) > (k mod A002326((k-1)/2)). - _Amiram Eldar_ and _Thomas Ordowski_, Nov 28 2019
%H Robert Israel, <a href="/A290960/b290960.txt">Table of n, a(n) for n = 1..10000</a>
%e 8 is a term because A276976(8) = 4 while A270096(8) = 3.
%p A270096:= proc(n) local d, b, t, m, c;
%p d:= padic:-ordp(n, 2);
%p b:= n/2^d;
%p t:= 2 &^ n mod n;
%p m:= numtheory:-mlog(t, 2, b, c);
%p if m < d then m:= m + c*ceil((d-m)/c) fi;
%p m
%p end proc:
%p A270096(1):= 0:
%p A276976:= proc(n) local lambda;
%p lambda:= numtheory:-lambda(n);
%p if n mod lambda = 0 then lambda
%p elif n mod 8 = 0 and (n-2) mod lambda = 0 then lambda+2
%p else n mod lambda
%p fi
%p end proc:
%p A276976(1):= 0:
%p A276976(8):= 4:
%p A276976(24):= 4:
%p select(n -> A276976(n) > A270096(n), [$1..1000]); # _Robert Israel_, Aug 16 2017
%t With[{nn = 750}, Select[Range@ nn, Function[n, SelectFirst[Range[nn/4 + 10], Function[m, AllTrue[Range[2, n - 1], PowerMod[#, m , n] == PowerMod[#, n , n] &]]] > SelectFirst[Range[nn/4 + 10], PowerMod[2, n, n] == PowerMod[2, #, n] &]]]] (* _Michael De Vlieger_, Aug 15 2017 *)
%Y Cf. A002322, A002326, A270096, A276976.
%K nonn
%O 1,1
%A _Altug Alkan_, Aug 15 2017, following a suggestion from _N. J. A. Sloane_