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-10 of 13 results. Next

A235045 Fixed points of permutations A235041/A235042.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 11, 12, 13, 14, 16, 19, 22, 24, 26, 28, 31, 32, 37, 38, 41, 44, 47, 48, 52, 56, 59, 61, 62, 64, 67, 73, 74, 76, 82, 88, 94, 96, 97, 103, 104, 109, 111, 112, 118, 122, 123, 124, 128, 131, 134, 135, 137, 146, 148, 152, 157, 159, 164, 167
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2014

Keywords

Examples

			In the following examples, X stands for the carryless multiplication of GF(2)[X] polynomials (A048720):
3 is a member, because it is in A091206, thus by definition fixed by A235041/A235042.
41 is a member for the same reason.
123 is a member, because 123 = 3*41, thus A235041(123) = A235041(3) X A235041(41) = 3 X 41 = A048720(3,41) = 123. That is, we happen to get the same result back as 3, '11' in binary, and 41, '101001' in binary, can be multiplied together to 123, '1111011' in binary, without producing any carries.
135 is a member, because 135 = 3*3*3*5, thus A235041(135) = A235041(3) X A235041(3) X A235041(3) X A235041(5) = 3 X 3 X 3 X 25 = 15 X 25 = 135.
		

Crossrefs

The sequence differs from its subsequence A235032 for the first time at n=54, where a(54)=135, while A235032(54)=137.
A091206 gives the prime terms.

A234748 Self-inverse and multiplicative permutation of natural numbers, A235041-conjugate of Blue code: a(n) = A235042(A193231(A235041(n))).

Original entry on oeis.org

0, 1, 3, 2, 9, 31, 6, 7, 27, 4, 93, 13, 18, 11, 21, 62, 81, 37, 12, 19, 279, 14, 39, 67, 54, 961, 33, 8, 63, 73, 186, 5, 243, 26, 111, 217, 36, 17, 57, 22, 837, 61, 42, 53, 117, 124, 201, 59, 162, 49, 2883, 74, 99, 43, 24, 403, 189, 38, 219, 47, 558, 41, 15, 28, 729, 341, 78, 23, 333
Offset: 0

Views

Author

Antti Karttunen, Dec 31 2013

Keywords

Comments

a(n) has the same prime signature as n: The permutation maps primes to primes, squares to squares, cubes to cubes, and so on.

Examples

			Example of multiplicativity:
a(5)=31, a(11)=13, a(5*11) = a(55) = a(5) * a(11) = 31*13 = 403.
		

Crossrefs

Cf. A234747 for a variant.

Programs

Formula

a(n) = A235042(A193231(A235041(n))).

A245453 Self-inverse and multiplicative permutation of natural numbers, A235041-conjugate of balanced bit-reverse: a(n) = A235042(A057889(A235041(n))).

Original entry on oeis.org

0, 1, 2, 3, 4, 19, 6, 7, 8, 9, 38, 13, 12, 11, 14, 57, 16, 59, 18, 5, 76, 21, 26, 53, 24, 361, 22, 27, 28, 109, 114, 31, 32, 39, 118, 133, 36, 41, 10, 33, 152, 37, 42, 103, 52, 171, 106, 61, 48, 49, 722, 177, 44, 23, 54, 247, 56, 15, 218, 17, 228, 47, 62, 63, 64
Offset: 0

Views

Author

Antti Karttunen, Aug 07 2014

Keywords

Comments

a(n) has the same prime signature as n: The permutation maps primes to primes, squares to squares, cubes to cubes, and so on. Permutation A234748 shares the same property.

Examples

			Example of multiplicativity:
a(5)=19, a(11)=13, a(55) = a(5*11) = a(5) * a(11) = 19*13 = 247.
		

Crossrefs

Programs

Formula

a(n) = A235042(A057889(A235041(n))).

A014580 Binary irreducible polynomials (primes in the ring GF(2)[X]), evaluated at X=2.

Original entry on oeis.org

2, 3, 7, 11, 13, 19, 25, 31, 37, 41, 47, 55, 59, 61, 67, 73, 87, 91, 97, 103, 109, 115, 117, 131, 137, 143, 145, 157, 167, 171, 185, 191, 193, 203, 211, 213, 229, 239, 241, 247, 253, 283, 285, 299, 301, 313, 319, 333, 351, 355, 357, 361, 369, 375
Offset: 1

Views

Author

David Petry (petry(AT)accessone.com)

Keywords

Comments

