OFFSET
1,1
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Pairing Function
MATHEMATICA
f[n_] := If[n == 1, 1, Times @@ MapIndexed[Prime[First[#2]]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]]]; Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {f@ n, f[n + DivisorSigma[0, n]]}, {n, 80}] (* Michael De Vlieger, May 21 2017 *)
PROG
(PARI)
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
(Scheme) (define (A286480 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A286479 n)) 2) (- (A046523 n)) (- (* 3 (A286479 n))) 2)))
(Python)
from sympy import factorint, divisor_count
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def P(n):
f = factorint(n)
return sorted([f[i] for i in f])
def a046523(n):
x=1
while True:
if P(n) == P(x): return x
else: x+=1
def a286479(n): return a046523(n + divisor_count(n))
def a(n): return T(a046523(n), a286479(n)) # Indranil Ghosh, May 21 2017
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Antti Karttunen, May 21 2017
STATUS
approved