OFFSET
1,2
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 & @@ {EulerPhi@ n, Module[{i = 1}, While[! CoprimeQ[Prime@ i, n], i++]; i]}, {n, 74}] (* Michael De Vlieger, May 04 2017 *)
PROG
(PARI)
A000010(n) = eulerphi(n);
A257993(n) = { for(i=1, n, if(n%prime(i), return(i))); }
for(n=1, 10000, write("b286144.txt", n, " ", A286144(n)));
(Scheme) (define (A286144 n) (* (/ 1 2) (+ (expt (+ (A000010 n) (A257993 n)) 2) (- (A000010 n)) (- (* 3 (A257993 n))) 2)))
(Python)
from sympy import prime, primepi, gcd, totient
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def a053669(n):
x=1
while True:
if gcd(prime(x), n) == 1: return prime(x)
else: x+=1
def a257993(n): return primepi(a053669(n))
def a(n): return T(totient(n), a257993(n)) # Indranil Ghosh, May 05 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 04 2017
STATUS
approved