login
A346510
a(n) is the number of nontrivial divisors of A346507(n) ending with 1.
2
1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 4, 2, 4, 2
OFFSET
1,2
FORMULA
a(n) = A346392(A346507(n)) - 1.
EXAMPLE
a(42) = 4 since there are 4 nontrivial divisors of A346507(42) = 2541 ending with 1: 11, 21, 121 and 231.
MATHEMATICA
b={}; For[n=1, n<=500, n++, For[k=1, k<n, k++, If[Mod[10n+1, 10k+1]==0 && Mod[(10n+1)/(10k+1), 10]==1 && 10n+1>Max[b], AppendTo[b, 10n+1]]]]; (* A346507 *) a={}; For[i =1, i<=Length[b], i++, AppendTo[a, Length[Drop[Select[Divisors[Part[b, i]], (Mod[#, 10]==1&)], -1]]-1]]; a
PROG
(PARI) f(n) = sumdiv(n, d, (d>1) && (d<n) && ((d%10)==1) && (((n/d) % 10) == 1));
apply(f, select(x->(f(x)), [1..5000])) \\ Michel Marcus, Jul 28 2021
(Python)
from sympy import divisors
def f(n): return sum(d%10 == 1 for d in divisors(n)[1:-1])
def A346507upto(lim): return sorted(set(a*b for a in range(11, lim//11+1, 10) for b in range(a, lim//a+1, 10)))
print(list(map(f, A346507upto(5000)))) # Michael S. Branicky, Jul 31 2021
CROSSREFS
Cf. A017281, A070824, A346388 (ending with 5), A346389 (ending with 6), A346392, A346507, A346508, A346509.
Sequence in context: A253589 A332992 A337788 * A023568 A081753 A332999
KEYWORD
nonn,base
AUTHOR
Stefano Spezia, Jul 21 2021
STATUS
approved