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-7 of 7 results.

A235146 a(n) = Least integer k such that it takes n iterations of "factor and reverse bits of odd prime divisors" (A235027) before a fixed point or cycle of 2 is reached; records in A235145.

Original entry on oeis.org

0, 19, 139, 719, 4793, 23773, 260863, 2375231, 21793843
Offset: 0

Views

Author

Antti Karttunen, Jan 03 2014

Keywords

Comments

Note, as for all composite values A235145(u * v) = max(A235145(u), A235145(v)) which can be further reduced as A235145(n) = Max_{p|n} A235145(p), and because for any odd prime p, lpf(A056539(p)) >= 3 (where lpf = A020639, the least prime dividing n) while 1/2 < A056539(n)/n < 2, it follows that this sequence gives also the positions of the records in A235145, as its new values must appear in order.
Also, because of that multiplicativity criterion, all terms (after zero) must be primes, and specifically, the terms are a subset of A235030 (i.e., of A204219).
Conjecture: additional property is that the primes here belong to that subset of p in A204219 for which A056539(p) > p. The list of such primes begins as: 19, 79, 103, 137, 139, 149, 157, 179, 191, 239, 271, 281, 293, 311, 317, 347, 367, 379, 439, 523, 541, 547, 557, 563, 569, 587, 607, 613, 647, 659, 719, 733, 743, 751, 787, ...

Crossrefs

A subset of A235030 and A204219.

