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.

A286259 Compound filter: a(n) = P(A001511(n), A049820(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 1, 6, 4, 5, 11, 25, 16, 23, 37, 31, 56, 57, 56, 110, 106, 80, 137, 123, 137, 173, 211, 175, 232, 255, 254, 279, 352, 255, 407, 471, 407, 467, 466, 409, 596, 597, 596, 599, 742, 597, 821, 783, 742, 905, 991, 866, 1036, 992, 1082, 1131, 1276, 1083, 1276, 1279, 1379, 1487, 1597, 1228, 1712, 1713, 1597, 1960, 1831, 1713, 2081, 2019, 2081, 1955, 2347, 1957
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A049820(n) = (n-numdiv(n));
    A286259(n) = (2 + ((A001511(n)+A049820(n))^2) - A001511(n) - 3*A049820(n))/2;
    for(n=1, 10000, write("b286259.txt", n, " ", A286259(n)));
    
  • Python
    from sympy import divisor_count as d
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n), n - d(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286259 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A049820 n)) 2) (- (A001511 n)) (- (* 3 (A049820 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A001511(n)+A049820(n))^2) - A001511(n) - 3*A049820(n)).