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

A277825 a(n) = A048725(A065621(n)) = A048720(A065621(n),5).

Original entry on oeis.org

5, 10, 27, 20, 57, 54, 39, 40, 125, 114, 99, 108, 65, 78, 95, 80, 245, 250, 235, 228, 201, 198, 215, 216, 141, 130, 147, 156, 177, 190, 175, 160, 485, 490, 507, 500, 473, 470, 455, 456, 413, 402, 387, 396, 417, 430, 447, 432, 277, 282, 267, 260, 297, 294, 311, 312, 365, 354, 371, 380, 337, 350, 335, 320, 965, 970, 987, 980, 1017, 1014, 999, 1000
Offset: 1

Views

Author

Antti Karttunen, Nov 02 2016

Keywords

Crossrefs

Column 3 of A277820, Column 5 of A277320.

Programs

Formula

a(n) = A048724(A277823(n)) = A048725(A065621(n)).
a(n) = A048720(A065621(n),5).

A048729 Differences between A008587 (multiples of 5) and A048725.

Original entry on oeis.org

0, 0, 0, 0, 0, 8, 0, 8, 0, 0, 16, 16, 0, 8, 16, 24, 0, 0, 0, 0, 32, 40, 32, 40, 0, 0, 16, 16, 32, 40, 48, 56, 0, 0, 0, 0, 0, 8, 0, 8, 64, 64, 80, 80, 64, 72, 80, 88, 0, 0, 0, 0, 32, 40, 32, 40, 64, 64, 80, 80, 96, 104, 112, 120, 0
Offset: 0

Views

Author

Antti Karttunen, Apr 26 1999

Keywords

Crossrefs

Positions of zeros are given by A048716.
Diagonal 5 of A061858.

Formula

a(n) = ((n*5)-Xmult(n, 5))

A284575 a(n) = A048725(n) mod 3.

Original entry on oeis.org

0, 2, 1, 0, 2, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 1, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 1, 0, 2, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 1, 1, 0, 2, 0, 2, 0, 0, 0, 0, 2, 1, 0, 2, 1, 1, 2, 2, 0, 2, 0, 2, 2, 2, 2, 2, 2, 1, 0, 2, 2, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 1, 0, 2, 2, 0, 0, 0, 2, 0, 2, 2, 2, 2, 2, 0, 2, 1, 0, 0, 0, 1, 1, 0
Offset: 0

Views

Author

Antti Karttunen, Apr 10 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A048725(n) mod 3.

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

A048724 Write n and 2n in binary and add them mod 2.

Original entry on oeis.org

0, 3, 6, 5, 12, 15, 10, 9, 24, 27, 30, 29, 20, 23, 18, 17, 48, 51, 54, 53, 60, 63, 58, 57, 40, 43, 46, 45, 36, 39, 34, 33, 96, 99, 102, 101, 108, 111, 106, 105, 120, 123, 126, 125, 116, 119, 114, 113, 80, 83, 86, 85, 92, 95, 90, 89, 72, 75, 78, 77, 68, 71, 66, 65, 192
Offset: 0

Views

Author

Antti Karttunen, Apr 26 1999

Keywords

Comments

Reversing binary representation of -n. Converting sum of powers of 2 in binary representation of a(n) to alternating sum gives -n. Note that the alternation is applied only to the nonzero bits and does not depend on the exponent of two. All integers have a unique reversing binary representation (see cited exercise for proof). Complement of A065621. - Marc LeBrun, Nov 07 2001
A permutation of the "evil" numbers A001969. - Marc LeBrun, Nov 07 2001
A048725(n) = a(a(n)). - Reinhard Zumkeller, Nov 12 2004

Examples

			12 = 1100 in binary, 24=11000 and their sum is 10100=20, so a(12)=20.
a(4) = 12 = + 8 + 4 -> - 8 + 4 = -4.
		

References

  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1969, Vol. 2, p. 178, (exercise 4.1. Nr. 27)

Crossrefs

Bisection of A003188 (even part).
See also A065620, A065621.
Cf. A242399.

Programs

Formula

a(n) = Xmult(n, 3) (or n XOR (n<<1)).
a(n) = A065621(-n).
a(2n) = 2a(n), a(2n+1) = 2a(n) + 2(-1)^n + 1.
G.f. 1/(1-x) * sum(k>=0, 2^k*(3t-t^3)/(1+t)/(1+t^2), t=x^2^k). - Ralf Stephan, Sep 08 2003
a(n) = sum(k=0, n, (1-(-1)^round(+n/2^k))/2*2^k). - Benoit Cloitre, Apr 27 2005
a(n) = A001969(A003188(n)). - Philippe Deléham, Apr 29 2005
a(n) = A106409(2*n) for n>0. - Reinhard Zumkeller, May 02 2005
a(n) = A142149(2*n). - Reinhard Zumkeller, Jul 15 2008

A038183 One-dimensional cellular automaton 'sigma-minus' (Rule 90): 000,001,010,011,100,101,110,111 -> 0,1,0,1,1,0,1,0.

