cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A355302 a(n) is the number of normal undulating integers that divide n.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Bernard Schott, Jun 29 2022

Keywords

Comments

Normal undulating integers are in A355301.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • 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) = sumdiv(n, d, isok(d)); \\ Michel Marcus, Jun 30 2022