cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A023520 Exponent of 2 in prime factorization of prime(n)*prime(n-1) - 1.

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