# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a286451 Showing 1-1 of 1 %I A286451 #8 May 14 2017 15:54:45 %S A286451 0,2,6,4,3,9,10,7,1,5,6,13,3,14,10,11,3,2,6,8,21,9,10,18,1,5,10,19,3, %T A286451 14,21,16,15,5,15,4,3,9,10,12,3,27,6,13,3,14,15,24,1,2,10,8,3,14,10, %U A286451 25,15,5,6,19,3,27,10,22,6,20,6,8,21,20,10,7,3,5,6,13,21,14,15,17,1,5,6,34,6,9,10,18,3,5,15,19,36,20,10,31,3,2,6,4,3,14,10 %N A286451 Compound filter (2-adic valuation of sigma(n) & 2-adic valuation of n): a(n) = P(A286357(n), A001511(n)), where P(n,k) is sequence A000027 used as a pairing function, with a(1) = 0 by an explicit convention. %H A286451 Antti Karttunen, Table of n, a(n) for n = 1..10000 %H A286451 Eric Weisstein's World of Mathematics, Pairing Function %F A286451 a(1) = 0; for n > 1, a(n) = (1/2)*(2 + ((A286357(n)+A001511(n))^2) - A286357(n) - 3*A001511(n)). %o A286451 (PARI) %o A286451 A001511(n) = (1+valuation(n,2)); %o A286451 A286357(n) = A001511(sigma(n)); %o A286451 A286451(n) = if(1==n,0,(1/2)*(2 + ((A286357(n)+A001511(n))^2) - A286357(n) - 3*A001511(n))); %o A286451 for(n=1, 10000, write("b286451.txt", n, " ", A286451(n))); %o A286451 (Scheme) (define (A286451 n) (if (= 1 n) 0 (* (/ 1 2) (+ (expt (+ (A286357 n) (A001511 n)) 2) (- (A286357 n)) (- (* 3 (A001511 n))) 2)))) %o A286451 (Python) %o A286451 from sympy import divisor_sigma as D %o A286451 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2 %o A286451 def a001511(n): return bin(n)[2:][::-1].index("1") + 1 %o A286451 def a(n): return 0 if n==1 else T(a001511(D(n)), a001511(n)) # _Indranil Ghosh_, May 14 2017 %Y A286451 Cf. A000027, A001511, A286357, A286260, A286358. %K A286451 nonn %O A286451 1,2 %A A286451 _Antti Karttunen_, May 13 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE