OFFSET
1,1
COMMENTS
First differs from A080372(n) + 1 for n = 17, where a(17) = 2424833, whereas A080372(17) + 1 = 2162689. - Hugo Pfoertner, Jan 26 2021
FORMULA
tau(a(n) - 1) = 2*n.
EXAMPLE
a(4) = 31 because 31 is the smallest prime p such that p - 1 has 2*4 divisors; tau(30) = 8.
MATHEMATICA
a={}; For[n=1, n<=40, n++, i=1; While[DivisorSigma[0, Prime[i]-1]!=2n, i++]; AppendTo[a, Prime[i]]]; a (* Stefano Spezia, Jan 25 2021 *)
PROG
(Magma) Ax:=func<n|exists(r){m:m in[2..10^7] | IsPrime(m) and #Divisors(m - 1) eq n*#Divisors(m)}select r else 0>; [Ax(n): n in[1..20]]
(PARI) a(n) = my(p=2); while(numdiv(p-1) != 2*n, p=nextprime(p+1)); p; \\ Michel Marcus, Jan 25 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Jan 24 2021
STATUS
approved