cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A341432 a(n) is the denominator of the asymptotic density of numbers divisible by their last digit in base n.

Original entry on oeis.org

2, 2, 12, 12, 60, 20, 840, 840, 2520, 2520, 27720, 27720, 360360, 360360, 720720, 720720, 12252240, 4084080, 232792560, 77597520, 33256080, 5173168, 5354228880, 356948592, 3824449200, 26771144400, 11473347600, 80313433200, 332727080400, 2329089562800, 144403552893600
Offset: 2

Views

Author

Amiram Eldar, Feb 11 2021

Keywords

Comments

a(n) divides A003418(n), and a(n) = A003418(n) for n = 1, 2, 4, 6, 8, 10, 12, ...

Examples

			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.
		

Crossrefs

Cf. A003418, A005408, A034709, A047236, A185399, A341431 (numerators).

Programs

  • Mathematica
    a[n_] := Denominator[Sum[GCD[k, n]/k, {k, 1, n - 1}]/n]; Array[a, 32, 2]

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.