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.

Showing 1-3 of 3 results.

A054540 A list of equal temperaments (equal divisions of the octave) whose nearest scale steps are closer and closer approximations to the six simple ratios of musical harmony: 6/5, 5/4, 4/3, 3/2, 8/5 and 5/3.

Original entry on oeis.org

1, 2, 3, 5, 7, 12, 19, 31, 34, 53, 118, 171, 289, 323, 441, 612, 730, 1171, 1783, 2513, 4296, 12276, 16572, 20868, 25164, 46032, 48545, 52841, 73709, 78005, 151714, 229719, 537443, 714321, 792326, 944040, 1022045, 1251764, 3755292, 3985011
Offset: 0

Views

Author

Mark William Rankin (MarkRankin95511(AT)Yahoo.com), Apr 09 2000; Dec 17 2000

Keywords

Comments

The sequence was found by a computer search of all of the equal divisions of the octave from 1 to over 3985011. There seems to be a hidden aspect or mystery here: what is it about the more and more harmonious equal temperaments that causes them to express themselves collectively as a perfect, self-accumulating recurrent sequence?
From Eliora Ben-Gurion, Dec 15 2022: (Start)
The answer is because temperament mappings can be added. If harmonic correspondences are written in a bra, that is
Example: a tuning with 118 equal steps to the octave has a second harmonic on the 118th step by definition, the third harmonic is approximated with 187 steps, and the fifth is with 274 steps, which leads to <118 187 274]. A 171 equal division system will have a corresponding bra <171 271 397]. When these two are added, we obtain <289 458 671], which is exactly how the 2nd, 3rd, and 5th harmonics are represented in 289 equal divisions of the octave. (End)

Examples

			34 = 31 + the earlier term 3. Again, 118 = 53 + the earlier terms 34 and 31.
		

Formula

Stochastic recurrence rule - the next term equals the current term plus one or more previous terms: a(n+1) = a(n) + a(n-x) + ... + a(n-y) + ... + a(n-z), etc.

A004978 a(n) = least integer m > a(n-1) such that m - a(n-1) != a(j) - a(k) for all j, k less than n; a(1) = 1, a(2) = 2.

Original entry on oeis.org

1, 2, 4, 8, 13, 21, 31, 45, 60, 76, 97, 119, 144, 170, 198, 231, 265, 300, 336, 374, 414, 456, 502, 550, 599, 649, 702, 759, 819, 881, 945, 1010, 1080, 1157, 1237, 1318, 1401, 1486, 1572, 1662, 1753, 1845, 1945, 2049, 2156, 2264, 2380, 2499, 2623, 2750, 2882
Offset: 1

Author

N. J. A. Sloane. This was in the 1973 "Handbook", but was then dropped from the database. Resubmitted by Clark Kimberling. Entry revised by N. J. A. Sloane, Jun 10 2012

Keywords

Comments

Equivalently, if S(n) = { a(j) - a(k); n > j > k > 0 }, then a(n) = a(n-1) + M where M = min( {1, 2, 3, ...} \ S(n) ) is the smallest positive integer not in S(n). - M. F. Hasler, Jun 26 2019

Examples

			From _M. F. Hasler_, Jun 26 2019: (Start)
After a(1) = 1, a(2) = 2, we have a(3) = least m > a(2) such that m - a(2) = m - 2 is not in { a(j) - a(k); 1 <= k < j < 3 } = { a(2) - a(1) } = { 1 }. Thus we must have m - 2 = 2, whence m = 4.
The next term a(4) is the least m > a(3) such that m - a(3) = m - 4 is not in { a(j) - a(k); 1 <= k < j < 4 } = { 1, 4 - 2 = 2, 4 - 1 = 3 }, i.e., m = 4 + 4 = 8.
The next term a(5) is the least m > a(4) such that m - a(4) = m - 8 is not in { a(j) - a(k); 1 <= k < j < 5 } = { 1, 2, 3, 8 - 4 = 4, 8 - 2 = 6, 8 - 1 = 7 }, i.e., m = 5 + 8 = 13. (End)
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

Crossrefs

Differences give A002048, see also A048201.
See also A001856.
For n>2, a(n) equals A002049(n-1)+1 and A048204(n-2)+2.

