login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089389 Sum of the smallest and the largest nontrivial divisor of n or 0 if n is 1 or a prime. 1

%I

%S 0,0,0,4,0,5,0,6,6,7,0,8,0,9,8,10,0,11,0,12,10,13,0,14,10,15,12,16,0,

%T 17,0,18,14,19,12,20,0,21,16,22,0,23,0,24,18,25,0,26,14,27,20,28,0,29,

%U 16,30,22,31,0,32,0,33,24,34,18,35,0,36,26,37,0,38,0,39,28,40,18,41,0,42

%N Sum of the smallest and the largest nontrivial divisor of n or 0 if n is 1 or a prime.

%C The product of the smallest and the largest nontrivial divisor is n. a(2m) = m+2, m >1.

%H Antti Karttunen, <a href="/A089389/b089389.txt">Table of n, a(n) for n = 1..65537</a>

%F 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

%t Array[If[Or[# == 1, PrimeQ@ #], 0, #[[2]] + #[[-2]] &@ Divisors@ #] &, 80] (* _Michael De Vlieger_, Feb 25 2018 *)

%o (PARI)

%o A020639(n) = if(1==n,n,vecmin(factor(n)[, 1])); \\ From A020639.

%o A089389(n) = {my(spf=A020639(n)); if((1==n)||isprime(n),0,spf+(n/spf)); }; \\ _Antti Karttunen_, Feb 25 2018

%o (Scheme) (define (A089389 n) (if (or (= 1 n) (= 1 (A010051 n))) 0 (+ (A020639 n) (A032742 n)))) ;; _Antti Karttunen_, Feb 25 2018

%Y Cf. A020639, A032742.

%K easy,nonn

%O 1,4

%A _Amarnath Murthy_, Nov 10 2003

%E More terms from _David Wasserman_, Sep 15 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 19 04:39 EDT 2019. Contains 327187 sequences. (Running on oeis4.)