Displaying 1-10 of 11 results found.
a(n) is the number of normal undulating integers that divide n.
+10
8
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
COMMENTS
Normal undulating integers are in A355301.
EXAMPLE
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.
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 *)
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) is the smallest integer that has exactly n alternating divisors.
+10
6
1, 2, 4, 6, 16, 12, 24, 48, 36, 96, 72, 144, 210, 180, 420, 360, 504, 864, 630, 1080, 1512, 2160, 1260, 3150, 1890, 2520, 5040, 6300, 3780, 10080, 12600, 9450, 7560, 32760, 15120, 18900, 22680, 30240, 88830, 37800, 45360, 75600, 105840, 90720, 151200, 162540, 254520
COMMENTS
This sequence first differs from A005179 at index 7 where A005179(7) = 64.
EXAMPLE
16 has 5 divisors: {1, 2, 4, 8, 16} all of which are alternating integers; no positive integer smaller than 16 has five alternating divisors, hence a(5) = 16.
96 has 12 divisors: {1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 96}, only 24 and 48 are not alternating; no positive integer smaller than 96 has ten alternating divisors, hence a(10) = 96.
MAPLE
isalt:= proc(n) local L; option remember;
L:= convert(n, base, 10) mod 2;
L:= L[2..-1]-L[1..-2];
not member(0, L)
end proc:
N:= 50: # for a(1)..a(N)
V:= Vector(N): count:= 0:
for n from 1 while count < N do
w:= nops(select(isalt, numtheory:-divisors(n)));
if w <= N and V[w] = 0 then V[w]:= n; count:= count+1 fi
od:
MATHEMATICA
q[n_] := ! MemberQ[Differences[Mod[IntegerDigits[n], 2]], 0]; f[n_] := DivisorSum[n, 1 &, q[#] &]; 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^6] (* Amiram Eldar, Jul 08 2022 *)
PROG
(PARI) is(n, d=digits(n))=for(i=2, #d, if((d[i]-d[i-1])%2==0, return(0))); 1; \\ A030141
a(n) = my(k=1); while (sumdiv(k, d, is(d)) != n, k++); k; \\ Michel Marcus, Jul 11 2022
(Python)
from itertools import count
from sympy import divisors
for m in count(1):
if sum(1 for k in divisors(m, generator=True) if all(int(a)+int(b)&1 for a, b in zip(str(k), str(k)[1:]))) == n:
CROSSREFS
Similar, but with undulating divisors: A355303.
a(n) is the smallest number that has exactly n repdigit divisors.
+10
6
1, 2, 4, 6, 12, 24, 72, 66, 666, 132, 1332, 264, 2664, 792, 13320, 3960, 14652, 26664, 48840, 29304, 79992, 341880, 146520, 399960, 1333332, 1025640, 2799720, 8879112, 2666664, 18666648, 7999992, 44395560, 13333320, 93333240, 39999960, 279999720, 269333064
EXAMPLE
72 has 12 divisors: {1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72}, only {1, 2, 3, 4, 6, 8, 9} are repdigits; no positive integer smaller than 72 has seven repdigit divisors, hence a(7) = 72.
MATHEMATICA
f[n_] := DivisorSum[n, 1 &, Length[Union[IntegerDigits[#]]] == 1 &]; 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[24, 10^6] (* Amiram Eldar, Jul 15 2022 *)
PROG
(PARI) isrep(n) = 1==#Set(digits(n)); \\ A010785
a(n) = my(k=1); while (sumdiv(k, d, isrep(d)) != n, k++); k; \\ Michel Marcus, Jul 15 2022
(Python)
from sympy import divisors
from itertools import count, islice
def c(n): return len(set(str(n))) == 1
def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
def agen():
n, adict = 1, dict()
for k in count(1):
fk = f(k)
if fk not in adict: adict[fk] = k
while n in adict: yield adict[n]; n += 1
a(n) is the smallest integer that has exactly n divisors from A333369.
+10
5
1, 3, 9, 15, 45, 105, 195, 315, 945, 900, 1575, 2100, 3900, 6825, 11655, 10500, 6300, 18900, 25200, 35100, 27300, 31500, 44100, 94500, 157500, 107100, 81900, 233100, 220500, 598500, 245700, 333900, 409500, 491400, 900900, 573300, 600600, 1228500, 1669500, 1965600
EXAMPLE
15 has 4 divisors: {1, 3, 5, 15} all of which are in A333369 integers, and no smaller number has this property, hence a(4) = 15.
MATHEMATICA
q[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; f[n_] := DivisorSum[n, 1 &, q[#] &]; 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[40, 10^7] (* Amiram Eldar, Jul 17 2022 *)
PROG
(PARI) issimber(m) = my(d=digits(m), s=Set(d)); for (i=1, #s, if (#select(x->(x==s[i]), d) % 2 != (s[i] % 2), return (0))); return (1); \\ A333369
a(n) = my(k=1); while (sumdiv(k, d, issimber(d)) != n, k++); k; \\ Michel Marcus, Jul 18 2022
(Python)
from sympy import divisors
from itertools import count, islice
def c(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in set(s))
def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
def agen():
n, adict = 1, dict()
for k in count(1):
fk = f(k)
if fk not in adict: adict[fk] = k
while n in adict: yield adict[n]; n += 1
a(n) is the smallest number that has exactly n odious divisors ( A000069).
+10
5
1, 2, 4, 8, 16, 28, 64, 56, 84, 112, 1024, 168, 4096, 448, 336, 728, 36309, 672, 57057, 1456, 1344, 7168, 105105, 2184, 6384, 24150, 5376, 5208, 405405, 4368, 389025, 11648, 20020, 72618, 10416, 8736, 927675, 114114, 48300, 24024, 855855, 17472, 1426425, 40040
COMMENTS
a(n) <= 2^(n-1) with equality for n = 1, 2, 3, 4, 5, 7, 11, 13 up to a(44).
EXAMPLE
a(6) = 28 since 28 has 6 divisors {1, 2, 4, 7, 14, 28} that have all an odd number of 1's in their binary expansion: 1, 10, 100, 111, 1110 and 11100; also, no positive integer smaller than 28 has six divisors that are odious.
MATHEMATICA
f[n_] := DivisorSum[n, 1 &, OddQ[DigitCount[#, 2, 1]] &]; 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[20, 10^6] (* Amiram Eldar, Jul 21 2022 *)
PROG
(PARI) isod(n) = hammingweight(n) % 2; \\ A000069
a(n) = my(k=1); while (sumdiv(k, d, isod(d)) != n, k++); k; \\ Michel Marcus, Jul 22 2022
(Python)
from sympy import divisors
from itertools import count, islice
def c(n): return bin(n).count("1")&1
def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
def agen():
n, adict = 1, dict()
for k in count(1):
fk = f(k)
if fk not in adict: adict[fk] = k
while n in adict: yield adict[n]; n += 1
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.
+10
4
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
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.
EXAMPLE
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.
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:
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:
MATHEMATICA
q[n_] := AllTrue[(s = Sign[Differences[IntegerDigits[n]]]), # != 0 &] && AllTrue[Differences[s], # != 0 &]; Select[Range[0, 100], q] (* Amiram Eldar, Jun 28 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; \\ Michel Marcus, Jun 30 2022
CROSSREFS
Cf. A059168 (subsequence of primes).
Integers whose number of normal undulating divisors sets a new record.
+10
4
1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 1080, 1260, 1440, 1680, 2160, 2520, 5040, 7560, 10080, 15120, 21840, 28080, 32760, 56160, 65520, 98280, 131040, 196560, 393120, 589680, 786240, 1113840, 1670760, 2227680, 3341520, 6683040, 13366080, 20049120
COMMENTS
Normal undulating integers are in A355301.
The first 14 terms are also the first 14 highly composite numbers in A002182, then A002182(15) = 840 while a(15) = 1080. Indeed, 840 is the smallest integer that has 32 divisors of which only 28 are normal undulating integers, while 1080 has also 32 divisors of which 30 are normal undulating integers.
Corresponding records of number of normal undulating divisors are 1, 2, 3, 4, 6, 8, 9, 10, 12, ...
EXAMPLE
a(6) = 24 is in the sequence because A355302(24) is larger than any earlier value in A355302.
MATHEMATICA
nuQ[n_] := AllTrue[(s = Sign[Differences[IntegerDigits[n]]]), # != 0 &] && AllTrue[Differences[s], # != 0 &]; dm = -1; seq = {}; Do[If[(d = DivisorSum[n, 1 &, nuQ[#] &]) > dm, dm = d; AppendTo[seq, n]], {n, 1, 10^5}]; seq (* Amiram Eldar, Jun 30 2022 *)
a(n) is the smallest number that has exactly n evil divisors ( A001969).
+10
4
1, 3, 6, 12, 18, 45, 30, 135, 72, 60, 90, 765, 120, 1575, 270, 180, 600, 3465, 480, 13545, 360, 540, 1530, 10395, 1260, 720, 3150, 1980, 1080, 49725, 1440, 45045, 2520, 3060, 6930, 2160, 3780, 58905, 27090, 6300, 5040, 184275, 4320, 135135, 6120, 7920, 20790, 329175, 7560, 8640
EXAMPLE
a(4) = 18 since 18 has six divisors: {1, 2, 3, 6, 9, 18} of which four {3, 6, 9, 18} have an even number of 1's in their binary expansion: 11, 110, 1001 and 10010 respectively; also, no positive integer smaller than 18 has exactly four divisors that are evil.
MAPLE
# output in unsorted b-file style
A356019_list := [seq(0, i=1..1000)] ;
for n from 1 do
if op(evd+1, A356019_list) <= 0 then
printf("%d %d\n", evd, n) ;
end if;
end if;
MATHEMATICA
f[n_] := DivisorSum[n, 1 &, EvenQ[DigitCount[#, 2, 1]] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n] + 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[50, 10^6] (* Amiram Eldar, Jul 23 2022 *)
PROG
(Python)
from sympy import divisors
from itertools import count, islice
def c(n): return bin(n).count("1")&1 == 0
def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
def agen():
n, adict = 0, dict()
for k in count(1):
fk = f(k)
if fk not in adict: adict[fk] = k
while n in adict: yield adict[n]; n += 1
a(n) is the smallest number that has exactly n nonpalindromic divisors ( A029742).
+10
3
1, 10, 20, 30, 48, 72, 60, 140, 144, 120, 210, 180, 300, 240, 560, 504, 360, 420, 780, 1764, 900, 960, 720, 1200, 840, 1560, 2640, 1260, 1440, 2400, 3900, 3024, 1680, 3120, 2880, 4800, 7056, 3600, 2520, 3780, 3360, 5460, 6480, 16848, 6300, 8820, 7200, 9240, 6720, 12480, 5040
EXAMPLE
48 has 10 divisors: {1, 2, 3, 4, 6, 8, 12, 16, 24, 48}, only 12, 16, 24 and 48 are nonpalindromic; no positive integer smaller than 48 has four nonpalindromic divisors, hence a(4) = 48.
MATHEMATICA
f[n_] := DivisorSum[n, 1 &, ! PalindromeQ[#] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n] + 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[50, 10^5] (* Amiram Eldar, Jul 14 2022 *)
PROG
(PARI) isnp(n) = my(d=digits(n)); d!=Vecrev(d); \\ A029742
a(n) = my(k=1); while (sumdiv(k, d, isnp(d)) != n, k++); k; \\ Michel Marcus, Jul 14 2022
(Python)
from sympy import divisors
from itertools import count, islice
def c(n): s = str(n); return s != s[::-1]
def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
def agen():
n, adict = 0, dict()
for k in count(1):
fk = f(k)
if fk not in adict: adict[fk] = k
while n in adict: yield adict[n]; n += 1
a(n) is the smallest integer that has exactly n divisors whose decimal digits are in strictly increasing order.
+10
3
1, 2, 4, 6, 16, 12, 54, 24, 36, 48, 72, 180, 144, 360, 336, 468, 504, 936, 1008, 1512, 2520, 3024, 5040, 6552, 7560, 22680, 13104, 19656, 49140, 105840, 39312, 78624, 98280, 248976, 334152, 196560, 393120, 668304, 1244880, 1670760, 1867320, 4520880, 3341520, 3734640
COMMENTS
This sequence is finite since A009993 is finite with 511 nonzero terms, hence the last term is a(511) = lcm of the 511 nonzero terms of A009993.
EXAMPLE
For n=7, the divisors of 54 are {1, 2, 3, 6, 9, 18, 27, 54} of which 7 have their digits in strictly increasing order (all except 54). No integer < 54 has 7 such divisors, so a(7) = 54.
MATHEMATICA
s[n_] := DivisorSum[n, 1 &, Less @@ IntegerDigits[#] &]; seq[len_, nmax_] := Module[{v = Table[0, {len}], n = 1, c = 0, i}, While[c < len && n < nmax, i = s[n]; If[i <= len && v[[i]] == 0, v[[i]] = n; c++]; n++]; v]; seq[25, 10^4] (* Amiram Eldar, Sep 16 2022 *)
PROG
(PARI) isok(d) = Set(d=digits(d)) == d; \\ A009993
f(n) = sumdiv(n, d, isok(d)); \\ A357171
a(n) = my(k=1); while (f(k) !=n, k++); k; \\ Michel Marcus, Sep 16 2022
(Python)
from sympy import divisors
from itertools import count, islice
def c(n): s = str(n); return s == "".join(sorted(set(s)))
def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
def agen():
n, adict = 1, dict()
for k in count(1):
fk = f(k)
if fk not in adict: adict[fk] = k
while n in adict: yield adict[n]; n += 1
Search completed in 0.013 seconds
|