login
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.
3
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, 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, 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
OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Pairing Function
FORMULA
a(1) = 0; for n > 1, a(n) = (1/2)*(2 + ((A286357(n)+A001511(n))^2) - A286357(n) - 3*A001511(n)).
PROG
(PARI)
A001511(n) = (1+valuation(n, 2));
A286357(n) = A001511(sigma(n));
A286451(n) = if(1==n, 0, (1/2)*(2 + ((A286357(n)+A001511(n))^2) - A286357(n) - 3*A001511(n)));
for(n=1, 10000, write("b286451.txt", n, " ", A286451(n)));
(Scheme) (define (A286451 n) (if (= 1 n) 0 (* (/ 1 2) (+ (expt (+ (A286357 n) (A001511 n)) 2) (- (A286357 n)) (- (* 3 (A001511 n))) 2))))
(Python)
from sympy import divisor_sigma as D
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def a001511(n): return bin(n)[2:][::-1].index("1") + 1
def a(n): return 0 if n==1 else T(a001511(D(n)), a001511(n)) # Indranil Ghosh, May 14 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 13 2017
STATUS
approved