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 A286356 #10 Feb 16 2025 08:33:44 %S A286356 0,2,5,7,9,23,14,29,12,31,20,80,27,40,31,121,35,80,44,94,40,50,54,302, %T A286356 18,61,38,109,65,499,77,497,50,73,40,668,90,86,61,328,104,532,119,125, %U A286356 94,100,135,1178,25,94,73,142,152,302,50,355,86,115,170,1894,189,131,109,2017,61,566,209,160,100,532,230,2630,252,148,94,179,50,601,275,1228,138 %N A286356 Compound filter: a(n) = P(A061395(n), A046523(n)), where P(n,k) is sequence A000027 used as a pairing function. %H A286356 Antti Karttunen, <a href="/A286356/b286356.txt">Table of n, a(n) for n = 1..10000</a> %H A286356 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a> %F A286356 a(n) = (1/2)*(2 + ((A061395(n)+A046523(n))^2) - A061395(n) - 3*A046523(n)). %o A286356 (PARI) %o A286356 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 A286356 A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1]))); \\ After _M. F. Hasler_'s code for A006530. %o A286356 A286356(n) = (2 + ((A061395(n)+A046523(n))^2) - A061395(n) - 3*A046523(n))/2; %o A286356 for(n=1, 10000, write("b286356.txt", n, " ", A286356(n))); %o A286356 (Scheme) (define (A286356 n) (* (/ 1 2) (+ (expt (+ (A061395 n) (A046523 n)) 2) (- (A061395 n)) (- (* 3 (A046523 n))) 2))) %o A286356 (Python) %o A286356 from sympy import factorint %o A286356 from operator import mul %o A286356 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2 %o A286356 def P(n): %o A286356 f = factorint(n) %o A286356 return sorted([f[i] for i in f]) %o A286356 def a046523(n): %o A286356 x=1 %o A286356 while True: %o A286356 if P(n) == P(x): return x %o A286356 else: x+=1 %o A286356 def a061395(n): return 0 if n == 1 else primepi(max(primefactors(n))) %o A286356 def a(n): return T(a061395(n), a046523(n)) # _Indranil Ghosh_, May 09 2017 %Y A286356 Cf. A000027, A046523, A061395, A286164. %K A286356 nonn %O A286356 1,2 %A A286356 _Antti Karttunen_, May 09 2017