login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A286260 Compound filter: a(n) = P(A001511(n), A161942(n)), where P(n,k) is sequence A000027 used as a pairing function. 7

%I #8 May 07 2017 21:34:48

%S 1,8,1,39,4,8,1,157,79,47,4,39,22,8,4,600,37,782,11,256,1,47,4,157,

%T 466,233,11,39,106,47,1,2284,4,380,4,4281,172,122,22,1132,211,8,56,

%U 256,742,47,4,600,1597,4373,37,1278,352,122,37,157,11,1037,106,256,466,8,79,8785,211,47,137,2083,4,47,37,19507,667,1655,466,669,4,233,11,4661,7261

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

%H Antti Karttunen, <a href="/A286260/b286260.txt">Table of n, a(n) for n = 1..16384</a>

%H MathWorld, <a href="http://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>

%F a(n) = (1/2)*(2 + ((A001511(n)+A161942(n))^2) - A001511(n) - 3*A161942(n)).

%o (PARI)

%o A001511(n) = (1+valuation(n,2));

%o A000265(n) = (n >> valuation(n, 2));

%o A161942(n) = A000265(sigma(n));

%o A286260(n) = (2 + ((A001511(n)+A161942(n))^2) - A001511(n) - 3*A161942(n))/2;

%o for(n=1, 16384, write("b286260.txt", n, " ", A286260(n)));

%o (Scheme) (define (A286260 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A161942 n)) 2) (- (A001511 n)) (- (* 3 (A161942 n))) 2)))

%o (Python)

%o from sympy import factorint, divisors, divisor_sigma

%o def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2

%o def a000265(n): return max(list(filter(lambda i: i%2 == 1, divisors(n))))

%o def a161942(n): return a000265(divisor_sigma(n))

%o def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")

%o def a(n): return T(a001511(n), a161942(n)) # _Indranil Ghosh_, May 07 2017

%Y Cf. A000027, A001511, A161942, A286161, A286162, A286259, A286034.

%K nonn

%O 1,2

%A _Antti Karttunen_, May 07 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 11:07 EDT 2024. Contains 371905 sequences. (Running on oeis4.)