login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

2-valuations of terms of A370606.
2

%I #14 Feb 23 2024 21:39:43

%S 0,1,2,4,5,6,8,9,12,13,16,18,19,20,21,22,25,26,27,30,31,33,36,37,39,

%T 41,42,43,44,45,46,47,48,50,52,55,56,57,59,60,63,66,67,68,69,70,71,75,

%U 77,78,81,82,85,86,87,88,89,92,93,94,95,96,98,99,100,103,104

%N 2-valuations of terms of A370606.

%H Chai Wah Wu, <a href="/A370607/b370607.txt">Table of n, a(n) for n = 1..2000</a>

%o (PARI) r=-1;forprime(p=2,10^12,v=valuation(p-1,2);if(v>r,print1(v,", ");r=v));

%o (Python)

%o from itertools import count, islice

%o from sympy import isprime

%o def A370607_gen(): # generator of terms

%o a = 1

%o while True:

%o for q in count(a,a):

%o if isprime(q+1):

%o yield (b:=q&-q).bit_length()-1

%o a = b<<1

%o break

%o A370607_list = list(islice(A370607_gen(),30)) # _Chai Wah Wu_, Feb 23 2024

%K nonn

%O 1,3

%A _Joerg Arndt_, Feb 23 2024

%E a(21)-a(67) from _Chai Wah Wu_, Feb 23 2024