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.

A304531 Suspected divisor-or-multiple permutation: a(1) = 1, and for n > 1, a(n) is either the least unitary divisor of a(n-1) not already present, or (if all unitary divisors already used), a(n) = a(n-1) * {the least power of the least prime not dividing a(n-1) such that the term is not already present}.

Original entry on oeis.org

1, 2, 6, 3, 12, 4, 36, 9, 18, 90, 5, 10, 30, 15, 60, 20, 180, 45, 360, 8, 24, 120, 40, 1080, 27, 54, 270, 135, 540, 108, 2700, 25, 50, 150, 75, 300, 100, 900, 225, 450, 3150, 7, 14, 42, 21, 84, 28, 252, 63, 126, 630, 35, 70, 210, 105, 420, 140, 1260, 315, 2520, 56, 168, 840, 280, 7560, 189, 378, 1890, 945, 3780, 756, 18900, 175, 350, 1050, 525, 2100, 700
Offset: 1

Views

Author

Antti Karttunen, May 14 2018

Keywords

Comments

The greedy algorithm which constructs the sequence is easiest to grasp in terms of Heinz encodings of partitions (see A215366): Any term a(n) corresponds to a particular integer partition. The choices for constructing the next partition are: either remove some parts from the partition, but with the condition that if any summand k is removed, then all copies of k present in partition must be removed in toto. One may remove all copies of several distinct summands as well. If by such a removal of parts we can find any smaller partitions that have not yet occurred in the sequence, then we choose the one which has the smallest Heinz encoding value. On the other hand, if all partitions obtained by such removals have already occurred in the sequence, then one adds to the current partition the least number of copies of the least positive integer that is not yet a part of the partition (see A257993), until a partition is found which is not yet in the sequence. This process also implies that one never removes the summand(s) that was/were just added in the previous step.
It has not yet been rigorously proved that all partitions can be reached this way, i.e., that this sequence is a permutation of natural numbers.
Each a(n+1) is always either a divisor or a multiple of a(n).
No two successive descending terms, that is, a(n) > a(n+1) > a(n+2) never occurs.
For n > 1, if a(n) is odd then a(n-1) = 2^h * k * a(n) and a(n+1) = 2^j * a(n) for some h, k and j, that is, odd terms occur between two larger even numbers.
If a(n) < a(n+1) then (a(n+1) / a(n)) is a divisor of a(n+2). This follows because clearly (in case A) when a(n) < a(n+1) < a(n+2) then (a(n+1) / a(n)) is a divisor of a(n+2) because on ascending subsections each successive term is obtained by multiplying by some prime (or its power) not already present. But it is also true (in case B) when a(n) < a(n+1) > a(n+2), as:
In contrast to A303751, this permutation is specified with an additional constraint that gcd(a(n+1), a(n)/a(n+1)) = 1, whenever a(n) > a(n+1). From this then follows that also when a(n) < a(n+1) > a(n+2) then (a(n+1) / a(n)) is guaranteed to be a divisor of a(n+2). It also follows from this that also the squarefree version A304537(n) = A019565(A052331(a(1+n))) satisfies the divisor-or-multiple property.
Odd numbers occur at A304530.
Primes occur at : 2, 4, 11, 42, 237, 1798, 7192, 69611, 431203, 2401568, ...
Primorials (A002110) occur at: 1, 2, 3, 13, 54, 290, 2087, 11333, 118777, 934737, ...

Examples

			a(64) = 280 = 2^3 * 5 * 7 = prime(1)^3 * prime(3) * prime(4), which by Heinz-encoding corresponds to integer partition {1+1+1+3+4}. We try to remove all 1's (to get {3+4}, i.e. prime(3)*prime(4) = 35, but that has already been used as a(52)), or to remove either 3 or 4 or both, but also 8, 40 and 56 have already been used, and if we remove all 1's and either 3 or 4, then also prime(3) and prime(4), 5 and 7 have already been used. So we must add one or more copies of 2 (the least missing part) to find a partition that has not already been used. And it turns out we need to add three copies, to get {1+1+1+2+2+2+3+4} to obtain value prime(1)^3 * prime(2)^3 * prime(3) * prime(4) = 7560 not used before, so a(65) = 7560.
