%I #40 Mar 27 2023 10:44:54
%S 3,5,17,97,193,257,641,769,12289,18433,40961,65537,114689,147457,
%T 163841,786433,1179649,5767169,7340033,13631489,23068673,167772161,
%U 469762049,2013265921,2281701377,3221225473,3489660929,12348030977,77309411329,206158430209,2061584302081,2748779069441
%N Primes p such that the odd part of p - 1 is upper-bounded by the dyadic valuation of p - 1.
%C Primes of the form k*2^m + 1 where k <= m and k is odd. - _David A. Corneth_, Mar 03 2023
%C Primes prime(k) such that A057023(k) <= A023506(k). - _Michel Marcus_, Mar 09 2023
%e 3 is a term because the odd part of 2 is 1, the dyadic valuation of 2 is 1 and 1 <= 1.
%e 641 = 5*2^7 + 1 is a term because the odd part of 640 is 5, the dyadic valuation of 640 is 7 and 5 <= 7.
%p # Maple program due to _David A. Corneth_, Mar 03 2023
%p aList := proc(upto)
%p local i, j, p, R:
%p R := {}:
%p for i from 1 to ilog2(upto) do
%p for j from 1 to min(i, floor(upto/2^i)) do
%p p := j*2^i+1:
%p if isprime(p) then R := `union`(R, {p}): fi: od: od:
%p R: end:
%p aList(10^12);
%o (PARI) isok(p) = if (isprime(p), my(m=valuation(p-1,2)); (p-1)/2^m <= m); \\ _Michel Marcus_, Mar 03 2023
%o (PARI) upto(n) = {my(res = List()); for(i = 1, logint(n, 2), forstep(j = 1, min(i, n>>i), 2, if(isprime((j<<i) + 1), listput(res, (j<<i) + 1) ) ) ); Set(res) } \\ _David A. Corneth_, Mar 03 2023
%Y Cf. A000040 (primes), A000265 (odd part), A007814 (dyadic valuation).
%Y Cf. A057023, A023506.
%K nonn
%O 1,1
%A _Lorenzo Sauras Altuzarra_, Mar 03 2023
%E a(17)..a(27) from _Michel Marcus_, Mar 03 2023
%E More terms from _David A. Corneth_, Mar 03 2023