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.

A385087 2-adic valuation of A039699.

Original entry on oeis.org

3, 3, 10, 3, 6, 8, 12, 3, 6, 6, 11, 8, 11, 12, 16, 3, 6, 6, 12, 6, 9, 13, 17, 8, 11, 11, 16, 12, 15, 16, 20, 3, 6, 6, 14, 6, 9, 11, 15, 6, 9, 9, 14, 13, 16, 17, 21, 8, 11, 11, 17, 11, 14, 17, 21, 12, 15, 15, 20, 16, 19, 20, 24, 3, 6, 6, 13, 6, 9, 11, 15, 6, 9, 9, 14, 11, 14, 15, 19, 6
Offset: 1

Views

Author

Michel Marcus, Jun 17 2025

Keywords

Crossrefs

Programs

  • PARI
    C=binomial;
    A002895(n) = sum(k=0, n, C(n, k)^2 * C(2*n-2*k, n-k) * C(2*k, k) );
    a(n) = hammingweight(n) + valuation(A002895(n), 2);
    
  • Python
    from math import comb
    def A385087(n): return (~(a:=(sum(comb(n,k)**2*comb(n-k<<1,n-k)*comb(m:=k<<1,k) for k in range(n+1>>1))<<1) + (0 if n&1 else comb(n,n>>1)**4)) & a-1).bit_length() + n.bit_count() # Chai Wah Wu, Jun 17 2025

Formula

a(n) = A007814(A039699(n)) = A000120(n) + A007814(A002895(n)).