Or, binary irreducible polynomials, interpreted as binary vectors, then written in base 10.
The numbers {a(n)} are a subset of the set {A206074}. - Thomas Ordowski, Feb 21 2014
2^n - 1 is a term if and only if n = 2 or n is a prime and 2 is a primitive root modulo n. - Jianing Song, May 10 2021
For odd k, k is a term if and only if binary_reverse(k) = A145341((k+1)/2) is. - Joerg Arndt and Jianing Song, May 10 2021

Examples

			x^4 + x^3 + 1 -> 16+8+1 = 25. Or, x^4 + x^3 + 1 -> 11001 (binary) = 25 (decimal).
		

Crossrefs

Written in binary: A058943.
Number of degree-n irreducible polynomials: A001037, see also A000031.
Multiplication table: A048720.
Characteristic function: A091225. Inverse: A091227. a(n) = A091202(A000040(n)). Almost complement of A091242. Union of A091206 & A091214 and also of A091250 & A091252. First differences: A091223. Apart from a(1) and a(2), a subsequence of A092246 and hence A000069.
Table of irreducible factors of n: A256170.
Irreducible polynomials satisfying particular conditions: A071642, A132447, A132449, A132453, A162570.
Factorization sentinel: A278239.
Sequences analyzing the difference between factorization into GF(2)[X] irreducibles and ordinary prime factorization of the corresponding integer: A234741, A234742, A235032, A235033, A235034, A235035, A235040, A236850, A325386, A325559, A325560, A325563, A325641, A325642, A325643.
Factorization-preserving isomorphisms: A091203, A091204, A235041, A235042.
See A115871 for sequences related to cross-domain congruences.
Functions based on the irreducibles: A305421, A305422.

Programs

  • Mathematica
    fQ[n_] := Block[{ply = Plus @@ (Reverse@ IntegerDigits[n, 2] x^Range[0, Floor@ Log2@ n])}, ply == Factor[ply, Modulus -> 2] && n != 2^Floor@ Log2@ n]; fQ[2] = True; Select[ Range@ 378, fQ] (* Robert G. Wilson v, Aug 12 2011 *)
    Reap[Do[If[IrreduciblePolynomialQ[IntegerDigits[n, 2] . x^Reverse[Range[0, Floor[Log[2, n]]]], Modulus -> 2], Sow[n]], {n, 2, 1000}]][[2, 1]] (* Jean-François Alcover, Nov 21 2016 *)
  • PARI
    is(n)=polisirreducible(Pol(binary(n))*Mod(1,2)) \\ Charles R Greathouse IV, Mar 22 2013

A234741 a(n) is the base-2 carryless product of the prime factors of n; Encoding of the product of the polynomials over GF(2) represented by the prime factors of n (with multiplicity).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 22 2014

Keywords

Comments

"Encoding" means the number whose binary representation is given by the coefficients of the polynomial, e.g., 13=1101[2] encodes X^3+X^2+1. The product is the usual multiplication of polynomials in GF(2)[X] (or binary multiplication without carry-bits, cf. A048720).
a(n) <= n. [As all terms of the table A061858 are nonnegative]

Examples

			a(9) = a(3*3) = 5, as when we multiply 3 ('11' in binary) with itself, and discard the carry-bits, using XOR (A003987) instead of normal addition, we get:
   11
  110
-----
  101
that is, 5, as '101' is its binary representation. In other words, a(9) = a(3*3) = A048720(3,3) = 5.
Alternatively, 9 = 3*3, and 3=11[2] encodes the polynomial X+1, and (X+1)*(X+1) = X^2+1 in GF(2)[X], which is encoded as 101[2] = 5, therefore a(9) = 5. - _M. F. Hasler_, Feb 16 2014
		

Crossrefs

A235034 gives the k for which a(k)=k.
A236833(n) gives the number of times n occurs in this sequence.
A236841 gives the same sequence sorted and duplicates removed, A236834 gives the numbers that do not occur here, A236835 gives numbers that occur more than once.
A325562(n) gives the number of iterations needed before one of the fixed points (terms of A235034) is reached.

