Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Jul 07 2022 16:20:28
%S 1,2,2,3,2,4,2,4,3,4,1,6,2,4,4,5,2,6,2,6,4,2,2,8,3,4,4,6,2,8,2,6,2,4,
%T 4,9,2,4,4,8,2,8,2,3,6,4,2,10,3,6,4,6,2,8,2,8,4,4,2,12,2,4,6,7,4,4,2,
%U 6,4,8,2,12,2,4,6,6,2,8,2,10,5,4,2,12,4,4,4,4,2,12,4,6,4,4,4,12,2,6,3,8
%N a(n) is the number of normal undulating integers that divide n.
%C Normal undulating integers are in A355301.
%e 44 has 6 divisors: {1, 2, 4, 11, 22, 44} of which 3 are not normal undulating integers: {11, 22, 44}, hence a(44) = 6 - 3 = 3.
%t nuQ[n_] := AllTrue[(s = Sign[Differences[IntegerDigits[n]]]), # != 0 &] && AllTrue[Differences[s], # != 0 &]; a[n_] := DivisorSum[n, 1 &, nuQ[#] &]; Array[a, 100] (* _Amiram Eldar_, Jun 29 2022 *)
%o (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
%o a(n) = sumdiv(n, d, isok(d)); \\ _Michel Marcus_, Jun 30 2022
%Y Cf. A355301, A355303, A355304.
%K nonn,base
%O 1,2
%A _Bernard Schott_, Jun 29 2022