The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A357299 a(n) is the number of divisors of n whose first digit equals the first digit of n. 5
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,10
COMMENTS
Similar to A330348, but with last digit.
a(n) >= 1 because there is always a divisor that fits: n.
a(n) >= 2 for n>1 in A131835.
LINKS
EXAMPLE
The divisors of 26 that start in 2 are 2 and 26, so a(26) = 2.
MATHEMATICA
f[n_] := IntegerDigits[n][[1]]; a[n_] := DivisorSum[n, 1 &, f[#] == f[n] &]; Array[a, 100] (* Amiram Eldar, Sep 23 2022 *)
PROG
(PARI) a(n) = my(fd=digits(n)[1]); sumdiv(n, d, digits(d)[1] == fd); \\ Michel Marcus, Sep 23 2022
(Python)
from sympy import divisors
def a(n): f = str(n)[0]; return sum(1 for d in divisors(n) if str(d)[0]==f)
print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Sep 23 2022
CROSSREFS
Sequence in context: A254524 A132211 A067441 * A263109 A044926 A074264
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Sep 23 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 May 16 13:05 EDT 2024. Contains 372552 sequences. (Running on oeis4.)