OFFSET
1,2
COMMENTS
Inspired by Project Euler, Problem 474 (see link).
The corresponding number of divisors whose last digit equals the last digit: 1, 2, 3, 4, 6, 8, 9, 10, 12, 16, 18, 20, ...
LINKS
Project Euler, Problem 474: Last digits of divisors.
FORMULA
For n >= 3, a(n) = 10 * A002182(n) (conjectured).
EXAMPLE
MATHEMATICA
d[n_] := DivisorSum[n, 1 &, Mod[# - n, 10] == 0 &]; dm = 0; s = {}; Do[d1 = d[n]; If[d1 > dm, dm = d1; AppendTo[s, n]], {n, 1, 10^7}]; s (* Amiram Eldar, Mar 23 2021 *)
PROG
(PARI) f(n) = my(dig = n%10); sumdiv(n, d, d%10 == dig); \\ A330348
lista(nn) = my(m, k=0, kk); for (n=1, nn, kk = f(n); if (kk>k, print1(n, ", "); k = kk)); \\ Michel Marcus, Mar 24 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Mar 23 2021
STATUS
approved