[go: up one dir, main page]

login
A303771
Divisor-or-multiple permutation of natural numbers, "Fermi-Dirac piano played with May code": a(n) = A052330(A303767(n)).
10
1, 2, 6, 3, 12, 4, 8, 24, 120, 5, 10, 30, 15, 60, 20, 40, 280, 7, 14, 42, 21, 84, 28, 56, 168, 840, 35, 70, 210, 105, 420, 140, 1260, 9, 18, 54, 27, 108, 36, 72, 216, 1080, 45, 90, 270, 135, 540, 180, 360, 2520, 63, 126, 378, 189, 756, 252, 504, 1512, 7560, 315, 630, 1890, 945, 3780, 41580, 11, 22, 66, 33, 132, 44, 88, 264, 1320, 55, 110, 330, 165, 660, 220
OFFSET
0,2
COMMENTS
Consider A019565. Imagine that it is an automatic piano that "plays sequences" when an appropriate punched "tape" is fed to it (as its input), i.e., when it is composed from the right with an appropriate sequence p, as A019565(p(n)). The 1-bits in the binary expansion of each p(n) are the "holes" in the tape, and they determine which "tunes" are present on beat n. The "tunes" are actually primes that are multiplied together. Of course only "squarefree music" (sequences containing only squarefree numbers, A005117) is possible to generate this way, thus we call A019565 a "squarefree piano".
There is a more sophisticated instrument, called "Fermi-Dirac piano" (A052330), with which it is possible to produce sequences that may contain any numbers.
If the tape is constructed in such a way that between the successive beats (when moving from p(n) to p(n+1)), either a subset of 0-bits are toggled on (changed to 1's), or a subset of 1-bits are toggled off (changed to 0's), but no both kind of changes occur simultaneously, then when fed as an input to either of these pianos, the resulting sequence "s" (the output) is guaranteed to satisfy the condition that s(n+1) is either a multiple or a divisor of s(n). For example, Gray code A003188 and its inverse A006068 are examples of such tapes, and they produce sequences A302033, A207901 and A284003, A302783.
This divisor-or-multiple permutation is obtained by playing "Fermi-Dirac piano" with the same tape which yields A303760 when "squarefree piano" is played with it. Note that A303760 is not a subsequence of this sequence, as its terms occur in different order than the squarefree terms here.
See also Peter Munn's Apr 11 2018 message on SeqFan-mailing list and comments in A304537.
FORMULA
a(n) = A052330(A303767(n)) = A052330(A048675(A303760(n))). [See comments].
PROG
(PARI)
default(parisizemax, 2^31);
up_to_e = 16;
up_to = (1 + 2^up_to_e);
v050376 = vector(2+up_to_e);
A050376(n) = v050376[n];
ispow2(n) = (n && !bitand(n, n-1));
i = 0; for(n=1, oo, if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == 2+up_to_e, break));
A052330(n) = { my(p=1, i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
A053669(n) = forprime(p=2, , if (n % p, return(p))); \\ From A053669
v303760 = vector(up_to);
m_inverses = Map();
prev=1; for(n=1, up_to, fordiv(prev, d, if(!mapisdefined(m_inverses, d), v303760[n] = d; mapput(m_inverses, d, n); break)); if(!v303760[n], apu = prev; while(mapisdefined(m_inverses, try = prev*A053669(apu)), apu *= A053669(apu)); v303760[n] = try; mapput(m_inverses, try, n)); prev = v303760[n]);
A303760(n) = v303760[n+1];
A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
CROSSREFS
Cf. A303772 (inverse).
Cf. also A064736, A113552, A207901, A281978, A282291, A302350, A302781, A302783, A303751, A304085, A304531 for similar permutations.
Sequence in context: A347558 A317490 A256466 * A298480 A372975 A353916
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 02 2018
EXTENSIONS
Name amended by Antti Karttunen, May 16 2018
STATUS
approved