OFFSET
1,2
COMMENTS
LINKS
David A. Corneth, Table of n, a(n) for n = 1..402
EXAMPLE
16 has 5 divisors: {1, 2, 4, 8, 16}, all of which are normal undulating integers; no positive integer smaller than 16 has five normal undulating divisors, hence a(5) = 16.
126 has 12 divisors: {1, 2, 3, 6, 7, 9, 14, 18, 21, 42, 63, 126}; only 126 is not normal undulating; no positive integer smaller than 126 has eleven normal undulating divisors, hence a(11) = 126.
MATHEMATICA
nuQ[n_] := AllTrue[(s = Sign[Differences[IntegerDigits[n]]]), # != 0 &] && AllTrue[Differences[s], # != 0 &]; f[n_] := DivisorSum[n, 1 &, nuQ[#] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[50, 10^5] (* Amiram Eldar, Jun 29 2022 *)
PROG
(PARI) isok(m) = if (m<10, return(1)); my(d=digits(m), dd = vector(#d-1, k, sign(d[k+1]-d[k]))); if (#select(x->(x==0), dd), return(0)); my(pdd = vector(#dd-1, k, dd[k+1]*dd[k])); #select(x->(x>0), pdd) == 0; \\ A355301
a(n) = my(k=1); while (sumdiv(k, d, isok(d)) != n, k++); k; \\ Michel Marcus, Jun 30 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jun 29 2022
EXTENSIONS
Terms a(11) and beyond from Amiram Eldar, Jun 29 2022
STATUS
approved