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.

A286572 Compound filter (2-adic valuation of phi(n) & sigma(n)): a(n) = P(A053574(n), A000203(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

0, 1, 7, 22, 23, 67, 29, 122, 79, 173, 67, 408, 107, 277, 328, 531, 214, 742, 191, 949, 530, 631, 277, 1894, 498, 905, 781, 1598, 467, 2704, 497, 2149, 1178, 1600, 1228, 4188, 743, 1771, 1656, 4282, 949, 4658, 947, 3572, 3163, 2557, 1129, 8005, 1597, 4373, 2855, 4953, 1487, 7141, 2704, 7384, 3242, 4097, 1771, 14539, 1955, 4561, 5462, 8520, 3745
Offset: 1

Views

Author

Antti Karttunen, May 26 2017

Keywords

Crossrefs

Programs

  • PARI
    A000203(n) = sigma(n);
    A053574(n) = valuation(eulerphi(n), 2);
    A286572(n) = (1/2)*(2 + ((A053574(n)+A000203(n))^2) - A053574(n) - 3*A000203(n));
    
  • Python
    from sympy import totient, divisor_sigma
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a007814(totient(n)), divisor_sigma(n)) # Indranil Ghosh, May 26 2017
  • Scheme
    (define (A286572 n) (* (/ 1 2) (+ (expt (+ (A053574 n) (A000203 n)) 2) (- (A053574 n)) (- (* 3 (A000203 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A053574(n)+A000203(n))^2) - A053574(n) - 3*A000203(n)).