login
A023528
Exponent of 2 in prime factorization of prime(n)*prime(n-1) + 1.
1
0, 0, 4, 2, 1, 4, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 3, 4, 3, 1, 6, 3, 1, 2, 1, 1, 2, 1, 4, 1, 4, 1, 2, 2, 3, 2, 2, 3, 1, 2, 3, 4, 2, 12, 1, 2, 1, 1, 1, 4, 1, 3, 8, 2, 2, 3, 2, 2, 2, 1, 2, 3, 5, 1, 6, 1, 5, 2, 2, 4, 1, 3, 1, 2, 3, 1, 2, 1, 1, 1
OFFSET
1,3
COMMENTS
Assumes the not generally accepted convention prime(0) = 1. - Michel Marcus, Jun 06 2019
LINKS
FORMULA
a(n) = A007814(A023523(n)). - Michel Marcus, Jun 06 2019
MATHEMATICA
Join[{0}, FactorInteger[#][[1, 2]]&/@(Times@@@Partition[Prime[Range[ 80]], 2, 1]+1)] (* Harvey P. Dale, Dec 25 2011 *)
PROG
(PARI) p(n) = if (n==0, 1, prime(n));
a(n) = valuation(p(n)*p(n-1) + 1, 2); \\ Michel Marcus, Jun 06 2019
(Magma) p:=PrimesUpTo(10000); sol:=[]; sol[1]:=0; for n in [2..80] do sol[n]:=Valuation(1+p[n]*p[n-1], 2); end for; sol; // Marius A. Burtea, Jun 06 2019
(Python)
from sympy import prime
def A023528(n): return 0 if n == 1 else (~(m:=prime(n)*prime(n-1)+1)& m-1).bit_length() # Chai Wah Wu, Jul 07 2022
CROSSREFS
Sequence in context: A010311 A346972 A326485 * A236308 A105698 A105699
KEYWORD
nonn
EXTENSIONS
a(1)=a(2)=0 corrected by Sean A. Irvine, Jun 05 2019
STATUS
approved