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 20 results. Next

A305788 Restricted growth sequence transform of A278233, filter-sequence for GF(2)[X]-factorization.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 2, 5, 4, 6, 2, 6, 2, 4, 5, 7, 7, 8, 2, 9, 3, 4, 4, 10, 2, 4, 6, 6, 4, 10, 2, 11, 4, 12, 4, 13, 2, 4, 6, 14, 2, 6, 4, 6, 10, 8, 2, 12, 4, 4, 11, 6, 4, 13, 2, 10, 6, 8, 2, 14, 2, 4, 6, 15, 9, 8, 2, 16, 3, 8, 4, 17, 2, 4, 10, 6, 4, 13, 4, 16, 3, 4, 8, 9, 15, 8, 2, 10, 4, 17, 2, 13, 4, 4, 6, 18, 2, 8, 6, 6, 8, 18, 2, 10, 10
Offset: 1

Views

Author

Antti Karttunen, Jun 10 2018

Keywords

Comments

This is GF(2)[X] analog of A101296.

Crossrefs

Cf. A278233.
Cf. A014580 (positions of 2's).

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A278233(n) = { my(p=0, f=vecsort((factor(Pol(binary(n))*Mod(1, 2))[, 2]), , 4)); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };
    v305788 = rgs_transform(vector(up_to,n,A278233(n)));
    A305788(n) = v305788[n];

A305789 Filter-sequence combining prime signature of n (A046523) and similar signature for GF(2)[X]-factorization (A278233).

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 2, 6, 7, 8, 2, 9, 2, 5, 10, 11, 12, 13, 2, 14, 15, 5, 16, 17, 18, 5, 19, 9, 16, 20, 2, 21, 5, 22, 5, 23, 2, 5, 8, 24, 2, 25, 16, 9, 26, 27, 2, 28, 7, 29, 30, 9, 16, 31, 32, 17, 8, 27, 2, 33, 2, 5, 9, 34, 35, 36, 2, 37, 15, 36, 16, 38, 2, 5, 26, 9, 5, 39, 16, 40, 41, 5, 42, 43, 44, 27, 32, 17, 16, 45, 32, 46, 5, 5, 8, 47, 2, 13, 9, 48, 42
Offset: 1

Views

Author

Antti Karttunen, Jun 10 2018

Keywords

Comments

Restricted growth sequence transform of ordered pair [A046523(n), A278233(n)].
For all i, j: a(i) = a(j) => A305802(i) = A305802(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A278233(n) = { my(p=0, f=vecsort((factor(Pol(binary(n))*Mod(1, 2))[, 2]), , 4)); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };
    Aux305789(n) = [A046523(n), A278233(n)];
    v305789 = rgs_transform(vector(up_to,n,Aux305789(n)));
    A305789(n) = v305789[n];

A278239 a(n) = A278233(A277699(n)).

Original entry on oeis.org

1, 4, 6, 16, 12, 60, 6, 64, 30, 180, 6, 240, 12, 60, 24, 256, 240, 420, 6, 720, 12, 60, 30, 960, 6, 180, 60, 240, 30, 360, 30, 1024, 30, 5040, 30, 1680, 6, 60, 360, 2880, 30, 180, 210, 240, 120, 420, 6, 3840, 60, 60, 96, 720, 210, 1260, 6, 960, 60, 420, 30, 2160, 12, 420, 60, 4096, 180, 420, 30, 45360, 60, 420, 30, 6720, 30, 60, 840, 240, 30, 12600, 30, 11520, 12
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2016

Keywords

Comments

Prime factorization sentinel computed for A277699. Factorization is essentially done in the polynomial ring GF(2)[X].

Crossrefs

Programs

Formula

a(n) = A278233(A277699(n)).

A278238 a(n) = A278233(A000695(n)) = A278233(n)^2.

Original entry on oeis.org

1, 4, 4, 16, 16, 36, 4, 64, 36, 144, 4, 144, 4, 36, 64, 256, 256, 900, 4, 1296, 16, 36, 36, 576, 4, 36, 144, 144, 36, 576, 4, 1024, 36, 2304, 36, 3600, 4, 36, 144, 5184, 4, 144, 36, 144, 576, 900, 4, 2304, 36, 36, 1024, 144, 36, 3600, 4, 576, 144, 900, 4, 5184, 4, 36, 144
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A278233(A000695(n)).
a(n) = A278233(n)^2.

A286383 a(n) = A278233(A003188(n)).

Original entry on oeis.org

1, 2, 2, 6, 2, 4, 4, 12, 2, 8, 6, 12, 2, 6, 8, 24, 2, 12, 6, 24, 2, 6, 12, 36, 4, 6, 6, 30, 2, 16, 16, 48, 6, 32, 6, 60, 2, 6, 12, 72, 2, 12, 6, 30, 2, 12, 24, 72, 2, 6, 12, 30, 2, 24, 12, 60, 2, 12, 6, 48, 6, 6, 32, 96, 2, 12, 30, 96, 2, 30, 12, 180, 2, 6, 6, 30, 8, 24, 24, 216, 6, 6, 6, 60, 6, 12, 12, 60, 2, 48, 6, 60, 2, 6, 48, 144, 4, 30, 6, 30, 2, 64, 36
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A278233(A003188(n)).

A286384 a(n) = A278233(A006068(n)).

Original entry on oeis.org

1, 2, 2, 2, 6, 4, 4, 8, 6, 12, 2, 8, 6, 2, 12, 2, 24, 12, 6, 24, 2, 12, 6, 16, 16, 2, 30, 6, 6, 36, 4, 12, 6, 72, 2, 24, 12, 2, 30, 48, 6, 32, 6, 2, 60, 12, 6, 32, 6, 6, 48, 12, 6, 60, 2, 2, 30, 12, 24, 72, 2, 6, 12, 6, 60, 12, 12, 216, 6, 6, 6, 48, 6, 2, 60, 48, 6, 60, 2, 96, 2, 12, 30, 2, 96, 12, 30, 6, 6, 180, 2, 24, 24, 8, 30, 64, 36, 2, 30, 6, 30, 144, 4
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A278233(A006068(n)).

A048720 Multiplication table {0..i} X {0..j} of binary polynomials (polynomials over GF(2)) interpreted as binary vectors, then written in base 10; or, binary multiplication without carries.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 4, 3, 0, 0, 4, 6, 6, 4, 0, 0, 5, 8, 5, 8, 5, 0, 0, 6, 10, 12, 12, 10, 6, 0, 0, 7, 12, 15, 16, 15, 12, 7, 0, 0, 8, 14, 10, 20, 20, 10, 14, 8, 0, 0, 9, 16, 9, 24, 17, 24, 9, 16, 9, 0, 0, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 0, 0, 11, 20, 27, 32, 27, 20, 27, 32, 27, 20, 11, 0
Offset: 0

Views

Author

Antti Karttunen, Apr 26 1999

Keywords

Comments

Essentially same as A091257 but computed starting from offset 0 instead of 1.
Each polynomial in GF(2)[X] is encoded as the number whose binary representation is given by the coefficients of the polynomial, e.g., 13 = 2^3 + 2^2 + 2^0 = 1101_2 encodes 1*X^3 + 1*X^2 + 0*X^1 + 1*X^0 = X^3 + X^2 + X^0. - Antti Karttunen and Peter Munn, Jan 22 2021
To listen to this sequence, I find instrument 99 (crystal) works well with the other parameters defaulted. - Peter Munn, Nov 01 2022

Examples

			Top left corner of array:
  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ...
  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
  0  2  4  6  8 10 12 14 16 18 20 22 24 26 28 30 ...
  0  3  6  5 12 15 10  9 24 27 30 29 20 23 18 17 ...
  ...
From _Antti Karttunen_ and _Peter Munn_, Jan 23 2021: (Start)
Multiplying 10 (= 1010_2) and 11 (= 1011_2), in binary results in:
     1011
  *  1010
  -------
   c1011
  1011
  -------
  1101110  (110 in decimal),
and we see that there is a carry-bit (marked c) affecting the result.
In carryless binary multiplication, the second part of the process (in which the intermediate results are summed) looks like this:
    1011
  1011
  -------
  1001110  (78 in decimal).
(End)
		

Crossrefs

Cf. A051776 (Nim-product), A091257 (subtable).
Carryless multiplication in other bases: A325820 (3), A059692 (10).
Ordinary {0..i} * {0..j} multiplication table: A004247 and its differences from this: A061858 (which lists further sequences related to presence/absence of carry in binary multiplication).
Carryless product of the prime factors of n: A234741.
Binary irreducible polynomials ("X-primes"): A014580, factorization table: A256170, table of "X-powers": A048723, powers of 3: A001317, rearranged subtable with distinct terms (comparable to A054582): A277820.
See A014580 for further sequences related to the difference between factorization into GF(2)[X] irreducibles and ordinary prime factorization of the integer encoding.
Row/column 3: A048724 (even bisection of A003188), 5: A048725, 6: A048726, 7: A048727; main diagonal: A000695.
Associated additive operation: A003987.
Equivalent sequences, as compared with standard integer multiplication: A048631 (factorials), A091242 (composites), A091255 (gcd), A091256 (lcm), A280500 (division).
See A091202 (and its variants) and A278233 for maps from/to ordinary multiplication.
See A115871, A115872 and A277320 for tables related to cross-domain congruences.

Programs

  • Maple
    trinv := n -> floor((1+sqrt(1+8*n))/2); # Gives integral inverses of the triangular numbers
    # Binary multiplication of nn and mm, but without carries (use XOR instead of ADD):
    Xmult := proc(nn,mm) local n,m,s; n := nn; m := mm; s := 0; while (n > 0) do if(1 = (n mod 2)) then s := XORnos(s,m); fi; n := floor(n/2); # Shift n right one bit. m := m*2; # Shift m left one bit. od; RETURN(s); end;
  • Mathematica
    trinv[n_] := Floor[(1 + Sqrt[1 + 8*n])/2];
    Xmult[nn_, mm_] := Module[{n = nn, m = mm, s = 0}, While[n > 0, If[1 == Mod[n, 2], s = BitXor[s, m]]; n = Floor[n/2]; m = m*2]; Return[s]];
    a[n_] := Xmult[(trinv[n] - 1)*((1/2)*trinv[n] + 1) - n, n - (trinv[n]*(trinv[n] - 1))/2];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 16 2015, updated Mar 06 2016 after Maple *)
  • PARI
    up_to = 104;
    A048720sq(b,c) = fromdigits(Vec(Pol(binary(b))*Pol(binary(c)))%2, 2);
    A048720list(up_to) = { my(v = vector(1+up_to), i=0); for(a=0, oo, for(col=0, a, i++; if(i > up_to, return(v)); v[i] = A048720sq(col, a-col))); (v); };
    v048720 = A048720list(up_to);
    A048720(n) = v048720[1+n]; \\ Antti Karttunen, Feb 15 2021

Formula

a(n) = Xmult( (((trinv(n)-1)*(((1/2)*trinv(n))+1))-n), (n-((trinv(n)*(trinv(n)-1))/2)) );
T(2b, c)=T(c, 2b)=T(b, 2c)=2T(b, c); T(2b+1, c)=T(c, 2b+1)=2T(b, c) XOR c - Henry Bottomley, Mar 16 2001
For n >= 0, A003188(2n) = T(n, 3); A003188(2n+1) = T(n, 3) XOR 1, where XOR is the bitwise exclusive-or operator, A003987. - Peter Munn, Feb 11 2021

A278222 The least number with the same prime signature as A005940(n+1).

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 4, 8, 2, 6, 6, 12, 4, 12, 8, 16, 2, 6, 6, 12, 6, 30, 12, 24, 4, 12, 12, 36, 8, 24, 16, 32, 2, 6, 6, 12, 6, 30, 12, 24, 6, 30, 30, 60, 12, 60, 24, 48, 4, 12, 12, 36, 12, 60, 36, 72, 8, 24, 24, 72, 16, 48, 32, 64, 2, 6, 6, 12, 6, 30, 12, 24, 6, 30, 30, 60, 12, 60, 24, 48, 6, 30, 30, 60, 30, 210, 60, 120, 12, 60, 60, 180, 24, 120, 48, 96, 4, 12, 12
Offset: 0

Views

Author

Antti Karttunen, Nov 15 2016

Keywords

Comments

This sequence can be used for filtering certain base-2 related sequences, because it matches only with any such sequence b that can be computed as b(n) = f(A005940(n+1)), where f(n) is any function that depends only on the prime signature of n (some of these are listed under the index entry for "sequences computed from exponents in ...").
Matching in this context means that the sequence a matches with the sequence b iff for all i, j: a(i) = a(j) => b(i) = b(j). In other words, iff the sequence b partitions the natural numbers to the same or coarser equivalence classes (as/than the sequence a) by the distinct values it obtains.
Because the Doudna map n -> A005940(1+n) is an isomorphism from "unary-binary encoding of factorization" (see A156552) to the ordinary representation of the prime factorization of n, it follows that the equivalence classes of this sequence match with any such sequence b, where b(n) is computed from the lengths of 1-runs in the binary representation of n and the order of those 1-runs does not matter. Particularly, this holds for any sequence that is obtained as a "Run Length Transform", i.e., where b(n) = Product S(i), for some function S, where i runs through the lengths of runs of 1's in the binary expansion of n. See for example A227349.
However, this sequence itself is not a run length transform of any sequence (which can be seen for example from the fact that A046523 is not multiplicative).
Furthermore, this matches not only with sequences involving products of S(i), but with any sequence obtained with any commutative function applied cumulatively, like e.g., A000120 (binary weight, obtained in this case as Sum identity(i)), and A069010 (number of runs of 1's in binary representation of n, obtained as Sum signum(i)).

Crossrefs

Similar sequences: A278217, A278219 (other base-2 related variants), A069877 (base-10 related), A278226 (primorial base), A278234-A278236 (factorial base), A278243 (Stern polynomials), A278233 (factorization in ring GF(2)[X]), A046523 (factorization in Z).
Cf. also A286622 (rgs-transform of this sequence) and A286162, A286252, A286163, A286240, A286242, A286379, A286464, A286374, A286375, A286376, A286243, A286553 (various other sequences involving this sequence).
Sequences that partition N into same or coarser equivalence classes: too many to list all here (over a hundred). At least every sequence listed under index-entry "Run Length Transforms" is included (e.g., A227349, A246660, A278159), and also sequences like A000120 and A069010, and their combinations like A136277.

Programs

  • Mathematica
    f[n_, i_, x_] := Which[n == 0, x, EvenQ@ n, f[n/2, i + 1, x], True, f[(n - 1)/2, i, x Prime@ i]]; Array[If[# == 1, 1, Times @@ MapIndexed[ Prime[First[#2]]^#1 &, Sort[FactorInteger[#][[All, -1]], Greater]]] &@ f[# - 1, 1, 1] &, 99] (* Michael De Vlieger, May 09 2017 *)
  • PARI
    A046523(n)=factorback(primes(#n=vecsort(factor(n)[, 2], , 4)), n)
    a(n)=my(p=2, t=1); for(i=0,exponent(n), if(bittest(n,i), t*=p, p=nextprime(p+1))); A046523(t) \\ Charles R Greathouse IV, Nov 11 2021
  • Python
    from sympy import prime, factorint
    import math
    def A(n): return n - 2**int(math.floor(math.log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a005940(n): return b(n - 1)
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return a046523(a005940(n + 1)) # Indranil Ghosh, May 05 2017
    
  • Scheme
    (define (A278222 n) (A046523 (A005940 (+ 1 n))))
    

Formula

a(n) = A046523(A005940(1+n)).
a(n) = A124859(A278159(n)).
a(n) = A278219(A006068(n)).

Extensions

Misleading part of the name removed by Antti Karttunen, Apr 07 2022

A091203 Factorization-preserving isomorphism from binary codes of GF(2) polynomials to integers.

Original entry on oeis.org

0, 1, 2, 3, 4, 9, 6, 5, 8, 15, 18, 7, 12, 11, 10, 27, 16, 81, 30, 13, 36, 25, 14, 33, 24, 17, 22, 45, 20, 21, 54, 19, 32, 57, 162, 55, 60, 23, 26, 63, 72, 29, 50, 51, 28, 135, 66, 31, 48, 35, 34, 243, 44, 39, 90, 37, 40, 99, 42, 41, 108, 43, 38, 75, 64, 225, 114, 47, 324
Offset: 0

Views

Author

Antti Karttunen, Jan 03 2004

Keywords

Comments

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

Crossrefs

Programs

  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A091225(n) = polisirreducible(Pol(binary(n))*Mod(1, 2));
    A305419(n) = if(n<3,1, my(k=n-1); while(k>1 && !A091225(k),k--); (k));
    A305422(n) = { my(f = subst(lift(factor(Pol(binary(n))*Mod(1, 2))),x,2)); for(i=1,#f~,f[i,1] = Pol(binary(A305419(f[i,1])))); fromdigits(Vec(factorback(f))%2,2); };
    A091203(n) = if(n<=1,n,if(!(n%2),2*A091203(n/2),A003961(A091203(A305422(n))))); \\ Antti Karttunen, Jun 10 2018

Formula

a(0)=0, a(1)=1. For n's coding an irreducible polynomial ir_i, that is if n=A014580(i), we have a(n) = A000040(i) and for composite polynomials a(ir_i X ir_j X ...) = p_i * p_j * ..., where p_i = A000040(i) and X stands for carryless multiplication of GF(2)[X] polynomials (A048720) and * for the ordinary multiplication of integers (A004247).
Other identities. For all n >= 1, the following holds:
A010051(a(n)) = A091225(n). [After a(1)=1, maps binary representations of irreducible GF(2) polynomials, A014580, to primes and the binary representations of corresponding reducible polynomials, A091242, to composite numbers. The permutations A091205, A106443, A106445, A106447, A235042 and A245704 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) = A003961(a(A305422(n))).
a(n) = A005940(1+A305418(n)) = A163511(A305428(n)).
A046523(a(n)) = A278233(n).
(End)

A284010 a(n) = least natural number with the same prime signature polynomial p(n,x) has when it is factored over Z. Polynomial p(n,x) has only nonnegative integer coefficients that are encoded in the prime factorization of n.

Original entry on oeis.org

0, 0, 2, 0, 4, 2, 8, 0, 2, 2, 16, 2, 32, 6, 6, 0, 64, 2, 128, 2, 6, 2, 256, 2, 4, 6, 2, 2, 512, 2, 1024, 0, 30, 6, 12, 2, 2048, 6, 6, 2, 4096, 2, 8192, 2, 6, 2, 16384, 2, 8, 2, 30, 2, 32768, 2, 12, 2, 30, 30, 65536, 2, 131072, 6, 6, 0, 60, 2, 262144, 2, 30, 2, 524288, 2, 1048576, 6, 6, 2, 24, 6, 2097152, 2, 2, 6, 4194304, 6, 12, 6, 6, 2, 8388608, 4, 24, 2, 210
Offset: 1

Views

Author

Antti Karttunen, Mar 20 2017

Keywords

Comments

Let p(n,x) be the completely additive polynomial-valued function such that p(prime(n),x) = x^(n-1) as defined by Clark Kimberling in A206284. To compute a(n), factor p(n,x) over Z and collect the exponents of its irreducible polynomial factors using them as exponents of primes (in Z) as 2^e1 * 3^e2 * 5^e3 * ..., with e1 >= e2 >= e3 >= ...

Examples

			For n = 7 = prime(4), the corresponding polynomial is x^3, which factorizes as (x)(x)(x), thus a(7) = 2^3 = 8.
For n = 14 = prime(4) * prime(1), the corresponding polynomial is x^3 + 1, which factorizes as (x + 1)(x^2 - x + 1), thus a(14) = 2^1 * 3^1 = 6.
For n = 90 = prime(3) * prime(2)^2 * prime(1), the corresponding polynomial is x^2 + 2x + 1, which factorizes as (x + 1)^2, thus a(90) = 2^2 = 4.
		

Crossrefs

Cf. A046523, A206284 (positions of 2's), A206442, A277322, A284011, A284012.
Cf. also A260443, A278233, A278243.

Programs

  • PARI
    \\ After Charles R Greathouse IV's code in A046523 and A277322:
    pfps(n) = { my(f=factor(n)); sum(i=1, #f~, f[i, 2] * 'x^(primepi(f[i, 1])-1)); };
    A284010(n) = { if(!bitand(n, (n-1)), 0, my(p=0, f=vecsort(factor(pfps(n))[, 2], ,4)); prod(i=1, #f, (p=nextprime(p+1))^f[i])); }

Formula

a(2^n) = 0. [By an explicit convention.]
Other identities. For all n >= 1:
A284011(n) = a(A260443(n)).
Showing 1-10 of 20 results. Next