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.

A059895 Table a(i,j) = product prime[k]^(Ei[k] AND Ej[k]) where Ei and Ej are the vectors of exponents in the prime factorizations of i and j; AND is the bitwise operation on binary representation of the exponents.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 2, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 2, 1, 1, 5, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 1, 1, 1, 1, 5, 1, 3, 1, 1, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1
Offset: 1

Views

Author

Marc LeBrun, Feb 06 2001

Keywords

Comments

Analogous to GCD, with AND replacing MIN.

Examples

			The top left 18 X 18 corner of the array:
1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1
1,  2,  1,  1,  1,  2,  1,  2,  1,  2,  1,  1,  1,  2,  1,  1,  1,  2
1,  1,  3,  1,  1,  3,  1,  1,  1,  1,  1,  3,  1,  1,  3,  1,  1,  1
1,  1,  1,  4,  1,  1,  1,  4,  1,  1,  1,  4,  1,  1,  1,  1,  1,  1
1,  1,  1,  1,  5,  1,  1,  1,  1,  5,  1,  1,  1,  1,  5,  1,  1,  1
1,  2,  3,  1,  1,  6,  1,  2,  1,  2,  1,  3,  1,  2,  3,  1,  1,  2
1,  1,  1,  1,  1,  1,  7,  1,  1,  1,  1,  1,  1,  7,  1,  1,  1,  1
1,  2,  1,  4,  1,  2,  1,  8,  1,  2,  1,  4,  1,  2,  1,  1,  1,  2
1,  1,  1,  1,  1,  1,  1,  1,  9,  1,  1,  1,  1,  1,  1,  1,  1,  9
1,  2,  1,  1,  5,  2,  1,  2,  1, 10,  1,  1,  1,  2,  5,  1,  1,  2
1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 11,  1,  1,  1,  1,  1,  1,  1
1,  1,  3,  4,  1,  3,  1,  4,  1,  1,  1, 12,  1,  1,  3,  1,  1,  1
1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 13,  1,  1,  1,  1,  1
1,  2,  1,  1,  1,  2,  7,  2,  1,  2,  1,  1,  1, 14,  1,  1,  1,  2
1,  1,  3,  1,  5,  3,  1,  1,  1,  5,  1,  3,  1,  1, 15,  1,  1,  1
1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 16,  1,  1
1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, 17,  1
1,  2,  1,  1,  1,  2,  1,  2,  9,  2,  1,  1,  1,  2,  1,  1,  1, 18
A(864,1944) = A(2^5*3^3,2^3*3^5) = 2^(5 AND 3)* 3^(3 AND 5) = 2^1*3^1 = 6.
		

Crossrefs

Programs

Formula

From Antti Karttunen, Apr 11 2017: (Start)
A(x,y) = A059896(x,y) / A059897(x,y).
A(x,y) * A059896(x,y) = A(x,y)^2 * A059897(x,y) = x*y.
(End)

Extensions

Data section extended to 120 terms by Antti Karttunen, Apr 11 2017

A006581 a(n) = Sum_{k=1..n-1} (k AND n-k).

Original entry on oeis.org

1, 0, 4, 4, 5, 0, 12, 16, 21, 16, 24, 20, 17, 0, 32, 48, 65, 64, 84, 84, 85, 64, 92, 96, 101, 80, 88, 68, 49, 0, 80, 128, 177, 192, 244, 260, 277, 256, 316, 336, 357, 336, 360, 340, 321, 256, 336, 368, 401, 384, 420, 404, 389, 320, 364, 352, 341, 272, 264, 196
Offset: 2

Views

Author

Keywords

References

  • Marc LeBrun, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A090889(n) - A000292(n-2).
Antidiagonal sums of array A003985.

Programs

  • Mathematica
    Array[Sum[BitAnd[k, # - k], {k, # - 1}] &, 60, 2] (* Michael De Vlieger, Oct 27 2022 *)
  • Python
    def A006581(n): return (sum(k&n-k for k in range(1,n+1>>1))<<1)+(0 if n&1 else n>>1) # Chai Wah Wu, May 07 2023

Formula

G.f.: 1/(1-x)^2 * Sum_{k>=0} 2^k*t^2/(1+t)^2, t = x^2^k. - Ralf Stephan, Feb 12 2003
a(0) = a(1) = 0, a(2n) = 2*a(n-1) + 2*a(n) + n, a(2n+1) = 4*a(n).
a(n) = 2*(Sum_{k=1..floor((n-1)/2)} k AND n-k) + m where m = 0 if n is odd and n/2 otherwise. - Chai Wah Wu, May 07 2023

A099026 Array x AND NOT y, read by rising antidiagonals.

Original entry on oeis.org

0, 1, 0, 2, 0, 0, 3, 2, 1, 0, 4, 2, 0, 0, 0, 5, 4, 1, 0, 1, 0, 6, 4, 4, 0, 2, 0, 0, 7, 6, 5, 4, 3, 2, 1, 0, 8, 6, 4, 4, 0, 2, 0, 0, 0, 9, 8, 5, 4, 1, 0, 1, 0, 1, 0, 10, 8, 8, 4, 2, 0, 0, 0, 2, 0, 0, 11, 10, 9, 8, 3, 2, 1, 0, 3, 2, 1, 0, 12, 10, 8, 8, 8, 2, 0, 0, 4, 2, 0, 0, 0, 13, 12, 9, 8, 9, 8, 1
Offset: 0

Views

Author

Ralf Stephan, Sep 26 2004

Keywords

Comments

For n>0, the n-th row and the differences of the n-th column have period 2^floor(log_(n)+1).

Examples

			0,0,0,0,0,0,
1,0,1,0,1,0,
2,2,0,0,2,2,
3,2,1,0,3,2,
4,4,4,4,0,0,
5,4,5,4,1,0,
		

Crossrefs

Rows include A000004, A059841. Columns include A001477, A052928. Antidiagonal sums are in A099027.
Cf. A003985 (AND), A003986 (OR), A003987 (XOR).

Programs

  • Mathematica
    Table[BitAnd[x - y, BitNot[y]], {x, 0, 15}, {y, 0, x}] (* Paolo Xausa, Sep 30 2024 *)
  • PARI
    T(x,y)=bitnegimply(x,y)

Formula

T(x, y) = x AND NOT y. The AND NOT operation satisfies the bitwise truth table: (0, 0) = 0, (0, 1) = 0, (1, 0) = 1, (1, 1) = 0.
Showing 1-3 of 3 results.