OFFSET
1,2
COMMENTS
Monotonic until a(55) = 30 > 29 = a(56).
The length of a monotonic completely additive sequence using positive integers is limited by the size of the initial terms, and this constraint is related to the conflicts inherent in specifying musical scales. In either case, the route to a good compromise solution that avoids complexity can be seen as a search for rational approximations to ratios between logarithms of the first few prime numbers.
Here a(i)/a(j) is the intended approximation to log(i)/log(j), so by starting with a(2) = 5 we open the door to using 8/5 as an approximation to log(3)/log(2) = 1.58496... . This approximation underlies simple musical scales that divide an octave into 5, where a note of twice the frequency is 5 tones higher and a note of about 3 times the frequency is 8 tones higher. The most commonly used more complex musical scales divide an octave into 12, equivalent to starting a sequence like this with a(2) = 12 (see A344444).
LINKS
Author?, Musical Temperaments and Ratios.
Encyclopedia of Mathematics, Additive arithmetic function.
FORMULA
a(n*k) = a(n) + a(k).
EXAMPLE
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).)
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Munn, May 19 2021
STATUS
approved