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.

A145342 a(n) = (A145341(n) + 1)/2.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Oct 08 2008

Keywords

Comments

This sequence is a permutation of the positive integers. It is its own inverse permutation.
Fixed points of the permutation are the terms of A044051. - Ivan Neretin, Oct 31 2015
From Yosu Yurramendi, Feb 04 2019: (Start)
If the terms (n > 0) are written as an array (left-aligned fashion) with rows of length 2^m, m = 0,1,2,3,...
1;
2, 3;
4, 5, 7, 6;
8, 9, 13, 11, 15, 10, 14, 12;
16, 17, 25, 21, 29, 19, 27, 23, 31, 18, 26, 22, 30, 20, 28, 24;
32, 33, 49, 41, 57, 37, 53, 45, 61, 35, 51, 43, 59, 39, 55, 47, 63, 34, ...
then the following relationship can be observed:
a(1) = 1, a(2) = 2, a(3) = 3,
for m > 0, a(2^(m+1)) = 2*a(2^m), a(2^m + 1) = a(2^m) + 1, a(2^(m+1)+ 2^m) = 2*a(2^(m+1)) - 1, for 0 < k < 2^m, a(2^(m+1)+ k) = 2*a(2^m + k) - 1, a(2^(m+1)+ 2^m + k) = a(2^(m+1) + k) + 1
(End)

Crossrefs

Programs

  • Mathematica
    Table[(FromDigits[Reverse[IntegerDigits[2n-1, 2]], 2] +1)/2, {n, 71}] (* Ivan Neretin, Oct 31 2015 *)
  • PARI
    a(n) = (1+fromdigits(Vecrev(binary(2*n-1)), 2))/2; \\ Michel Marcus, Feb 04 2019
  • R
    nmax <- 10^3 # by choice
    b <- vector()
    for (o in seq(1,nmax,2)){
      w <- which(as.numeric(intToBits(o))==1)
      b <- c(b, sum(2^(max(w)-w)))
    }
    a <- (b+1)/2
    a[1:71]
    # Yosu Yurramendi, Feb 04 2019
    

Extensions

More terms from R. J. Mathar and Ray Chandler, Oct 10 2008

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

A333415 Odd positive integers in base 2 read backwards.

Original entry on oeis.org

1, 11, 101, 111, 1001, 1101, 1011, 1111, 10001, 11001, 10101, 11101, 10011, 11011, 10111, 11111, 100001, 110001, 101001, 111001, 100101, 110101, 101101, 111101, 100011, 110011, 101011, 111011, 100111, 110111, 101111, 111111, 1000001, 1100001, 1010001, 1110001, 1001001
Offset: 1

Views

Author

Devansh Singh, Mar 20 2020

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local L,i;
     L:= convert(n,base,2);
     add(L[-i]*10^(i-1),i=1..nops(L));
    end proc
    map(f, [seq(i,i=1..100,2)]); # Robert Israel, May 19 2024
  • Mathematica
    Table[FromDigits[Reverse[IntegerDigits[n, 2]]], {n, 1, 75, 2}] (* Amiram Eldar, Apr 27 2020 *)
  • PARI
    a(n) = fromdigits(Vecrev(binary(2*n-1))); \\ Michel Marcus, May 19 2024

Formula

From Michel Marcus, Apr 23 2020: (Start)
a(n) = A007088(A145341(n)).
a(n) = A004086(A099821(n)). (End)

Extensions

New name, a(1)=1 and more terms from Michel Marcus, Apr 23 2020
Showing 1-3 of 3 results.