login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the sum of n and the largest proper divisor of n.
2

%I #36 Oct 29 2020 01:54:10

%S 3,4,6,6,9,8,12,12,15,12,18,14,21,20,24,18,27,20,30,28,33,24,36,30,39,

%T 36,42,30,45,32,48,44,51,42,54,38,57,52,60,42,63,44,66,60,69,48,72,56,

%U 75,68,78,54,81,66,84,76,87,60,90,62,93,84,96,78,99,68

%N a(n) is the sum of n and the largest proper divisor of n.

%C Contains no primes except for a(2)=3. Contains every number of the form p+1 for prime p (that is, every element of A008864). Contains no powers of 2 except those one more than a Mersenne prime.

%H Robert Israel, <a href="/A338281/b338281.txt">Table of n, a(n) for n = 2..10000</a>

%F a(n) = n + A032742(n).

%F a(2*n) = A008585(n).

%e For n=2, a(n) = 2+1 = 3.

%e For n=6, a(n) = 6+3 = 9.

%p f:= n -> n *(1+1/min(numtheory:-factorset(n))):

%p map(f, [$2..100]); # _Robert Israel_, Oct 28 2020

%t a[n_] := n + n/FactorInteger[n][[1, 1]]; Array[a, 100, 2] (* _Amiram Eldar_, Oct 21 2020 *)

%o (Python)

%o def a(n):

%o if(n<4):

%o return 1+n

%o i=2

%o while (n%i!=0):

%o if i*i>n:

%o return 1+n

%o i+=1

%o return (n//i)+n

%Y Cf. A008585 (3*n), A008864, A032742.

%Y Equals A166250(n) + 1.

%K nonn

%O 2,1

%A _Allen G. Liu_, Oct 21 2020