OFFSET
1,2
COMMENTS
tau(a(n)) = tau(n) and tau(i) <> tau(n), n < i < a(n) (tau = A000005);
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
Sets of divisors for n=10,11,12,13 and 14: D(10)={1,2,5,10}, D(11)={1,11}, D(12)={1,2,3,4,6,12}, D(13)={1,13}, D(14)={1,2,7,14}: therefore a(10)=14 (#D(10)=#D(14)).
MATHEMATICA
a[1] = 1; a[n_] := Module[{m = n+1, d=DivisorSigma[0, n]}, While[DivisorSigma[0, m] != d, m++]; m]; Array[a, 100] (* Amiram Eldar, Feb 03 2020 *)
PROG
(PARI) a(n) = if (n==1, 1, my(m=n+1, nd=numdiv(n)); while(numdiv(m) != nd, m++); m); \\ Michel Marcus, Sep 14 2021
(Python)
from sympy import divisors
def a(n):
if n == 1: return 1
divisorsn, m = len(divisors(n)), n + 1
while len(divisors(m)) != divisorsn: m += 1
return m
print([a(n) for n in range(1, 72)]) # Michael S. Branicky, Sep 14 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 08 2003
STATUS
approved