login

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

Smallest solution m to (n+1)*phi(m) = n*sigma(m), or -1 if no solution exists.
3

%I #28 Aug 12 2024 12:02:32

%S 3,5,7,323,11,13,899,17,19,1763,23,5249,3239,29,31,979801,5459,37,

%T 10763,41,43,9179,47,9701,10403,53,12319,5646547,59,61,24569,19109,67,

%U 19043,71,73,22499,50819,79,41309,83,32639,46979,89,34579,39059,125969

%N Smallest solution m to (n+1)*phi(m) = n*sigma(m), or -1 if no solution exists.

%C If p = a(n) is a prime solution, then (n+1)*(p-1) = n*(p+1) and p = 2n+1, so position for p if it is in fact a minimal solution is at n = (p-1)/2. E.g. 29 appears at 14th position shown by A005097. On the other hand large and (seemingly always composite) solutions arise at indices shown essentially by A047845. Also, differences between the sites of two consecutive small prime solutions appears to be d/2, half the difference between consecutive primes (A001223).

%H Donovan Johnson, <a href="/A065824/b065824.txt">Table of n, a(n) for n = 1..456</a>

%F (n+1)*A000010(a(n)) = n*A000203(a(n)), smallest x=a(n) solutions.

%t max = 10^7; a[n_] := For[m = 3, m <= max, m++, If[(n+1)*EulerPhi[m] == n*DivisorSigma[1, m], Print[m]; Return[m]]] /. Null -> -1; Array[a, 50] (* _Jean-François Alcover_, Oct 08 2016 *)

%o (Python)

%o from itertools import count

%o from math import prod

%o from sympy import factorint

%o def A065824(n):

%o for m in count(1):

%o f = factorint(m)

%o if (n+1)*m*prod((p-1)**2 for p in f)==n*prod(p**(e+2)-p for p,e in f.items()):

%o return m # _Chai Wah Wu_, Aug 12 2024

%Y Cf. A000010, A000203, A062699, A065818, A065819, A065822, A065823.

%Y See also A005097, A047845, A014076, A001223.

%K nice,nonn

%O 1,1

%A _Labos Elemer_, Nov 23 2001