OFFSET
2,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..2300
FORMULA
A341431(n)/a(n) = (1/n) * Sum_{k=1..n-1} gcd(k, n)/k. [corrected by Amiram Eldar, Nov 16 2022]
a(prime(n)) = A185399(n), for n > 1.
EXAMPLE
For n=2, the numbers divisible by their last binary digit are the odd numbers (A005408) whose density is 1/2, therefore a(2) = 2.
For n=3, the numbers divisible by their last digit in base 3 are the numbers that are congruent to {1, 2, 4} mod 6 (A047236) whose density is 1/2, therefore a(3) = 2.
For n=10, the numbers divisible by their last digit in base 10 are A034709 whose density is 1177/2520, therefore a(10) = 2520.
MATHEMATICA
a[n_] := Denominator[Sum[GCD[k, n]/k, {k, 1, n - 1}]/n]; Array[a, 32, 2]
CROSSREFS
KEYWORD
nonn,base,frac,easy
AUTHOR
Amiram Eldar, Feb 11 2021
STATUS
approved