OFFSET
1,4
COMMENTS
The product of the smallest and the largest nontrivial divisor is n. a(2m) = m+2, m >1.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
a(1) = 0, for n > 1, if n is prime, a(n) = 0, otherwise a(n) = A020639(n) + A032742(n). - Antti Karttunen, Feb 25 2018
MATHEMATICA
Array[If[Or[# == 1, PrimeQ@ #], 0, #[[2]] + #[[-2]] &@ Divisors@ #] &, 80] (* Michael De Vlieger, Feb 25 2018 *)
PROG
(PARI)
A089389(n) = {my(spf=A020639(n)); if((1==n)||isprime(n), 0, spf+(n/spf)); }; \\ Antti Karttunen, Feb 25 2018
(Scheme) (define (A089389 n) (if (or (= 1 n) (= 1 (A010051 n))) 0 (+ (A020639 n) (A032742 n)))) ;; Antti Karttunen, Feb 25 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Nov 10 2003
EXTENSIONS
More terms from David Wasserman, Sep 15 2005
STATUS
approved