A276466 a(n) = numerator of Sum_{d|n} 0.d.
1, 3, 2, 7, 3, 6, 4, 3, 13, 9, 21, 43, 23, 57, 21, 83, 27, 57, 29, 3, 131, 63, 33, 69, 17, 69, 157, 91, 39, 9, 41, 99, 21, 81, 33, 79, 47, 87, 23, 27, 51, 267, 53, 147, 12, 99, 57, 17, 129, 33, 27, 161, 63, 309, 63, 159, 29, 117, 69, 357, 71, 123, 71, 131, 69
Offset: 1
Examples
For n=12; Sum_{d | 12} 0.d = 0.1 + 0.2 + 0.3 + 0.4 + 0.6 + 0.12 = 1.72 = 172/100 = 43/25; a(12) = 43.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[Numerator(&+[d / (10^(#Intseq(d))): d in Divisors(n)]): n in [1..1000]]
-
Mathematica
Table[Numerator@ Total@ (#*1/10^(1 + Floor@ Log10@ #)) &@ Divisors@ n, {n, 65}] (* Michael De Vlieger, Sep 04 2016 *)
-
PARI
a(n) = numerator(sumdiv(n, d, d/10^(#Str(d)))); \\ Michel Marcus, Mar 29 2019
-
Python
from fractions import Fraction from sympy import divisors def A276466(n): return sum(Fraction(d,10**len(str(d))) for d in divisors(n)).numerator # Chai Wah Wu, Sep 05 2016
Formula
a(n) = (Sum_{d | n} 0.d) * A276467(n).
Comments