OFFSET
1,1
EXAMPLE
For n=1, numdiv(3) = numdiv(5) = 2 = 2*1, and no number < 3 satisfies this, hence a(1) = 3.
MATHEMATICA
a={}; n=1; nmax=10; For[k=1, n<=nmax, k++, If[DivisorSigma[0, k] == DivisorSigma[0, k+2] == 2n, AppendTo[a, k]; k=1; n++]]; a (* Stefano Spezia, Aug 26 2022 *)
Flatten[Table[SequencePosition[DivisorSigma[0, Range[27*10^6]], {2n, _, 2n}, 1], {n, 10}], 1][[;; , 1]] (* The program generates the first 10 terms of the sequence. To generate more, increase the Range constant but the program will take a long time to run. *) (* Harvey P. Dale, Jul 01 2023 *)
PROG
(PARI) a(n)=for(k=1, +oo, if(numdiv(k)==2*n&&numdiv(k+2)==2*n, return(k)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-Marc Rebert, Aug 26 2022
EXTENSIONS
More terms from Jinyuan Wang, Aug 28 2022
STATUS
approved