Programs

  • PARI
    A234741(n)={n=factor(n);n[,1]=apply(t->Pol(binary(t)),n[,1]);sum(i=1,#n=Vec(factorback(n))%2,n[i]<<(#n-i))} \\ M. F. Hasler, Feb 18 2014

Formula

a(0)=0, a(1)=1, and for n > 1, a(n) = A048720(A020639(n),a(n/A020639(n))). [A048720 used as a bivariate function]
Equally, for n with its unique prime factorization n = p_1 * ... * p_k, with the p_i not necessarily distinct primes, a(n) = p_1 x ... x p_k, where x stands for carryless multiplication defined in A048720, which is isomorphic to multiplication in GF(2)[X].
a(2n) = 2*a(n).
More generally, if A061858(x,y) = 0, then a(x*y) = a(x)*a(y).
a(A235034(n)) = A235034(n).
A236378(n) = n - a(n).

Extensions

Term a(0) = 0 removed and a new primary definition added by Antti Karttunen, May 10 2019

A091206 Primes whose binary representation encodes a polynomial irreducible over GF(2).

Original entry on oeis.org

2, 3, 7, 11, 13, 19, 31, 37, 41, 47, 59, 61, 67, 73, 97, 103, 109, 131, 137, 157, 167, 191, 193, 211, 229, 239, 241, 283, 313, 379, 397, 419, 433, 463, 487, 499, 557, 563, 587, 601, 607, 613, 617, 631, 647, 661, 677, 701, 719, 757, 761, 769, 787, 827, 859
Offset: 1

Views

Author

Antti Karttunen, Jan 03 2004

Keywords

Comments

"Encoded in binary representation" means that a polynomial a(n)*X^n+...+a(0)*X^0 over GF(2) is represented by the binary number a(n)*2^n+...+a(0)*2^0 in Z (where each coefficient a(k) = 0 or 1).
Subsequence with Hamming weight nonprime starts 2, 1019, 1279, 1531, 1663, 1759, 1783, 1789, 2011, 2027, 2543, 2551, ... [Joerg Arndt, Nov 01 2013]. These are now given by A255569. - Antti Karttunen, May 14 2015

Crossrefs

Intersection of A014580 and A000040.
Apart from a(2) = 3 a subsequence of A027697. The numbers in A027697 but not here are listed in A238186.
Also subsequence of A235045 (its primes. Cf. also A235041-A235042).
Cf. A091209 (Primes whose binary expansion encodes a polynomial reducible over GF(2)), A091212 (Composite, and reducible over GF(2)), A091214 (Composite, but irreducible over GF(2)), A257688 (either 1, prime or irreducible over GF(2)).
Subsequence: A255569.

Programs

  • Mathematica
    okQ[p_] := Module[{id, pol, x}, id = IntegerDigits[p, 2] // Reverse; pol = id.x^Range[0, Length[id] - 1]; IrreduciblePolynomialQ[pol, Modulus -> 2]];
    Select[Prime[Range[1000]], okQ] (* Jean-François Alcover, Feb 06 2023 *)
  • PARI
    is(n)=polisirreducible( Mod(1,2) * Pol(digits(n,2)) );
    forprime(n=2,10^3,if (is(n), print1(n,", ")));
    \\ Joerg Arndt, Nov 01 2013

Formula

a(n) = A000040(A091207(n)) = A014580(A091208(n)).

A091209 Primes whose binary representation encodes a polynomial reducible over GF(2).

Original entry on oeis.org

5, 17, 23, 29, 43, 53, 71, 79, 83, 89, 101, 107, 113, 127, 139, 149, 151, 163, 173, 179, 181, 197, 199, 223, 227, 233, 251, 257, 263, 269, 271, 277, 281, 293, 307, 311, 317, 331, 337, 347, 349, 353, 359, 367, 373, 383, 389, 401, 409, 421, 431, 439, 443, 449, 457, 461, 467, 479, 491, 503, 509, 521, 523
Offset: 1

Views

Author

Antti Karttunen, Jan 03 2004

Keywords

Comments

"Encoded in binary representation" means that a polynomial a(n)*X^n+...+a(0)*X^0 over GF(2) is represented by the binary number a(n)*2^n+...+a(0)*2^0 in Z (where each coefficient a(k) = 0 or 1).
Except for 3, all primes with even Hamming weight (A027699) are terms, see A238186 for the subsequence of primes with odd Hamming weight. [Joerg Arndt and Antti Karttunen, Feb 19 2014]

Crossrefs

Intersection of A000040 and A091242.
Disjoint union of A238186 and (A027699 \ {3}).
Left inverse: A235043.
Cf. A091206 (Primes whose binary expansion encodes a polynomial irreducible over GF(2)), A091212 (Composite, and reducible over GF(2)), A091214 (Composite, but irreducible over GF(2)).

Programs

  • Maple
    Primes:= select(isprime,[2,seq(2*i+1,i=1..1000)]):
    filter:= proc(n) local L,x;
        L:= convert(n,base,2);
        Irreduc(add(L[i]*x^(i-1),i=1..nops(L))) mod 2;
    end proc:
    remove(filter,Primes); # Robert Israel, May 17 2015
  • Mathematica
    Select[Prime[Range[2, 100]], !IrreduciblePolynomialQ[bb = IntegerDigits[#, 2]; Sum[bb[[k]] x^(k-1), {k, 1, Length[bb]}], Modulus -> 2]&] (* Jean-François Alcover, Feb 28 2016 *)
  • PARI
    forprime(p=2, 10^3, if( ! polisirreducible( Mod(1,2)*Pol(binary(p)) ), print1(p,", ") ) ); \\ Joerg Arndt, Feb 19 2014

Formula

a(n) = A000040(A091210(n)) = A091242(A091211(n)).
Other identities. For all n >= 1:
A235043(a(n)) = n. [A235043 works as a left inverse of this sequence.]

A091202 Factorization-preserving isomorphism from nonnegative integers to binary codes for polynomials over GF(2).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 11, 8, 5, 14, 13, 12, 19, 22, 9, 16, 25, 10, 31, 28, 29, 26, 37, 24, 21, 38, 15, 44, 41, 18, 47, 32, 23, 50, 49, 20, 55, 62, 53, 56, 59, 58, 61, 52, 27, 74, 67, 48, 69, 42, 43, 76, 73, 30, 35, 88, 33, 82, 87, 36, 91, 94, 39, 64, 121, 46, 97, 100, 111, 98
Offset: 0

Views

Author

Antti Karttunen, Jan 03 2004

Keywords

Comments

E.g. we have the following identities: A000005(n) = A091220(a(n)), A001221(n) = A091221(a(n)), A001222(n) = A091222(a(n)), A008683(n) = A091219(a(n)), A014580(n) = a(A000040(n)), A049084(n) = A091227(a(n)).

Crossrefs

Inverse: A091203.
Several variants exist: A235041, A091204, A106442, A106444, A106446.
Cf. also A302023, A302025, A305417, A305427 for other similar permutations.

Programs

  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A091225(n) = polisirreducible(Pol(binary(n))*Mod(1, 2));
    A305420(n) = { my(k=1+n); while(!A091225(k),k++); (k); };
    A305421(n) = { my(f = subst(lift(factor(Pol(binary(n))*Mod(1, 2))),x,2)); for(i=1,#f~,f[i,1] = Pol(binary(A305420(f[i,1])))); fromdigits(Vec(factorback(f))%2,2); };
    A091202(n) = if(n<=1,n,if(!(n%2),2*A091202(n/2),A305421(A091202(A064989(n))))); \\ Antti Karttunen, Jun 10 2018

Formula

a(0)=0, a(1)=1, a(p_i) = A014580(i) for primes p_i with index i and for composites a(p_i * p_j * ...) = a(p_i) X a(p_j) X ..., where X stands for carryless multiplication of GF(2)[X] polynomials (A048720).
Other identities. For all n >= 1, the following holds:
A091225(a(n)) = A010051(n). [Maps primes to binary representations of irreducible GF(2) polynomials, A014580, and nonprimes to union of {1} and the binary representations of corresponding reducible polynomials, A091242. The permutations A091204, A106442, A106444, A106446, A235041 and A245703 have the same property.]
From Antti Karttunen, Jun 10 2018: (Start)
For n <= 1, a(n) = n, for n > 1, a(n) = 2*a(n/2) if n is even, and if n is odd, then a(n) = A305421(a(A064989(n))).
a(n) = A305417(A156552(n)) = A305427(A243071(n)).
(End)

A091214 Composite numbers whose binary representation encodes a polynomial irreducible over GF(2).

Original entry on oeis.org

25, 55, 87, 91, 115, 117, 143, 145, 171, 185, 203, 213, 247, 253, 285, 299, 301, 319, 333, 351, 355, 357, 361, 369, 375, 391, 395, 415, 425, 445, 451, 471, 477, 501, 505, 515, 529, 535, 539, 545, 623, 637, 665, 675, 687, 695, 721, 731, 789, 799, 803, 817
Offset: 1

Views

Author

Antti Karttunen, Jan 03 2004

Keywords

Comments

"Encoded in binary representation" means that a polynomial a(n)*X^n+...+a(0)*X^0 over GF(2) is represented by the binary number a(n)*2^n+...+a(0)*2^0 in Z (where each coefficient a(k) = 0 or 1).

Crossrefs

Intersection of A002808 and A014580.
Subsequence of A235033, A236834 and A236838.
Left inverse: A235044.
Cf. A091206 (Primes whose binary expansion encodes a polynomial irreducible over GF(2)), A091209 (Primes that encode a polynomial reducible over GF(2)), A091212 (Composite, and reducible over GF(2)).
Cf. also A235041-A235042.

Programs

  • Mathematica
    fQ[n_] := Block[{ply = Plus @@ (Reverse@ IntegerDigits[n, 2] x^Range[0, Floor@ Log2@ n])}, ply == Factor[ply, Modulus -> 2] && n != 2^Floor@ Log2@ n && ! PrimeQ@ n]; Select[ Range@ 840, fQ] (* Robert G. Wilson v, Aug 12 2011 *)
  • PARI
    isA014580(n)=polisirreducible(Pol(binary(n))*Mod(1, 2)); \\ This function from Charles R Greathouse IV
    isA091214(n) = (!isprime(n) && isA014580(n));
    n = 0; i = 0; while(n < 2^20, n++; if(isA091214(n), i++; write("b091214.txt", i, " ", n)));
    \\ The b-file was computed with this program. Antti Karttunen, May 17 2015

Formula

Other identities. For all n >= 1:
A235044(a(n)) = n. [A235044 works as a left inverse of this sequence.]
a(n) = A014580(A091215(n)). - Antti Karttunen, May 17 2015

Extensions

Entry revised and name corrected by Antti Karttunen, May 17 2015

A245703 Permutation of natural numbers: a(1) = 1, a(p_n) = A014580(a(n)), a(c_n) = A091242(a(n)), where p_n = n-th prime, c_n = n-th composite number and A014580(n) and A091242(n) are binary codes for n-th irreducible and n-th reducible polynomials over GF(2), respectively.

Original entry on oeis.org

1, 2, 3, 4, 7, 5, 11, 6, 8, 12, 25, 9, 13, 17, 10, 14, 47, 18, 19, 34, 15, 20, 31, 24, 16, 21, 62, 26, 55, 27, 137, 45, 22, 28, 42, 33, 37, 23, 29, 79, 59, 35, 87, 71, 36, 166, 41, 58, 30, 38, 54, 44, 61, 49, 32, 39, 99, 76, 319, 46, 91, 108, 89, 48, 200, 53, 97, 75, 40, 50, 203, 70, 67, 57, 78, 64, 43, 51
Offset: 1

Views

Author

Antti Karttunen, Aug 02 2014

Keywords

Comments

All the permutations A091202, A091204, A106442, A106444, A106446, A235041 share the same property that primes (A000040) are mapped bijectively to the binary representations of irreducible GF(2) polynomials (A014580) but while they determine the mapping of composites (A002808) to the corresponding binary codes of reducible polynomials (A091242) by a simple multiplicative rule, this permutation employs index-recursion also in that case.

Crossrefs

Programs

  • PARI
    allocatemem(123456789);
    a014580 = vector(2^18);
    a091242 = vector(2^22);
    isA014580(n)=polisirreducible(Pol(binary(n))*Mod(1, 2)); \\ This function from Charles R Greathouse IV
    i=0; j=0; n=2; while((n < 2^22), if(isA014580(n), i++; a014580[i] = n, j++; a091242[j] = n); n++)
    A245703(n) = if(1==n, 1, if(isprime(n), a014580[A245703(primepi(n))], a091242[A245703(n-primepi(n)-1)]));
    for(n=1, 10001, write("b245703.txt", n, " ", A245703(n)));
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A245703 n) (cond ((= 1 n) n) ((= 1 (A010051 n)) (A014580 (A245703 (A000720 n)))) (else (A091242 (A245703 (A065855 n))))))

Formula

a(1) = 1, a(p_n) = A014580(a(n)) and a(c_n) = A091242(a(n)), where p_n is the n-th prime, A000040(n) and c_n is the n-th composite, A002808(n).
a(1) = 1, after which, if A010051(n) is 1 [i.e. n is prime], then a(n) = A014580(a(A000720(n))), otherwise a(n) = A091242(a(A065855(n))).
As a composition of related permutations:
a(n) = A245702(A135141(n)).
a(n) = A091204(A245821(n)).
Other identities. For all n >= 1, the following holds:
a(A007097(n)) = A091230(n). [Maps iterates of primes to the iterates of A014580. Permutation A091204 has the same property]
A091225(a(n)) = A010051(n). [Maps primes to binary representations of irreducible GF(2) polynomials, A014580, and nonprimes to union of {1} and the binary representations of corresponding reducible polynomials, A091242. The permutations A091202, A091204, A106442, A106444, A106446 and A235041 have the same property.]
Showing 1-10 of 13 results. Next