For the next partition, we remove all 1's and the sole 3, to get {2+2+2+4}, with Heinz-encoding prime(2)^3 * prime(4) = 27 * 7 = 189 to obtain the smallest not yet present in sequence, thus a(66) = 189. Note that the partition {1+1+1+2+2} would give even a smaller Heinz-code 2^3 * 3^2 = 72, which also has not been used before, but 72 is not a unitary divisor of 7560, which can be seen from the fact that just one 2 (but not all 2's) was removed from the partition {1+1+1+2+2+2+3+4} that corresponds to 7560. At this point A303751 selects 72 as it has no unitary divisor constraint.
		

Crossrefs

Cf. A304532 (inverse).
Cf. A304530 (positions of odd terms).
Cf. A113552, A282291, A303751 for other variants.
Differs from A303751 for the first time at n=66, where a(66) = 189, while A303751(66) = 72.

Programs

  • PARI
    up_to = 2^12;
    A053669(n) = forprime(p=2, , if (n % p, return(p))); \\ From A053669
    v304531 = vector(up_to);
    m304532 = Map();
    prev=1; for(n=1,up_to,fordiv(prev,d,if(!mapisdefined(m304532,d) && (1==gcd(d, prev/d)),v304531[n] = d;mapput(m304532,d,n);break)); if(!v304531[n], p = A053669(prev); while(mapisdefined(m304532,prev), prev *= p); v304531[n] = prev; mapput(m304532,prev,n)); prev = v304531[n]);
    A304531(n) = v304531[n];
    A304532(n) = mapget(m304532,n);

Formula

Observed patterns:
For n = 2 .. 2+0, a(n) = 2*a(n-1).
For n = 4 .. 4+0, a(n) = 3*a(n-3).
For n = 11 .. 11+7, a(n) = 5*a(n-10).
For n = 42 .. 42+38, a(n) = 7*a(n-41).
For n = 237 .. 237+64, a(n) = 11*a(n-236).
For n = 1798 .. 1798+336, a(n) = 13*a(n-1797).
For n = 7192 .. 7192+1255, a(n) = 17*a(n-7191).
For n = 69611 .. 69611+4820, a(n) = 19*a(n-69610).
For n = 431203 .. 431203+41802, a(n) = 23*a(n-431202).
For n = 2401568 .. 2401568+131366, a(n) = 29*a(n-2401567).
Derived sequences. For all n >= 1:
A052331(a(n)) = A304533(n-1).
A064547(a(n)) = A304536(n-1).

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 02 2018

Keywords

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.

Crossrefs

Cf. A303772 (inverse).
Cf. also A064736, A113552, A207901, A281978, A282291, A302350, A302781, A302783, A303751, A304085, A304531 for similar permutations.

Programs

  • 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; };
    A303771(n) = A052330(A048675(A303760(n)));

Formula

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

Extensions

Name amended by Antti Karttunen, May 16 2018

A304533 Suspected permutation of nonnegative integers: a(n) = A052331(A304531(1+n)).

Original entry on oeis.org

0, 1, 3, 2, 6, 4, 36, 32, 33, 41, 8, 9, 11, 10, 14, 12, 44, 40, 45, 5, 7, 15, 13, 47, 34, 35, 43, 42, 46, 38, 4134, 4096, 4097, 4099, 4098, 4102, 4100, 4132, 4128, 4129, 4145, 16, 17, 19, 18, 22, 20, 52, 48, 49, 57, 24, 25, 27, 26, 30, 28, 60, 56, 61, 21, 23, 31, 29, 63, 50, 51, 59, 58, 62, 54, 4150, 4112, 4113, 4115, 4114, 4118, 4116, 4148, 4144, 4149, 37
Offset: 0

Views

Author

Antti Karttunen, May 14 2018

Keywords

Comments

All nonnegative integers occur provided that A304531 is a permutation of natural numbers.
Shares with sequences like A003188, A006068, A300838, A302846, A303765, A303767 and A304083 the property that when moving from any a(n) to a(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 may occur at the same step.

Crossrefs

Cf. A304534 (inverse).

Programs

Formula

a(n) = A052331(A304531(1+n)).
For all n >= 0, A000120(a(n)) = A304536(n), A019565(a(n)) = A304537(n).
Showing 1-3 of 3 results.