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”).
%I #16 Jul 07 2022 16:18:37
%S 0,1,1,2,1,2,1,2,1,1,1,2,1,2,1,1,1,1,2,1,1,2,1,3,2,1,2,1,2,1,2,1,1,1,
%T 1,1,1,2,1,1,1,1,1,2,1,2,2,2,1,2,1,1,1,1,1,1,1,1,2,1,1,1,2,1,2,1,1,1,
%U 1,2,1,3,1,1,2,1,6,2,3
%N Exponent of 2 in prime factorization of prime(n)*prime(n-1) - 1.
%C a(n) = 1 if and only if A080378(n-1) = 2. - _Robert Israel_, Feb 07 2018
%H Robert Israel, <a href="/A023520/b023520.txt">Table of n, a(n) for n = 2..10000</a>
%F a(n) = A007814(A023515(n)). - _Michel Marcus_, Sep 30 2013
%p seq(padic:-ordp(ithprime(n)*ithprime(n-1)-1,2),n=2..200); # _Robert Israel_, Feb 07 2018
%o (PARI) a(n) = valuation(prime(n)*prime(n-1) - 1, 2); \\ _Michel Marcus_, Sep 30 2013
%o (Python)
%o from sympy import prime
%o def A023520(n): return (~(m:=prime(n)*prime(n-1)-1)& m-1).bit_length() # _Chai Wah Wu_, Jul 07 2022
%Y Cf. A007814, A023515, A080378.
%K nonn
%O 2,4
%A _Clark Kimberling_
%E Offset set to 2 and a(2) corrected by _Michel Marcus_, Sep 30 2013