Programs

  • MATLAB
    s=1:2000^2;d(1)=1;A004978(1)=1;A004978(2)=2;
    for n=3:2000
      A004978(n)=A004978(n-1)+find([d,0]~=s(1:max(size(d))+1),1);
      d(end+1:end+n-1)=A004978(n)-A004978(1:n-1);
      d=sort(unique(d));
    end
    % Nathaniel Johnston, Feb 09 2011
    
  • PARI
    A004978_vec(N,a=[1..N],S=[1])={for(n=3,N,a[n]=a[n-1]+S[1]+1;S=setunion(S,select(t->t>S[1],vector(n-1,k,a[n]-a[n-k])));for(k=1,#S-1, if(S[k+1]-S[k]>1, S=S[k..-1];next(2)));S[#S]==#S&&S=[#S]);a} \\ M. F. Hasler, Jun 26 2019
    
  • Python
    from itertools import count, accumulate, islice
    from collections import deque
    def A004978_gen(): # generator of terms
        aset, alist, c = set(), deque(), 1
        for k in count(1):
            if k in aset:
                aset.remove(k)
            else:
                yield c
                aset |= set(k+d for d in accumulate(alist))
                alist.appendleft(k)
                c += k
    A004978_list = list(islice(A004978_gen(),20)) # Chai Wah Wu, Sep 01 2025

Extensions

Definition corrected by Bryan S. Robinson, Mar 16 2006
Name edited by M. F. Hasler, Jun 26 2019

A247556 Exact differential base (a B_2 sequence) constructed as follows: Start with a(0)=0. For n>=1, let S be the set of all differences a(j)-a(i) for 0 <= i < j <= n-1, and let d be the smallest positive integer not in S. If, for every i in 1..n-1, a(n-1) + d - a(i) is not in S, then a(n) = a(n-1) + d. Otherwise, let r be the smallest positive integer such that, for every i in 1..n-1, neither a(n-1) + r - a(i) nor a(n-1) + r + d - a(i) is in S; then a(n) = a(n-1) + r and a(n+1) = a(n) + d.

Original entry on oeis.org

0, 1, 3, 7, 12, 20, 30, 44, 65, 80, 96, 143, 165, 199, 224, 306, 332, 415, 443, 591, 624, 678, 716, 934, 973, 1134, 1174, 1449, 1491, 1674, 1720, 2113, 2161, 2468, 2517, 2855, 2906, 2961, 3245, 3302, 3711, 3772, 4081, 4148, 4603, 4673, 5557, 5628, 5917, 5989
Offset: 0

Author

Thomas Ordowski, Sep 19 2014

Keywords

Comments

Every positive integer is uniquely represented as a difference of two distinct elements of the base set. This is a B_2 sequence.
By the definition of this sequence, with d as the smallest unused difference among terms a(0)..a(n-1), we assign a(n) = a(n-1) + d, provided that this would not cause any difference to be repeated; otherwise, we assign a(n) = a(n-1) + r and a(n+1) = a(n) + d, where r is the smallest integer that allows this assignment of a(n) and a(n+1) without causing any difference to be repeated. Thus, at each step, the smallest unused difference d is either used immediately (as a(n) - a(n-1)) or delayed by one step (and used as a(n+1) - a(n)). In this way, the sequence includes every positive integer as a difference (unlike the Mian-Chowla sequence A005282, which omits differences 33, 88, 98, 99, ...; see A080200).
The set is an optimization of Browkin's base, where r = a(n-1) + 1.
The series Sum_{n>=0} 1/(a(n+1) - a(n)) is divergent.
Conjecture: lim inf_{n->oo} (a(n+1) - a(n))/n = 1/2.

Examples

			Given a(0)=0, a(1)=1, a(2)=3, a(3)=7, the differences used are 1,2,3,4,6,7, so d=5, and we can use a(4) = a(3)+d = 7+5 = 12 because appending a(4)=12 to the sequence will result in the differences 12-0=12, 12-1=11, 12-3=9, 12-7=5, none of which had already been used.
Similarly, given a(0)..a(4) = 0,1,3,7,12, the differences used are 1..7,9,11,12, so d=8, and we can use a(5) = a(4)+d = 12+8 = 20 because the resulting differences will be 20, 19, 17, 13, 8, none of which had already been used.
Proceeding as above, we get a(6)=30 and a(7)=44.
Given a(0)..a(7) = 0,1,3,7,12,20,30,44, the differences used are 1..14,17..20,23..24,27,29..30,32,37,41,43..44, so d=15, but we cannot use a(8) = a(7)+d = 44+15 = 59 because the difference 29 would be repeated: 59-30 = 30-1. Thus, we must find the smallest r such that using both a(8) = a(7)+r and a(9) = a(8)+d will not repeat any differences. The smallest such r is 21, so a(8) = a(7)+r = 44+21 = 65 and a(9) = a(8)+d = 65+15 = 80.
		

References

  • Jerzy Browkin, Rozwiązanie pewnego zagadnienia A. Schinzla (Polish) [The solution of a certain problem of A. Schinzel], Roczniki Polskiego Towarzystwa Matematycznego [Annals Polish Mathematical Society], Seria I, Prace Matematyczne III (1959).

Crossrefs

Cf. A001856, where a(1)=1, a(2)=2, a(2n+1)=2*a(2n), a(2n+2) = a(2n+1) + d.
Cf. A005282 (Mian-Chowla sequence), A025582.
Cf. A080200.

Formula

a(n) >= A025582(n+1) and for n <= 10 is here equality.
Conjecture: a(n) ~ log(log(n))*A025582(n+1), where A025582(m)+1 = A005282(m) is the Mian-Chowla sequence.

Extensions

More terms from Jon E. Schoenfield, Jan 18 2015
Edited by Jon E. Schoenfield, Jan 22 2015
Showing 1-3 of 3 results.