Original entry on oeis.org

1, 5, 17, 85, 257, 1285, 4369, 21845, 65537, 327685, 1114129, 5570645, 16843009, 84215045, 286331153, 1431655765, 4294967297, 21474836485, 73014444049, 365072220245, 1103806595329, 5519032976645, 18764712120593, 93823560602965, 281479271743489, 1407396358717445
Offset: 0

Views

Author

Antti Karttunen, Feb 09 1999

Keywords

Comments

Generation n (starting from the generation 0: 1) interpreted as a binary number.
Observation: for n <= 15, a(n) = smallest number whose Euler totient is divisible by 4^n. This is not true for n = 16. - Arkadiusz Wesolowski, Jul 29 2012
Orbit of 1 under iteration of Rule 90 = A048725 = (n -> n XOR 4n). - M. F. Hasler, Oct 09 2017

Examples

			Successive states are:
          1
         101
        10001
       1010101
      100000001
     10100000101
    1000100010001
   101010101010101
  10000000000000001
  ...
which when converted from binary to decimal give the sequence. - _N. J. A. Sloane_, Jul 21 2014
		

Crossrefs

Cf. A006977, A006978, A038184, A038185 (other cellular automata), A000215 (Fermat numbers).
Also alternate terms of A001317. Cf. A048710, A048720, A048757 (same 0/1-patterns interpreted in Fibonacci number system).
Equals 4*A089893(n)+1.
For right half of triangle (excluding the middle bit) see A245191.
Cf. Sierpiński's gasket, A047999.

