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.

This page as a plain text file.
%I A286572 #8 May 26 2017 16:37:37
%S A286572 0,1,7,22,23,67,29,122,79,173,67,408,107,277,328,531,214,742,191,949,
%T A286572 530,631,277,1894,498,905,781,1598,467,2704,497,2149,1178,1600,1228,
%U A286572 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
%N 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.
%H A286572 Antti Karttunen, <a href="/A286572/b286572.txt">Table of n, a(n) for n = 1..10000</a>
%F A286572 a(n) = (1/2)*(2 + ((A053574(n)+A000203(n))^2) - A053574(n) - 3*A000203(n)).
%o A286572 (PARI)
%o A286572 A000203(n) = sigma(n);
%o A286572 A053574(n) = valuation(eulerphi(n), 2);
%o A286572 A286572(n) = (1/2)*(2 + ((A053574(n)+A000203(n))^2) - A053574(n) - 3*A000203(n));
%o A286572 (Scheme) (define (A286572 n) (* (/ 1 2) (+ (expt (+ (A053574 n) (A000203 n)) 2) (- (A053574 n)) (- (* 3 (A000203 n))) 2)))
%o A286572 (Python)
%o A286572 from sympy import totient, divisor_sigma
%o A286572 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
%o A286572 def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
%o A286572 def a(n): return T(a007814(totient(n)), divisor_sigma(n)) # _Indranil Ghosh_, May 26 2017
%Y A286572 Cf. A000010, A000027, A000203, A053574, A286360, A286460, A286568.
%K A286572 nonn
%O A286572 1,3
%A A286572 _Antti Karttunen_, May 26 2017