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!)
A346392 a(n) is the number of proper divisors of n ending with the same digit as n. 4
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 2, 1, 1, 0, 1, 2, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 3, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2, 0, 0, 3, 0, 1, 0, 0, 3, 1, 1, 0, 2, 1, 0, 0, 1, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,40

LINKS

Michael S. Branicky, Table of n, a(n) for n = 1..10000

FORMULA

For a prime p, a(p) = 1 if p has the final digit equal to 1, otherwise a(p) = 0.

a(n) = A330348(n) - 1. - Michel Marcus, Jul 19 2021

EXAMPLE

a(40) = 2 since there are 2 proper divisors of 40 ending with 0: 10 and 20.

MATHEMATICA

a[n_]:=Length[Drop[Select[Divisors[n], (Mod[#, 10]==Mod[n, 10]&)], -1]]; Array[a, 90]

PROG

(PARI) a(n) = my(x = n%10); sumdiv(n, d, if (d<n, d%10 == x)); \\ Michel Marcus, Jul 19 2021

(Python)

from sympy import divisors

def a(n): return sum(d%10 == n%10 for d in divisors(n)[:-1])

print([a(n) for n in range(1, 91)]) # Michael S. Branicky, Jul 31 2021

CROSSREFS

Cf. A010879, A032741, A330348.

Sequence in context: A114640 A056890 A321519 * A169590 A300185 A262804

Adjacent sequences:  A346389 A346390 A346391 * A346393 A346394 A346395

KEYWORD

nonn,base

AUTHOR

Stefano Spezia, Jul 15 2021

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 22 13:23 EST 2022. Contains 350481 sequences. (Running on oeis4.)