A344443 Completely additive with a(2)=5; for odd prime p, a(p) = ceiling((a(p-1) + a(p+1))/2).
0, 5, 8, 10, 12, 13, 14, 15, 16, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 30, 29, 30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31
Offset: 1
Examples
a(4) = a(2*2) = a(2) + a(2) from the definition of completely additive. So a(4) = 5 + 5 = 10. 3 is an odd prime number, so a(3) = ceiling((a(3-1) + a(3+1))/2). Using the values a(2) = 5 and a(4) = 10 that we already know, we get a(3) = ceiling((5 + 10)/2) = ceiling(7.5) = 8. The sequence is defined as completely additive, so a(1) = 0, the identity element for addition. (To see this, note that "completely additive" implies a(2) = a(2*1) = a(2)+a(1), and solve the equation for a(1).)
Links
- Author?, Musical Temperaments and Ratios.
- Encyclopedia of Mathematics, Additive arithmetic function.
- Index entries for sequences related to music.
Crossrefs
Programs
-
Mathematica
a[1] = 0; a[n_] := a[n] = Plus @@ ((Last[#] * If[First[#] == 2, 5, Ceiling[(a[First[#] - 1] + a[First[#] + 1])/2]]) & /@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Jun 27 2021 *)
-
PARI
A344443(n) = if(1==n,0, my(f=factor(n)); sum(k=1,#f~,f[k,2]*if(2==f[k,1],5,ceil((1/2)*(A344443(f[k,1]-1)+A344443(f[k,1]+1)))))); \\ Antti Karttunen, May 19 2021
Formula
a(n*k) = a(n) + a(k).
Comments