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.

Original entry on oeis.org

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, 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, 1, 2, 1, 3, 1, 1, 2, 1, 6, 2, 3
Offset: 2

Views

Author

Keywords

Comments

a(n) = 1 if and only if A080378(n-1) = 2. - Robert Israel, Feb 07 2018

Crossrefs

Programs

  • Maple
    seq(padic:-ordp(ithprime(n)*ithprime(n-1)-1,2),n=2..200); # Robert Israel, Feb 07 2018
  • PARI
    a(n) = valuation(prime(n)*prime(n-1) - 1, 2); \\ Michel Marcus, Sep 30 2013
    
  • Python
    from sympy import prime
    def A023520(n): return (~(m:=prime(n)*prime(n-1)-1)& m-1).bit_length()    # Chai Wah Wu, Jul 07 2022

Formula

a(n) = A007814(A023515(n)). - Michel Marcus, Sep 30 2013

Extensions

Offset set to 2 and a(2) corrected by Michel Marcus, Sep 30 2013