login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A358099 a(n) is the number of divisors of n whose digits are in strictly decreasing order (A009995). 3
1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 1, 5, 1, 3, 3, 4, 1, 5, 1, 6, 4, 2, 1, 6, 2, 2, 3, 4, 1, 7, 2, 5, 2, 2, 3, 6, 1, 2, 2, 8, 2, 7, 2, 3, 4, 2, 1, 6, 2, 5, 3, 4, 2, 6, 2, 5, 2, 2, 1, 10, 2, 4, 6, 6, 3, 4, 1, 3, 2, 6, 2, 8, 2, 3, 4, 4, 2, 4, 1, 9, 4, 4, 2, 9, 3, 4, 3, 4, 1, 9, 3, 4, 4, 3, 3, 8, 2, 4, 3, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
As A009995 is finite with 1023 terms, a(n) is bounded with a(n) <= 1022 and not 1023, since A009995(1) = 0.
LINKS
FORMULA
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{n=2..1023} 1/A009995(n) = 3.89840673699905364734... (this is a rational number whose numerator and denominator have 1292 and 1291 digits, respectively). - Amiram Eldar, Jan 06 2024
EXAMPLE
22 has 4 divisors {1, 2, 11, 22} of which two have decimal digits that are not in strictly decreasing order: {11, 22}, hence a(22) = 4-2 = 2.
52 has 6 divisors {1, 2, 4, 13, 26, 52} of which four have decimal digits that are in strictly decreasing order {1, 2, 4, 52}, hence a(52) = 4.
MAPLE
f:= proc(n) local L;
if n < 10 then return true fi;
L:= convert(n, base, 10);
andmap(type, L[2..-1]-L[1..-2], positive)
end proc:
g:= n -> nops(select(f, numtheory:-divisors(n))):
map(g, [$1..100]); # Robert Israel, Oct 31 2022
MATHEMATICA
a[n_] := DivisorSum[n, 1 &, Max @ Differences @ IntegerDigits[#] < 0 &]; Array[a, 100] (* Amiram Eldar, Oct 29 2022 *)
PROG
(PARI) a(n) = sumdiv(n, d, my(dd=digits(d)); vecsort(dd, , 12) == dd); \\ Michel Marcus, Oct 30 2022
(Python)
from sympy import divisors
def c(n): s = str(n); return all(s[i+1] < s[i] for i in range(len(s)-1))
def a(n): return sum(1 for d in divisors(n, generator=True) if c(d))
print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Feb 12 2024
CROSSREFS
Similar: A086971 (semiprimes), A087990 (palindromic), A355593 (alternating), A357171 (increasing order).
Sequence in context: A356069 A179940 A138707 * A095048 A332268 A355593
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Oct 29 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 29 16:28 EDT 2024. Contains 374734 sequences. (Running on oeis4.)