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.
%I A286163 #13 Feb 16 2025 08:33:44 %S A286163 2,5,12,14,23,42,38,44,40,61,80,117,80,84,216,152,23,148,80,148,601, %T A286163 142,302,375,109,142,911,183,302,1020,530,560,61,61,142,856,467,142, %U A286163 412,430,467,1741,1832,265,2497,412,1178,1323,109,265,826,265,1832,1735,2932,489,412,412,2630,2835,1178,672,2787,2144,61,625,80,148,601,850,302,2998,467,601 %N A286163 Compound filter: a(n) = T(A046523(n), A278222(n)), where T(n,k) is sequence A000027 used as a pairing function. %H A286163 Antti Karttunen, <a href="/A286163/b286163.txt">Table of n, a(n) for n = 1..10000</a> %H A286163 MathWorld, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a> %F A286163 a(n) = (1/2)*(2 + ((A046523(n)+A278222(n))^2) - A046523(n) - 3*A278222(n)). %o A286163 (PARI) %o A286163 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of _M. F. Hasler_ %o A286163 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from _Charles R Greathouse IV_, Aug 17 2011 %o A286163 A278222(n) = A046523(A005940(1+n)); %o A286163 A286163(n) = (2 + ((A046523(n)+A278222(n))^2) - A046523(n) - 3*A278222(n))/2; %o A286163 for(n=1, 10000, write("b286163.txt", n, " ", A286163(n))); %o A286163 (Scheme) (define (A286163 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A278222 n)) 2) (- (A046523 n)) (- (* 3 (A278222 n))) 2))) %o A286163 (Python) %o A286163 from sympy import prime, factorint %o A286163 import math %o A286163 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2 %o A286163 def A(n): return n - 2**int(math.floor(math.log(n, 2))) %o A286163 def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n)) %o A286163 def a005940(n): return b(n - 1) %o A286163 def P(n): %o A286163 f = factorint(n) %o A286163 return sorted([f[i] for i in f]) %o A286163 def a046523(n): %o A286163 x=1 %o A286163 while True: %o A286163 if P(n) == P(x): return x %o A286163 else: x+=1 %o A286163 def a278222(n): return a046523(a005940(n + 1)) %o A286163 def a(n): return T(a046523(n), a278222(n)) # _Indranil Ghosh_, May 05 2017 %Y A286163 Cf. A000027, A046523, A278222, A286160, A286161, A286162, A286164. %K A286163 nonn %O A286163 1,1 %A A286163 _Antti Karttunen_, May 04 2017