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

A048733 a(n) = A048730(n)/4.

Original entry on oeis.org

0, 0, 0, 3, 0, 2, 6, 7, 0, 0, 4, 7, 12, 14, 14, 15, 0, 0, 0, 3, 8, 10, 14, 15, 24, 24, 28, 31, 28, 30, 30, 31, 0, 0, 0, 3, 0, 2, 6, 7, 16, 16, 20, 23, 28, 30, 30, 31, 48, 48, 48, 51, 56, 58, 62, 63, 56, 56, 60, 63, 60, 62, 62, 63, 0, 0, 0, 3, 0, 2, 6, 7, 0, 0, 4, 7, 12, 14, 14, 15, 32, 32
Offset: 0

Views

Author

Antti Karttunen

Keywords

Comments

A048715 gives all n for which a(n) = 0, A048717 gives all n for which a(n) = n.

Crossrefs

Programs

Formula

a(n) = ((n*7)-Xmult(n, 7))/4.

A048715 Binary expansion matches (100(0)*)*(0|1|10)?; or, Zeckendorf-like expansion of n using recurrence f(n) = f(n-1) + f(n-3).

Original entry on oeis.org

0, 1, 2, 4, 8, 9, 16, 17, 18, 32, 33, 34, 36, 64, 65, 66, 68, 72, 73, 128, 129, 130, 132, 136, 137, 144, 145, 146, 256, 257, 258, 260, 264, 265, 272, 273, 274, 288, 289, 290, 292, 512, 513, 514, 516, 520, 521, 528, 529, 530, 544, 545, 546, 548, 576, 577, 578, 580
Offset: 0

Views

Author

Antti Karttunen, Mar 30 1999

Keywords

Comments

No more than one 1-bit in each bit triple.
All terms satisfy A048727(n) = 7*n.
Constructed from A000930 in the same way as A003714 is constructed from A000045.
It appears that n is in the sequence if and only if C(7n,n) is odd (cf. A003714). - Benoit Cloitre, Mar 09 2003
The conjecture by Benoit is correct. 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. - Franklin T. Adams-Watters, Oct 06 2009
Appears to be the set of numbers x such that (x AND 5*x) = x and (x OR 3*x)/x = 3. - Gary Detlefs, Jun 08 2024

Crossrefs

Programs

  • Mathematica
    Reap[Do[If[OddQ[Binomial[7n, n]], Sow[n]], {n, 0, 400}]][[2, 1]]
    (* Second program: *)
    filterQ[n_] := With[{bb = IntegerDigits[n, 2]}, !MatchQ[bb, {_, 1, 0, 1, _}|{_, 1, 1, _}]];
    Select[Range[0, 580], filterQ] (* Jean-François Alcover, Dec 31 2020 *)
  • PARI
    is(n)=!bitand(n, 6*n) \\ Charles R Greathouse IV, Oct 03 2016
    
  • Perl
    for my $k (0..580) { print "$k, " if sprintf("%b", $k) =~ m{^(100(0)*)*(0|1|10)?$}; } # Georg Fischer, Jun 26 2021
    
  • Python
    import re
    def ok(n): return re.fullmatch('(100(0)*)*(0|1|10)?', bin(n)[2:]) != None
    print(list(filter(ok, range(581)))) # Michael S. Branicky, Jun 26 2021

Formula

a(0) = 0, a(n) = (2^(invfoo(n)-1))+a(n-foo(invfoo(n))), where foo(n) is foo(n-1) + foo(n-3) (A000930) and invfoo is its "integral" (floored down) inverse.
a(n) XOR 6*a(n) = 7*a(n); 3*a(n) XOR 4*a(n) = 7*a(n); 3*a(n) XOR 5*a(n) = 6*a(n); (conjectures). - Paul D. Hanna, Jan 22 2006
The conjectures can be verified using the Walnut theorem-prover (see links). - Sebastian Karlsson, Dec 31 2022

Extensions

Definition corrected by Georg Fischer, Jun 26 2021

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

A061858 Differences between the ordinary multiplication table A004247 and the carryless multiplication table for GF(2)[X] polynomials A048720, i.e., the effect of the carry bits in binary multiplication.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 8, 0, 0, 0, 0, 0, 0, 12, 0, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 16, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, May 11 2001

Keywords

Examples

			From _Peter Munn_, Jan 28 2021: (Start)
The top left 12 X 12 corner of the table:
      |  0   1   2   3   4   5   6   7   8   9  10  11
