OFFSET
1,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
MathWorld, Pairing Function
MATHEMATICA
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 *)
PROG
(PARI)
A000010(n) = eulerphi(n);
A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from Charles R Greathouse IV, Apr 23 2015
for(n=1, 10000, write("b286154.txt", n, " ", A286154(n)));
(Scheme) (define (A286154 n) (* (/ 1 2) (+ (expt (+ (A055396 n) (A000010 n)) 2) (- (A055396 n)) (- (* 3 (A000010 n))) 2)))
(Python)
from sympy import primepi, isprime, primefactors, totient
def a049084(n): return primepi(n)*(1*isprime(n))
def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def a(n): return T(a055396(n), totient(n)) # Indranil Ghosh, May 05 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 04 2017
STATUS
approved