OFFSET
1,3
COMMENTS
Assumes the not generally accepted convention prime(0) = 1. - Michel Marcus, Jun 06 2019
LINKS
Marius A. Burtea, Table of n, a(n) for n = 1..6001
FORMULA
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
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(1)=a(2)=0 corrected by Sean A. Irvine, Jun 05 2019
STATUS
approved