login
Divisor-or-multiple permutation of natural numbers, "Fermi-Dirac piano played with May code": a(n) = A052330(A303767(n)).
10

%I #39 Jan 02 2023 12:30:54

%S 1,2,6,3,12,4,8,24,120,5,10,30,15,60,20,40,280,7,14,42,21,84,28,56,

%T 168,840,35,70,210,105,420,140,1260,9,18,54,27,108,36,72,216,1080,45,

%U 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

%N Divisor-or-multiple permutation of natural numbers, "Fermi-Dirac piano played with May code": a(n) = A052330(A303767(n)).

%C 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".

%C There is a more sophisticated instrument, called "Fermi-Dirac piano" (A052330), with which it is possible to produce sequences that may contain any numbers.

%C 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.

%C 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.

%C See also _Peter Munn_'s Apr 11 2018 message on SeqFan-mailing list and comments in A304537.

%H Antti Karttunen, <a href="/A303771/b303771.txt">Table of n, a(n) for n = 0..16383</a>

%H Michel Marcus, Peter Munn, et al., <a href="http://list.seqfan.eu/oldermail/seqfan/2018-April/018581.html">Discussion on SeqFan-list about similar permutations</a>, April 2018

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(n) = A052330(A303767(n)) = A052330(A048675(A303760(n))). [See comments].

%o (PARI)

%o default(parisizemax,2^31);

%o up_to_e = 16;

%o up_to = (1 + 2^up_to_e);

%o v050376 = vector(2+up_to_e);

%o A050376(n) = v050376[n];

%o ispow2(n) = (n && !bitand(n,n-1));

%o i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == 2+up_to_e,break));

%o A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };

%o A053669(n) = forprime(p=2, , if (n % p, return(p))); \\ From A053669

%o v303760 = vector(up_to);

%o m_inverses = Map();

%o 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]);

%o A303760(n) = v303760[n+1];

%o A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };

%o A303771(n) = A052330(A048675(A303760(n)));

%Y Cf. A303772 (inverse).

%Y Cf. A019565, A048675, A052330, A303760.

%Y Cf. also A064736, A113552, A207901, A281978, A282291, A302350, A302781, A302783, A303751, A304085, A304531 for similar permutations.

%K nonn

%O 0,2

%A _Antti Karttunen_, May 02 2018

%E Name amended by _Antti Karttunen_, May 16 2018