Programs

  • Maple
    bit_n := (x,n) -> `mod`(floor(x/(2^n)),2);
    # A recursive, cellular automaton rule version:
    sigmaminus := proc(n) option remember: if (0 = n) then (1)
    else sum('((bit_n(sigmaminus(n-1),i)+bit_n(sigmaminus(n-1),i-2)) mod 2)*(2^i)', 'i'=0..(2*n)) fi: end:
  • Mathematica
    r = 24; c = CellularAutomaton[90, {{1}, 0}, r - 1]; Table[FromDigits[c[[k, r - k + 1 ;; r + k - 1]], 2], {k, r}] (* Arkadiusz Wesolowski, Jun 09 2013 *)
    a[ n_] := Sum[ 4^(n - k) Mod[Binomial[2 n, 2 k], 2], {k, 0, n}]; (* Michael Somos, Jun 30 2018 *)
    a[ n_] := If[ n < 0, 0, Product[ BitGet[n, k] (2^(2^(k + 1))) + 1, {k, 0, n}]]; (* Michael Somos, Jun 30 2018 *)
  • PARI
    vector(100,i,a=if(i>1,bitxor(a<<2,a),1)) \\ M. F. Hasler, Oct 09 2017
    
  • PARI
    {a(n) = sum(k=0, n, binomial(2*n, 2*k)%2 * 4^(n-k))}; /* Michael Somos, Jun 30 2018 */
  • Python
    a=1
    for n in range(55):
        print(a, end=",")
        a ^= a*4
    # Alex Ratushnyak, May 04 2012
    
  • Python
    def A038183(n): return sum((bool(~(m:=n<<1)&m-k)^1)<Chai Wah Wu, May 02 2023
    

Formula

a(n) = Product_{i>=0} bit_n(n, i)*(2^(2^(i+1)))+1: A direct algebraic formula!
a(n) = Sum_{k=0..n} (C(2*n, 2*k) mod 2)*4^(n-k). - Paul Barry, Jan 03 2005
a(2*n+1) = 5*a(2n); a(n+1) = a(n) XOR 4*a(n) where XOR is binary exclusive OR operator. - Philippe Deléham, Jun 18 2005
a(n) = A001317(2n). - Alex Ratushnyak, May 04 2012

A048727 a(n) = Xmult(n,7) or rule150(n,1).

Original entry on oeis.org

0, 7, 14, 9, 28, 27, 18, 21, 56, 63, 54, 49, 36, 35, 42, 45, 112, 119, 126, 121, 108, 107, 98, 101, 72, 79, 70, 65, 84, 83, 90, 93, 224, 231, 238, 233, 252, 251, 242, 245, 216, 223, 214, 209, 196, 195, 202, 205, 144, 151, 158, 153, 140, 139, 130, 133, 168, 175
Offset: 0

Views

Author

Antti Karttunen, Apr 26 1999

Keywords

Comments

Sequence gives binary encodings of polynomials in maximal ideal generated by x^2 + x + 1 in the polynomial ring GF(2)[X]. E.g. 1 * x^2+x+1 = x^2 +x+1 = 111 (binary encoding) = 7 (in decimal) x * x^2+x+1 = x^3+x^2+x = 1110 = 14 x+1 * x^2+x+1 = x^3+1 = 1001 = 9 x^2 * x^2+x+1 = x^4+x^3+x^2 = 11100 = 28 x^2+1 * x^2+x+1 = x^4+x^3+x+1 = 11011 = 27 etc.

Crossrefs

Programs

A048716 Numbers n such that binary expansion matches ((0)*00(1?)1)*(0*).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 9, 12, 16, 17, 18, 19, 24, 25, 32, 33, 34, 35, 36, 38, 48, 49, 50, 51, 64, 65, 66, 67, 68, 70, 72, 73, 76, 96, 97, 98, 99, 100, 102, 128, 129, 130, 131, 132, 134, 136, 137, 140, 144, 145, 146, 147, 152, 153, 192, 193, 194, 195, 196, 198, 200, 201
Offset: 1

Views

Author

Antti Karttunen, Mar 30 1999

Keywords

Comments

If bit i is 1, then bits i+-2 must be 0. All terms satisfy A048725(n) = 5*n.
It appears that n is in the sequence if and only if C(5n,n) is odd (cf. A003714). - Benoit Cloitre, Mar 09 2003
Yes, as remarked in A048715, "This is easily proved using the well-known result that the multiplicity with which a prime p divides C(n+m,n) is the number of carries when adding n+m in base p." - Jason Kimberley, Dec 21 2011
A116361(a(n)) <= 2. - Reinhard Zumkeller, Feb 04 2006

Crossrefs

Superset of A048715 and A048719. Union of A004742 and A003726.

Programs

  • Mathematica
    Reap[Do[If[OddQ[Binomial[5n, n]], Sow[n]], {n, 0, 400}]][[2, 1]]
    (* Second program: *)
    filterQ[n_] := With[{bb = IntegerDigits[n, 2]}, MatchQ[bb, {0}|{1}|{1, 1}|{_, 0, , 1, __}|{_ 1, , 0, __}] && !MatchQ[bb, {_, 1, , 1, __}]];
    Select[Range[0, 201], filterQ] (* Jean-François Alcover, Dec 31 2020 *)
  • PARI
    is(n)=!bitand(n,n>>2) \\ Charles R Greathouse IV, Oct 03 2016
    
  • PARI
    list(lim)=my(v=List(),n,t); while(n<=lim, t=bitand(n,n>>2); if(t, n+=1<Charles R Greathouse IV, Oct 22 2021

A269174 Formula for Wolfram's Rule 124 cellular automaton: a(n) = (n OR 2n) AND ((n XOR 2n) OR (n XOR 4n)).

Original entry on oeis.org

0, 3, 6, 7, 12, 15, 14, 11, 24, 27, 30, 31, 28, 31, 22, 19, 48, 51, 54, 55, 60, 63, 62, 59, 56, 59, 62, 63, 44, 47, 38, 35, 96, 99, 102, 103, 108, 111, 110, 107, 120, 123, 126, 127, 124, 127, 118, 115, 112, 115, 118, 119, 124, 127, 126, 123, 88, 91, 94, 95, 76, 79, 70, 67, 192, 195, 198, 199, 204, 207, 206, 203, 216
Offset: 0

Views

Author

Antti Karttunen, Feb 22 2016

Keywords

Crossrefs

Cf. A269175.
Cf. A269176 (numbers not present in this sequence).
Cf. A269177 (same sequence sorted into ascending order, duplicates removed).
Cf. A269178 (numbers that occur only once).
Cf. A267357 (iterates from 1 onward).

Programs

Formula

a(n) = A163617(n) AND A269173(n).
a(n) = A163617(n) AND (A048724(n) OR A048725(n)).
a(n) = (n OR 2n) AND ((n XOR 2n) OR (n XOR 4n)).
Other identities. For all n >= 0:
a(2*n) = 2*a(n).
a(n) = A057889(A161903(A057889(n))). [Rule 124 is the mirror image of rule 110.]
G.f.: (-3*x^3 - 2*x^2 - 3*x)/(x^4 - 1) + Sum_{k>=1}((2^(k + 1)*x^(2^k) - 2^(k + 1)*x^(14*2^(k - 2)))/((x^(2^(k + 2)) - 1)*(x - 1))). - Miles Wilson, Jan 25 2025

A178729 a(n) = n XOR 3n, where XOR is bitwise XOR.

Original entry on oeis.org

0, 2, 4, 10, 8, 10, 20, 18, 16, 18, 20, 42, 40, 42, 36, 34, 32, 34, 36, 42, 40, 42, 84, 82, 80, 82, 84, 74, 72, 74, 68, 66, 64, 66, 68, 74, 72, 74, 84, 82, 80, 82, 84, 170, 168, 170, 164, 162, 160, 162, 164, 170, 168, 170, 148, 146, 144, 146, 148, 138, 136, 138, 132, 130
Offset: 0

Views

Author

Dmitry Kamenetsky, Jun 08 2010

Keywords

Crossrefs

Programs

Formula

a(n) = A005351(n) XOR A005352(n) (conjectured). Proved by Verrill link.
a(n) = 2 * A184617(n). - Alois P. Heinz, Jul 21 2017

Extensions

a(30) onwards from Robert G. Wilson v, Jun 09 2010
Showing 1-10 of 20 results. Next