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.

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

This page as a plain text file.
%I A286259 #9 Feb 16 2025 08:33:44
%S A286259 1,2,1,6,4,5,11,25,16,23,37,31,56,57,56,110,106,80,137,123,137,173,
%T A286259 211,175,232,255,254,279,352,255,407,471,407,467,466,409,596,597,596,
%U A286259 599,742,597,821,783,742,905,991,866,1036,992,1082,1131,1276,1083,1276,1279,1379,1487,1597,1228,1712,1713,1597,1960,1831,1713,2081,2019,2081,1955,2347,1957
%N A286259 Compound filter: a(n) = P(A001511(n), A049820(n)), where P(n,k) is sequence A000027 used as a pairing function.
%H A286259 Antti Karttunen, <a href="/A286259/b286259.txt">Table of n, a(n) for n = 1..10000</a>
%H A286259 MathWorld, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F A286259 a(n) = (1/2)*(2 + ((A001511(n)+A049820(n))^2) - A001511(n) - 3*A049820(n)).
%o A286259 (PARI)
%o A286259 A001511(n) = (1+valuation(n,2));
%o A286259 A049820(n) = (n-numdiv(n));
%o A286259 A286259(n) = (2 + ((A001511(n)+A049820(n))^2) - A001511(n) - 3*A049820(n))/2;
%o A286259 for(n=1, 10000, write("b286259.txt", n, " ", A286259(n)));
%o A286259 (Scheme) (define (A286259 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A049820 n)) 2) (- (A001511 n)) (- (* 3 (A049820 n))) 2)))
%o A286259 (Python)
%o A286259 from sympy import divisor_count as d
%o A286259 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
%o A286259 def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
%o A286259 def a(n): return T(a001511(n), n - d(n)) # _Indranil Ghosh_, May 07 2017
%Y A286259 Cf. A000027, A001511, A049820, A286161, A286162, A286260, A286034.
%K A286259 nonn
%O A286259 1,2
%A A286259 _Antti Karttunen_, May 07 2017