A023528 Exponent of 2 in prime factorization of prime(n)*prime(n-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
Keywords
Links
- Marius A. Burtea, Table of n, a(n) for n = 1..6001
Programs
-
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
-
Mathematica
Join[{0},FactorInteger[#][[1,2]]&/@(Times@@@Partition[Prime[Range[ 80]], 2,1]+1)] (* Harvey P. Dale, Dec 25 2011 *)
-
PARI
p(n) = if (n==0, 1, prime(n)); a(n) = valuation(p(n)*p(n-1) + 1, 2); \\ Michel Marcus, 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
Formula
Extensions
a(1)=a(2)=0 corrected by Sean A. Irvine, Jun 05 2019
Comments