Programs

  • PARI
    revbits(n) = fromdigits(Vecrev(binary(n)), 2);
    a235027(n) = {f = factor(n); for (k=1, #f~, if (f[k,1] != 2, f[k,1] = revbits(f[k,1]););); factorback(f);}
    find(v, newn) = {for(k=1, #v, if (v[#v -k + 1] == newn, return (k));); return (0);}
    a235145(n) = {ok = 0; v = [n]; while (! ok, newn = a235027(n); ind = find(v, newn); if (ind, ok = 1, v = concat(v, newn); n = newn);); #v - ind;}
    a(n) = {k = 0; while (a235145(k) != n, k = nextprime(k+1)); k;}
    lista(nn) = {kprec = 0; for (n=0, nn, k = kprec; while (a235145(k) != n, k = nextprime(k+1)); print1(k, ", "); kprec = k;);} \\ Michel Marcus, Aug 06 2017

Extensions

a(5)-a(8) from Michel Marcus, Aug 06 2017

A235027 Reverse the bits of prime divisors of n (with 2 -> 2), and multiply together: a(0)=0, a(1)=1, a(2)=2, a(p) = revbits(p) for odd primes p, a(u*v) = a(u) * a(v) for composites.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 12, 11, 14, 15, 16, 17, 18, 25, 20, 21, 26, 29, 24, 25, 22, 27, 28, 23, 30, 31, 32, 39, 34, 35, 36, 41, 50, 33, 40, 37, 42, 53, 52, 45, 58, 61, 48, 49, 50, 51, 44, 43, 54, 65, 56, 75, 46, 55, 60, 47, 62, 63, 64, 55, 78, 97
Offset: 0

Views

Author

Antti Karttunen, Jan 02 2014

Keywords

Comments

This is not a permutation of integers: a(25) = 25 = 5*5 = a(19) is the first case which breaks the injectivity. However, the first 24 terms are equal with A057889, which is a GF(2)[X]-analog of this sequence and which in contrary to this, is bijective. This stems from the fact that the set of irreducible GF(2)[X] polynomials (A014580) is closed under bit-reversal (A056539), while primes (A000040) are not.
Sequence A290078 gives the positions n where the ratio a(n)/n obtains new record values.
Note, instead of A056539 we could as well use A057889 to reverse the bits of n, and also A030101 when restricted to odd primes.

Examples

			a(33) = a(3*11) = a(3) * a(11) = 3 * 13 = 39 (because 3, in binary '11', stays same when reversed, while 11 (eleven), in binary '1011', changes to '1101' = 13).
		

Crossrefs

A235028 gives the fixed points. A235030 numbers such that n <> a(a(n)), or equally A001222(a(n)) > A001222(n). A235145 the number of iterations needed to reach a fixed point or cycle of 2, A235146 its records.

Programs

  • Mathematica
    f[p_, e_] := IntegerReverse[p, 2]^e; f[2, e_] := 2^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100, 0] (* Amiram Eldar, Sep 03 2023 *)
  • PARI
    revbits(n) = fromdigits(Vecrev(binary(n)), 2);
    a(n) = {my(f = factor(n)); for (k=1, #f~, if (f[k,1] != 2, f[k,1] = revbits(f[k,1]););); factorback(f);} \\ Michel Marcus, Aug 05 2017

Formula

Completely multiplicative with a(0)=0, a(1)=1, a(p) = A056539(p) for primes p (which maps 2 to 2, and reverses the binary representation of odd primes), and a(u*v) = a(u) * a(v) for composites.
Equally, after a(0)=0, a(p * q * ... * r) = A056539(p) * A056539(q) * ... * A056539(r), for primes p, q, etc., not necessarily distinct.
a(0)=0, a(1)=1, a(n) = A056539(A020639(n)) * a(n/A020639(n)).

A236850 After 0 and 1, numbers n whose binary representation encodes such a polynomial over GF(2) that all its irreducible factors (their binary codes) are primes in N (terms of A091206).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71
Offset: 1

Views

Author

Antti Karttunen, Feb 02 2014

Keywords

Comments

To determine whether n belongs to this sequence: first find a unique multiset of terms i, j, ..., k (terms not necessarily distinct) from A014580 for which i x j x ... x k = n, where x stands for the carryless multiplication (A048720). If and only if NONE of those i, j, ..., k is a composite (in other words, if all are primes in N, i.e. terms of A091206), then n is a member.
Equally, numbers which can be constructed as p x q x ... x r, where p, q, ..., r are terms of A091206. (Compare to the definition of A236860.)
Also fixed points of A236851(n). Proof: if k is a term of this sequence, the operation described in A236851 reduces to an identity operation. On the other hand, if k is not a term of this sequence, then it contains at least one irreducible GF(2)[X]-factor which is a composite in N, which is thus "broken" by A236851 to two or more separate GF(2)[X]-factors (either irreducible or not), and because the original factor was irreducible, and GF(2)[X] is a unique factorization domain, the new product computed over the new set of factors (with one or more "broken" pieces) cannot be equal to the original k. (Compare this to how primes are "broken" in a similar way in A235027, also A235145.)
Also by similar to above reasoning, positions where A234742(n) = A236837(n).
This is a subsequence of A236841, from which this differs for the first time at n=43, where A236841(43)=43, while from here 43 is missing, and a(43)=44.

Examples

			25 is the first term not included, as although it encodes an irreducible polynomial in GF(2)[X]: X^4 + X^3 + 1 (binary code 11001), it is composite in Z, thus not in A091206, but in A091214.
27 is included, as it factors as 5 x 7, and both factors are present in A091206.
37 is included, as it is a member of A091206 (irreducible in both Z and GF(2)[X]).
43 is NOT included because, even although it is a prime in Z, it factors as 3 x 25 in GF(2)[X]. Of these, only 3 is a term of A091206, while 25 belongs to A091214, as it further divides to 5*5.
		

Crossrefs

Subsequence of A236841.
Subsequence: A235032.

A236851 Remultiply n first "upward", from GF(2)[X] to N, and then remultiply that result back "downward", from N to GF(2)[X]: a(n) = A234741(A234742(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 17, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 51, 44, 45, 46, 47, 48, 49, 34, 51, 52, 53, 54, 39, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67
Offset: 0

Views

Author

Antti Karttunen, Feb 02 2014

Keywords

Examples

			5 ('101' in binary) = 3 x 3 (3 = '11' in binary). 3 is in A091206, so it stays intact, and 3 x 3 = 5, thus a(5)=5.
25 ('11001' in binary) = 25 (25 is irreducible in GF(2)[X]). However, it divides as 5*5 in Z, so the result is 5 x 5 = 17, thus a(25)=17, 25 being the least n which is not fixed by this function.
43 ('101011' in binary) = 3 x 25, of which the latter factor divides to 5*5, thus the result is 3 x 5 x 5 = 3 x 17 = 15 x 5 = 51.
		

Crossrefs

A236850 gives the fixed points.

Programs

Formula

a(n) = A234741(A234742(n)).
To compute a(n): factor n as a polynomial over GF(2) (where n is mapped to such polynomials via the binary representation of n), that is, find first a unique multiset of terms i, j, ..., k from A014580 for which i x j x ... x k = n, where x stands for the carryless multiplication (A048720). Then divide from those i, j, ..., k the ones that are in A091214 (composite integers in N) to their constituent prime factors (in N), and multiply all back together (including the factors that are in A091206 and thus not changed) with the carryless multiplication (A048720).
Compare this to how primes are "broken" in a similar way in A235027 (cf. also A235145).

A236860 After 0 and 1, numbers n all of whose prime divisors encode an irreducible polynomial over GF(2) (are terms of A091206).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 16, 18, 19, 21, 22, 24, 26, 27, 28, 31, 32, 33, 36, 37, 38, 39, 41, 42, 44, 47, 48, 49, 52, 54, 56, 57, 59, 61, 62, 63, 64, 66, 67, 72, 73, 74, 76, 77, 78, 81, 82, 84, 88, 91, 93, 94, 96, 97, 98, 99, 103, 104, 108, 109
Offset: 1

Views

Author

Antti Karttunen, Mar 08 2014

Keywords

Comments

After 0 and 1, positive integers which are products of p * q * ... * r, where p, q, ..., r are terms of A091206.
Also fixed points of A236852(n). Proof: if k is a term of this sequence, the operation described in A236852 reduces to an identity operation. On the other hand, if k is not a term of this sequence, then it has at least one prime divisor which is reducible in polynomial ring GF(2)[X], which is thus "broken" by A236852 (A234742) to two or more separate factors (either prime or not), and because the original factor was prime, and N is a unique factorization domain, the new product computed over the new set of factors (with one or more "broken" pieces) cannot be equal to the original k. (Compare this to how primes are "broken" in a similar way in A235027, also A235145.)
Note: This sequence is not equal to all n for which A234741(n) = A236846(n). The first counterexample occurs at a(325) = 741 (= 3*13*19) for which we have: A236846(741) = 281 (= 3 x 247 = 3 x (13*19)) while A234741(741) = 329 (= 3 x 13 x 19). Contrast this with the behavior of the "dual sequence" A236850, where the corresponding property holds.

Crossrefs

Complement: A236848.
Subsequence of A236842.
Fixed points of A236852.

Programs

  • PARI
    isp(p) = polisirreducible( Mod(1, 2) * Pol(binary(p))); \\ A091206
    isok(n) = if ((n==0), 1 , my(f=factor(n)); prod(k=1, #f~, isp(f[k,1])) != 0); \\ Michel Marcus, Dec 22 2018

A235030 Numbers such that A235027(A235027(n)) <> n; Numbers which are divisible by any of the odd terms of A204219.

Original entry on oeis.org

19, 38, 57, 59, 76, 79, 89, 95, 103, 109, 114, 118, 133, 137, 139, 149, 152, 157, 158, 171, 177, 178, 179, 190, 191, 206, 209, 211, 218, 228, 236, 237, 239, 241, 247, 266, 267, 271, 274, 278, 281, 285, 293, 295, 298, 304, 309, 311, 314, 316, 317, 323, 327, 342
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2014

Keywords

Comments

Sequence consists of all the primes in A204219 (after 2), together with all of their multiples.
Note that this is not the same as the numbers that do not occur in A235027 ("Garden of Eden" numbers for A235027), a subsequence of this sequence, which begins as: 19, 38, 57, 59, 76, 79, 89, 95, 103, 109, 114, 118, 133, 137, 139, 149, 152, 157, 158, 171, 177, 178, 179, 190, 191, 206, 211, 218, 228, 236, 237, 239, 241, 266, 267, 271, 274, 278, 281, 285, 293, 298, 304, 309, 311, 314, 316, 317, 327, 342, 347, 354, 356, 358, ...
The first term that occurs in this sequence, but not in the "GoE"-sequence is a(27)=209, as a(139) = 209 = 11*19 and 139 = A235146(2), the least integer which requires two steps to reach a fixed point or 2-cycle.
Both the above "GoE"-sequence, and its differences from this will be submitted later.

Crossrefs

A235028 Fixed points of A235027.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 21, 24, 25, 27, 28, 30, 31, 32, 34, 35, 36, 40, 42, 45, 48, 49, 50, 51, 54, 56, 60, 62, 63, 64, 68, 70, 72, 73, 75, 80, 81, 84, 85, 90, 93, 96, 98, 100, 102, 105, 107, 108, 112, 119, 120, 124, 125
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2014

Keywords

Comments

The first 20 terms are equal with A057890, after which a(21)=25, while A057890(21)=27. On the other hand, 33 is the first term which occurs in A057890 but does not occur here.
If terms x and y are included, then also their product x*y is included. If term x is included, then 2^k * x is also included. The sequence contains also all primes in A016041 and their mutual multiples. However, in addition to that, there are also terms like 143 = 11*13, where A235027 will map the factors to each other (as their binary expansions '1011' and '1101' are mirror images of each other), even although neither of them is present in A016041. (These latter kind of primes are in A074832).
Please use the "graph" link to see how the terms get rarer.

Crossrefs

The primes in this sequence: A016041.
Showing 1-7 of 7 results.