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 A286154 #11 Feb 16 2025 08:33:44 %S A286154 0,1,5,2,18,2,40,7,23,7,96,7,142,16,38,29,238,16,308,29,80,46,444,29, %T A286154 234,67,173,67,676,29,791,121,212,121,328,67,1093,154,302,121,1339,67, %U A286154 1499,191,302,232,1785,121,994,191,530,277,2227,154,864,277,668,379,2718,121,2944,436,668,497,1228,191,3505,497,992,277,3936,277,4207,631,822,631 %N A286154 Compound filter: a(n) = T(A055396(n), A000010(n)), where T(n,k) is sequence A000027 used as a pairing function. %H A286154 Antti Karttunen, <a href="/A286154/b286154.txt">Table of n, a(n) for n = 1..10000</a> %H A286154 MathWorld, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a> %F A286154 a(n) = (1/2)*(2 + ((A055396(n)+A000010(n))^2) - A055396(n) - 3*A000010(n)). %t A286154 Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {If[n == 1, 0, PrimePi[ FactorInteger[n][[1, 1]] ]], EulerPhi@ n}, {n, 76}] (* _Michael De Vlieger_, May 04 2017 *) %o A286154 (PARI) %o A286154 A000010(n) = eulerphi(n); %o A286154 A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from _Charles R Greathouse IV_, Apr 23 2015 %o A286154 A286154(n) = (2 + ((A055396(n)+A000010(n))^2) - A055396(n) - 3*A000010(n))/2; %o A286154 for(n=1, 10000, write("b286154.txt", n, " ", A286154(n))); %o A286154 (Scheme) (define (A286154 n) (* (/ 1 2) (+ (expt (+ (A055396 n) (A000010 n)) 2) (- (A055396 n)) (- (* 3 (A000010 n))) 2))) %o A286154 (Python) %o A286154 from sympy import primepi, isprime, primefactors, totient %o A286154 def a049084(n): return primepi(n)*(1*isprime(n)) %o A286154 def a055396(n): return 0 if n==1 else a049084(min(primefactors(n))) %o A286154 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2 %o A286154 def a(n): return T(a055396(n), totient(n)) # _Indranil Ghosh_, May 05 2017 %Y A286154 Cf. A000010, A000027, A055396, A286142, A286143, A286144, A286152, A286160, A286161, A286162, A286163, A286164. %K A286154 nonn %O A286154 1,3 %A A286154 _Antti Karttunen_, May 04 2017