------+------------------------------------------------
   0  |  0   0   0   0   0   0   0   0   0   0   0   0
   1  |  0   0   0   0   0   0   0   0   0   0   0   0
   2  |  0   0   0   0   0   0   0   0   0   0   0   0
   3  |  0   0   0   4   0   0   8  12   0   0   0   4
   4  |  0   0   0   0   0   0   0   0   0   0   0   0
   5  |  0   0   0   0   0   8   0   8   0   0  16  16
   6  |  0   0   0   8   0   0  16  24   0   0   0   8
   7  |  0   0   0  12   0   8  24  28   0   0  16  28
   8  |  0   0   0   0   0   0   0   0   0   0   0   0
   9  |  0   0   0   0   0   0   0   0   0  16   0  16
  10  |  0   0   0   0   0  16   0  16   0   0  32  32
  11  |  0   0   0   4   0  16   8  28   0  16  32  52
(End)
		

Crossrefs

"Zoomed in" variant: A061859.
Rows/columns 3, 5 and 7 are given by A048728, A048729, A048730.
Main diagonal divided by 4: A213673.
Numbers that generate no carries when multiplied in binary by 11_2: A003714, by 101_2: A048716, by 1001_2: A115845, by 10001_2: A115847, by 100001_2: A114086.
Other sequences related to the presence/absence of a carry in binary multiplication: A116361, A235034, A235040, A236378, A266195, A289726.

Formula

a(n) = A004247(n) - A048720(n).

A342697 For any number n with binary expansion Sum_{k >= 0} b(k) * 2^k, the binary expansion of a(n) is Sum_{k >= 0} floor((b(k) + b(k+1) + b(k+2))/2) * 2^k.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 3, 3, 0, 0, 2, 3, 6, 7, 7, 7, 0, 0, 0, 1, 4, 5, 7, 7, 12, 12, 14, 15, 14, 15, 15, 15, 0, 0, 0, 1, 0, 1, 3, 3, 8, 8, 10, 11, 14, 15, 15, 15, 24, 24, 24, 25, 28, 29, 31, 31, 28, 28, 30, 31, 30, 31, 31, 31, 0, 0, 0, 1, 0, 1, 3, 3, 0, 0, 2, 3, 6
Offset: 0

Views

Author

Rémy Sigrist, Mar 18 2021

Keywords

Comments

The value of the k-th bit in a(n) corresponds to the most frequent value in the bit triple starting at the k-th bit in n.

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     0       1          0
   2     0      10          0
   3     1      11          1
   4     0     100          0
   5     1     101          1
   6     3     110         11
   7     3     111         11
   8     0    1000          0
   9     0    1001          0
  10     2    1010         10
  11     3    1011         11
  12     6    1100        110
  13     7    1101        111
  14     7    1110        111
  15     7    1111        111
		

Crossrefs

Programs

  • Mathematica
    A342697[n_] := Quotient[7*n - BitXor[n, 2*n, 4*n], 8];
    Array[A342697, 100, 0] (* Paolo Xausa, Aug 06 2025 *)
  • PARI
    a(n) = sum(k=0, #binary(n), ((bittest(n, k)+bittest(n, k+1)+bittest(n, k+2))>=2) * 2^k)

Formula

a(n) = 0 iff n belongs to A048715.
a(n) = floor(A048730(n)/8) = floor(A048733(n)/2). - Kevin Ryde, Mar 26 2021

A061859 Differences between the ordinary multiplication table A004247 and Xmult table A048720, computed for {3..n} * {3..n}.

Original entry on oeis.org

4, 0, 0, 0, 0, 0, 8, 0, 0, 8, 12, 0, 8, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 8, 16, 8, 0, 0, 0, 0, 0, 24, 24, 0, 0, 0, 4, 0, 0, 0, 28, 0, 0, 0, 4, 16, 0, 16, 0, 0, 0, 0, 16, 0, 16, 16, 0, 16, 0, 0, 0, 0, 0, 16, 0, 16, 24, 0, 0, 8, 16, 0, 0, 16, 8, 0, 0, 24, 28, 0, 8, 32, 28, 0, 16, 0, 28, 32, 8, 0, 28
Offset: 0

Views

Author

Antti Karttunen, May 11 2001

Keywords

Crossrefs

Cf. "Zoomed out" variant: A061858, trinv given at A054425. The first, third and fifth diagonals are given by A048728-A048730.

Programs

  • Maple
    [seq(diff_mult_Xmult_table3(j),j=0..119)]; diff_mult_Xmult_table3 := (n) -> (mult_table3(n) - Xmult_table3(n));
    mult_table3 := (n) -> floor(evalf(((((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+3) * (3+(n-((trinv(n)*(trinv(n)-1))/2))) ));
    Xmult_table3 := (n) -> Xmult( ((((trinv(n)-1)*(((1/2)*trinv(n))+1))-n)+3),(3+(n-((trinv(n)*(trinv(n)-1))/2))) );
Showing 1-6 of 6 results.