login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Compound filter: a(n) = T(A055396(n), A000010(n)), where T(n,k) is sequence A000027 used as a pairing function.
5

%I #10 May 05 2017 23:59:27

%S 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 234,67,173,67,676,29,791,121,212,121,328,67,1093,154,302,121,1339,67,

%U 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 Compound filter: a(n) = T(A055396(n), A000010(n)), where T(n,k) is sequence A000027 used as a pairing function.

%H Antti Karttunen, <a href="/A286154/b286154.txt">Table of n, a(n) for n = 1..10000</a>

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

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

%t 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 (PARI)

%o A000010(n) = eulerphi(n);

%o A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from _Charles R Greathouse IV_, Apr 23 2015

%o A286154(n) = (2 + ((A055396(n)+A000010(n))^2) - A055396(n) - 3*A000010(n))/2;

%o for(n=1, 10000, write("b286154.txt", n, " ", A286154(n)));

%o (Scheme) (define (A286154 n) (* (/ 1 2) (+ (expt (+ (A055396 n) (A000010 n)) 2) (- (A055396 n)) (- (* 3 (A000010 n))) 2)))

%o (Python)

%o from sympy import primepi, isprime, primefactors, totient

%o def a049084(n): return primepi(n)*(1*isprime(n))

%o def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))

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

%o def a(n): return T(a055396(n), totient(n)) # _Indranil Ghosh_, May 05 2017

%Y Cf. A000010, A000027, A055396, A286142, A286143, A286144, A286152, A286160, A286161, A286162, A286163, A286164.

%K nonn

%O 1,3

%A _Antti Karttunen_, May 04 2017