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.
%I A303771 #40 Dec 23 2024 14:53:45 %S A303771 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 A303771 168,840,35,70,210,105,420,140,1260,9,18,54,27,108,36,72,216,1080,45, %U A303771 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 A303771 Divisor-or-multiple permutation of natural numbers, "Fermi-Dirac piano played with May code": a(n) = A052330(A303767(n)). %C A303771 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 A303771 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 A303771 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 A303771 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 A303771 See also _Peter Munn_'s Apr 11 2018 message on SeqFan-mailing list and comments in A304537. %H A303771 Antti Karttunen, <a href="/A303771/b303771.txt">Table of n, a(n) for n = 0..16383</a> %H A303771 Michel Marcus, Peter Munn, et al., <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2018-April/018581.html">Discussion on SeqFan-list about similar permutations</a>, April 2018 %H A303771 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A303771 a(n) = A052330(A303767(n)) = A052330(A048675(A303760(n))). [See comments]. %o A303771 (PARI) %o A303771 default(parisizemax,2^31); %o A303771 up_to_e = 16; %o A303771 up_to = (1 + 2^up_to_e); %o A303771 v050376 = vector(2+up_to_e); %o A303771 A050376(n) = v050376[n]; %o A303771 ispow2(n) = (n && !bitand(n,n-1)); %o A303771 i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == 2+up_to_e,break)); %o A303771 A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); }; %o A303771 A053669(n) = forprime(p=2, , if (n % p, return(p))); \\ From A053669 %o A303771 v303760 = vector(up_to); %o A303771 m_inverses = Map(); %o A303771 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 A303771 A303760(n) = v303760[n+1]; %o A303771 A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; }; %o A303771 A303771(n) = A052330(A048675(A303760(n))); %Y A303771 Cf. A303772 (inverse). %Y A303771 Cf. A019565, A048675, A052330, A303760. %Y A303771 Cf. also A064736, A113552, A207901, A281978, A282291, A302350, A302781, A302783, A303751, A304085, A304531 for similar permutations. %K A303771 nonn %O A303771 0,2 %A A303771 _Antti Karttunen_, May 02 2018 %E A303771 Name amended by _Antti Karttunen_, May 16 2018