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.

Showing 1-4 of 4 results.

A355303 a(n) is the smallest integer that has n normal undulating divisors.

Original entry on oeis.org

1, 2, 4, 6, 16, 12, 64, 24, 36, 48, 126, 60, 320, 144, 168, 120, 252, 180, 560, 240, 630, 420, 780, 360, 1890, 960, 1920, 720, 1560, 1080, 1260, 1440, 1680, 4368, 2160, 3240, 3120, 3360, 4320, 2520, 6300, 6120, 8640, 6240, 13104, 5040, 12480, 9360, 12240, 7560
Offset: 1

Views

Author

Bernard Schott, Jun 29 2022

Keywords

Comments

Normal undulating numbers are in A355301.
The first ten terms are the same as A005179, then A005179(11) = 1024 while a(11) = 126 (see example); also, a(n) = A005179(n) for n = 12, 16, 18, 20, 24 (up to n = 50).

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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

Extensions

Terms a(11) and beyond from Amiram Eldar, Jun 29 2022

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

A355595 Positions of records in A355593: Integers whose number of alternating divisors sets a new record.

Original entry on oeis.org

1, 2, 4, 6, 12, 24, 36, 72, 144, 180, 360, 504, 630, 1080, 1260, 1890, 2520, 3780, 7560, 15120, 18900, 22680, 30240, 37800, 45360, 75600, 90720, 151200, 162540, 226800, 317520, 325080, 650160, 763560, 1137780, 1243620, 1527120, 2275560, 3054240, 3738420, 4551120, 6826680, 7476840, 14953680, 17445960, 21818160, 26168940, 36363600, 43636320, 52337880
Offset: 1

Views

Author

Bernard Schott, Jul 08 2022

Keywords

Comments

Alternating integers are in A030141.
Corresponding records of number of alternating divisors are 1, 2, 3, 4, 6, 7, 9, 11, ...

Examples

			a(6) = 24 is in the sequence because A355593(24) = 7 is larger than any earlier value in A355593.
		

Crossrefs

Similar, but with undulating divisors: A355304.

Programs

  • Mathematica
    q[n_] := ! MemberQ[Differences[Mod[IntegerDigits[n], 2]], 0]; f[n_] := DivisorSum[n, 1 &, q[#] &]; fm = 0; s = {}; Do[fn = f[n]; If[fn > fm, fm = fn; AppendTo[s, n]], {n, 1, 10^5}]; s (* Amiram Eldar, Jul 08 2022 *)

Extensions

a(21)-a(36) from Amiram Eldar, Jul 08 2022
a(37)-a(50) from Charles R Greathouse IV, Jul 08 2022

A355301 Normal undulating numbers where "undulating" means that the alternate digits go up and down (or down and up) and "normal" means that the absolute differences between two adjacent digits may differ.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 101, 102, 103, 104, 105, 106, 107, 108, 109, 120, 121, 130, 131, 132, 140, 141, 142, 143, 150
Offset: 1

Views

Author

Bernard Schott, Jun 27 2022

Keywords

Comments

This definition comes from Patrick De Geest's link.
Other definitions for undulating are present in the OEIS (e.g., A033619, A046075).
When the absolute differences between two adjacent digits are always equal (e.g., 85858), these numbers are called smoothly undulating numbers and form a subsequence (A046075).
The definition includes the trivial 1- and 2-digit undulating numbers.
Subsequence of A043096 where the first different term is A043096(103) = 123 while a(103) = 130.
This sequence first differs from A010784 at a(92) = 101, A010784(92) = 102.
The sequence differs from A160542 (which contains 100). - R. J. Mathar, Aug 05 2022

Examples

			111 is not a term here, but A033619(102) = 111.
a(93) = 102, but 102 is not a term of A046075.
Some terms: 5276, 918230, 1053837, 263915847, 3636363636363636.
Are not terms: 1331, 594571652, 824327182.
		

Crossrefs

Cf. A059168 (subsequence of primes).
Differs from A010784, A241157, A241158.

Programs

  • Maple
    isA355301 := proc(n)
        local dgs,i,back,forw ;
        dgs := convert(n,base,10) ;
        if nops(dgs) < 2 then
            return true;
        end if;
        for i from 2 to nops(dgs)-1 do
            back := op(i,dgs) -op(i-1,dgs) ;
            forw := op(i+1,dgs) -op(i,dgs) ;
            if back*forw >= 0 then
                return false;
            end if ;
        end do:
        back := op(-1,dgs) -op(-2,dgs) ;
        if back = 0 then
            return false;
        end if ;
        return true ;
    end proc:
    A355301 := proc(n)
        option remember ;
        if n = 1 then
            0;
        else
            for a from procname(n-1)+1 do
                if isA355301(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A355301(n),n=1..110) ; # R. J. Mathar, Aug 05 2022
  • Mathematica
    q[n_] := AllTrue[(s = Sign[Differences[IntegerDigits[n]]]), # != 0 &] && AllTrue[Differences[s], # != 0 &]; Select[Range[0, 100], q] (* Amiram Eldar, Jun 28 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; \\ Michel Marcus, Jun 30 2022
Showing 1-4 of 4 results.