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.

Previous Showing 11-17 of 17 results.

A135796 Numbers of the form 4x^3y+4y x^3 (where x,y are positive integers).

Original entry on oeis.org

8, 40, 120, 128, 272, 312, 520, 640, 648, 888, 1160, 1200, 1400, 1920, 2040, 2048, 2080, 2952, 2968, 3240, 3280, 4040, 4352, 4872, 4992, 5000, 5368, 6120, 6960, 7008, 7280, 7320, 8320, 8840, 9720
Offset: 1

Views

Author

Artur Jasinski, Nov 29 2007

Keywords

Comments

Squares of these numbers are of the form N^4-M^2 (where N belongs to A135786 and M to A135797) Proof uses: (4x^3y+4xy^3)^2=(x^2-y^2)^4+(x^4+6x^2y^2+y^4)^2.
Refers to A057102, which had an incorrect description and has been replaced by A256418. As a result the present sequence should be re-checked. - N. J. A. Sloane, Apr 06 2015

Crossrefs

Programs

  • Mathematica
    a = {}; Do[Do[w = 4x^3y + 4x y^3; If[w < 10000, AppendTo[a, w]], {x, y, 1000}], {y, 1, 1000}]; Union[a] (*Artur Jasinski*)

A305860 Triangle m(n,k) read by rows (n >= 0, 0 <= k <= n): to get the binary expansion of m(n,k), for 0 <= i < 2^n, write 1 if the binary weight of i is equal to k or 0 otherwise, left to right.

Original entry on oeis.org

1, 2, 1, 8, 6, 1, 128, 104, 22, 1, 32768, 26752, 5736, 278, 1, 2147483648, 1753251840, 375941248, 18224744, 65814, 1, 9223372036854775808, 7530159316599308288, 1614655367130677248, 78274679833913472, 282668995843688, 4295033110, 1
Offset: 0

Views

Author

Valentin Bakoev, Jul 08 2018

Keywords

Comments

Triangle read by rows, representing a family of sequences M(n), for n = 0, 1, 2, ... The n-th row of the triangle consists of n+1 integers, denoted by #m(n,0), #m(n,1), ..., #m(n,n), which are the terms of the sequence M(n). They are the serial numbers of n+1 binary vectors of size 2^n, denoted by m(n,0), m(n,1), ..., m(n,n), correspondingly. Each vector m(n,k) is a characteristic vector of all vectors from the n-dimensional Boolean cube (hypercube) {0,1}^n, having (Hamming) weight equal to k, for k = 0, 1, ..., n, and for n > 0. The zeroth row (i.e., M(0)) and its single term 1 are prepended for convenience.
The n-th row (i.e., the sequence M(n)) represents the vectors of equal (Hamming) weights of the n-dimensional Boolean cube (hypercube) {0,1}^n, for n = 1, 2, ... A serial number of the vector a_i = (a_1, a_2, ..., a_n) of {0,1}^n is denoted by #a_i and it is the natural number whose n-bit binary representation is a_1, a_2, ..., a_n. When the vectors of {0,1}^n are in lexicographic order, their serial numbers form the sequence 0, 1, 2, ..., 2^n-1. The sequence M(n) has n+1 terms, denoted by #m(n,0), #m(n,1), ..., #m(n,n). Here #m(n,k) is the natural number corresponding to the binary vector m(n,k) of size 2^n, for k = 0, 1, ..., n. The i-th coordinate of m(n,k) is unit if the weight of vector a_i (of {0,1}^n) is equal to k, or it is zero otherwise, for i = 0, 1, ..., 2^n-1. Thus m(n,k) is a characteristic vector of all vectors of the n-dimensional Boolean cube, having a weight equal to k. Each characteristic vector m(n,k) is represented by its serial number #m(n,k) in M(n), for k = 0, 1, ..., n.
The vector m(n,k), for some k, 0 <= k <= n, can be used as a mask to check whether a given Boolean function of n variables takes a value 1 on some vector of weight k -- that is why the notations M and m are chosen. This check is done by a bitwise conjunction(s) between the truth table vector of the function and the mask, so it is very fast.
Analogously to Pascal's triangle, a family of subsequences is generated by this triangle (see Example section for clarifications):
A) read by the columns (from left to right):
1, 2, 8, 128, 32768, 2147483648, 9223372036854775808, ...: A058891(n+1) (the integers of the type a(n) = 2^(2^(n-1) - 1), for n = 1, 2, ...). Here #m(n,0), for n = 1, 2, ..., are the serial numbers of characteristic vectors of all vectors of {0,1}^n, having weight = 0 (this relation was pointed out by Andrew Howroyd);
1, 6, 104, 26752, 1753251840, 7530159316599308288, ... (not in the OEIS as of Jul 08 2018): #m(n,1), for n = 1, 2, ..., are the serial numbers of characteristic vectors of all vectors of {0,1}^n, having weight = 1;
1, 22, 5736, 375941248, 1614655367130677248, ... (not in the OEIS as of Jul 08 2018): #m(n,2), for n = 2, 3, ..., are the serial numbers of characteristic vectors of all vectors of {0,1}^n, having weight = 2, and so on.
B) read by the hypotenuse, or parallel to the hypotenuse:
1, 1, 1, 1, ...: A000012 (the all 1's sequence). Here #m(n,n), for n=1, 2, ..., are the serial numbers of characteristic vectors of all vectors of {0,1}^n, having weight = n;
2, 6, 22, 278, 65814, 4295033110, ...: A060803 (Sum_{k = 0..n} 2^(2^k)). Here #m(n,n-1), for n=1, 2, ..., are the serial numbers of characteristic vectors of all vectors of {0,1}^n, having weight = n-1;
8, 104, 5736, 18224744, 282668995843688, ... (twice A327373): #m(n,n-2), for n = 2, 3, ..., are the serial numbers of characteristic vectors of all vectors of {0,1}^n, having weight = n-2, and so on.

Examples

			M(0)= 1
M(1)= 2, 1 - given by definition. For n > 1, we use an inductive approach (i.e., iteration) instead of recursion since a straightforward recursive function for computing the terms of M(n) is not efficient.
To obtain M(2) we apply the recursive formula for n=2:
#m(2,0) = 2^(2^(2-1))*#m(1,0) = 4*2 = 8;
#m(2,1) = 2^(2^(2-1))*#m(1,1) + #m(1,0) = 4*1 + 2 = 6;
#m(2,2) = 1.
Thus M(2) = 8, 6, 1.
To obtain M(3) we compute:
#m(3,0) = 2^(2^(3-1))*#m(2,0) = 16*8 = 128;
#m(3,1) = 2^(2^(3-1))*#m(2,1) + #m(2,0) = 16*6 + 8 = 104;
#m(3,2) = 2^(2^(3-1))*#m(2,2) + #m(2,1) = 16*1 + 6 = 22;
#m(3,3) = 1.
Therefore M(3) = 128, 104, 22, 1.
Let's clarify the meaning of its terms. The lexicographic order of {0,1}^3 is (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), (1,1,1), and the corresponding sequence of (serial) numbers is 0, 1, 2, ..., 7. We have:
m(3,0) = (1,0,0,0,0,0,0,0) is the characteristic vector of the unique vector of weight 0 and hereby #m(3,0) = 2^7 = 128;
m(3,1) = (0,1,1,0,1,0,0,0) is the characteristic vector of all vectors of weight 1 and #m(3,1)=104;
m(3,2) = (0,0,0,1,0,1,1,0) is the characteristic vector of all vectors of weight 2 and then #m(3,2)=22;
m(3,3) = (0,0,0,0,0,0,0,1) the characteristic vector of the unique vector of weight 3 and #m(3,3)=1.
This sequence is bijectively related to the sequence A294648, representing the Weight-Lexicographic Order of the vectors of {0,1}^n. The row M(n) bijectively corresponds to the row L(n) of A294648, for n= 1,2, ... For example, if n=3, the third row of A294648 is
L(3) = l(3,0),...,l(3,3) = (0), (1, 2, 4), (3, 5, 6), (7) = 0, 1, 2, 4, 3, 5, 6, 7.
We recall that the coordinates of m(n,k) are numbered from left to right by 0, 1, ..., 2^n-1, and L(n) contains all these integers, partitioned in subsequences.
For the subsequences of L(3) we note:
l(3,0) = 0, which is the serial number of the unique vector (0,0,0) of {0,1}^3 of weight 0. It corresponds to m(3,0) since m(3,0) contains a unit in its leftmost coordinate only.
l(3,1) = 1, 2, 4, which are the serial numbers of all 3 vectors of {0,1}^3 of weight 1. So l(3,1) corresponds to m(3,1) -- note that 1, 2 and 4 are the coordinates in which m(3,1) contains units.
l(3,2) = 3, 5, 6, which are the serial numbers of all 3 vectors of {0,1}^3 of weight 2. It corresponds to m(3,1) -- note that 3, 5 and 6 are the coordinates in which m(3,2) contains units.
l(3,3) = 7, which is the serial number of the unique vector (1,1,1) of {0,1}^3 of weight 3. It corresponds to m(3,3).
From _Michel Marcus_, Jul 10 2018: (Start)
Triangle begins:
  1,
  2, 1,
  8, 6, 1,
  128, 104, 22, 1,
  32768, 26752, 5736, 278, 1,
  2147483648, 1753251840, 375941248, 18224744, 65814, 1,
  ... (End)
		

Crossrefs

Cf. A294648, representing the Weight-Lexicographic Order of the vectors of {0,1}^n, is bijectively related (see Example section).

Programs

  • Mathematica
    T[n_, k_] := If[n == 1, If[k == 0, 2, 1], If[k == 0, 2^(2^n - 1), If[k == n, 1, 2^(2^(n-1)) T[n-1, k] + T[n-1, k-1]]]];
    Table[T[n, k], {n, 0, 6}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 25 2018, after Michel Marcus *)
  • PARI
    T(n, k) = if (n==1, if (k==0, 2, 1), if (k==0, 2^(2^n-1), if (k==n, 1, 2^(2^(n-1))*T(n-1,k) + T(n-1,k-1))));
    tabf(nn) = for (n=1, nn, for (k=0, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, Jul 10 2018

Formula

M(0) = 1.
For n = 1, 2, 3, ..., M(n) is defined recursively as follows.
If n=1, M(1) = 2, 1;
otherwise, M(n) = #m(n,0), #m(n,1), ..., #m(n,k), ..., #m(n,n), where the term #m(n,k) is defined as follows:
#m(n,0) = 2^(2^(n-1))*#m(n-1,0) = 2^(2^n-1),
#m(n,n) = 1, and
#m(n,k) = 2^(2^(n-1))*#m(n-1,k) + #m(n-1,k-1), for 0 < k < n.

Extensions

New name from Andrey Zabolotskiy, Aug 01 2024

A325912 a(n) = (-1)^n * Sum_{k=0..n} (-1)^k*2^(2^k).

Original entry on oeis.org

2, 2, 14, 242, 65294, 4294902002, 18446744069414649614, 340282366920938463444927863362353561842, 115792089237316195423570985008687907852929702298719625576012656144550776078094
Offset: 0

Views

Author

Seiichi Manyama, Sep 08 2019

Keywords

Examples

			a(0) = 2^1 = 2.
a(1) = 2^2  - 2^1 = 2.
a(2) = 2^4  - 2^2 + 2^1 = 14.
a(3) = 2^8  - 2^4 + 2^2 - 2^1 = 242.
a(4) = 2^16 - 2^8 + 2^4 - 2^2 + 2^1 = 65294.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (-1)^n * Sum[(-1)^k * 2^(2^k), {k, 0, n}]; Array[a, 9, 0] (* Amiram Eldar, May 07 2021 *)
  • PARI
    {a(n) = (-1)^n*sum(k=0,n,(-1)^k*2^2^k)}

Formula

a(n) = A001146(n) - a(n-1).

A358126 Replace 2^k in binary expansion of n with 2^(2^k).

Original entry on oeis.org

0, 2, 4, 6, 16, 18, 20, 22, 256, 258, 260, 262, 272, 274, 276, 278, 65536, 65538, 65540, 65542, 65552, 65554, 65556, 65558, 65792, 65794, 65796, 65798, 65808, 65810, 65812, 65814, 4294967296, 4294967298, 4294967300
Offset: 0

Views

Author

Tilman Piesk, Oct 30 2022

Keywords

Comments

Sums of distinct terms of A001146.
The name "ballooned integers" is proposed for this sequence.
a(n) is the index of the first occurrence of n in A253315.

Examples

			Let    n   =     25  =  1 +   8 +    16  =     2^0  +    2^3  +    2^4.
Then a(n)  =  65794  =  2 + 256 + 65536  =  2^(2^0) + 2^(2^3) + 2^(2^4).
The binary indices of n are {0, 3, 4}. Those of a(n) are {1, 8, 16}.
		

Crossrefs

Programs

  • Maple
    a := proc(n) select(d -> d[2] <> 0, ListTools:-Enumerate(convert(n,base,2))):
    add(2^(2^(%[j][1] - 1)), j = 1..nops(%)) end: seq(a(n), n = 0..34); # Peter Luschny, Oct 31 2022
  • Mathematica
    a[n_] := Total[2^(2^Range[If[n == 0, 1, IntegerLength[n,2]] - 1, 0, -1]) * IntegerDigits[n, 2]]; Array[a, 35, 0] (* Amiram Eldar, Oct 31 2022 *)
  • PARI
    a(n) = my(d=Vecrev(digits(n,2))); for (k=1, #d, d[k] *= 2^(2^(k-1))); vecsum(d); \\ Michel Marcus, Oct 31 2022
  • Python
    def a(n):
        binary_string = "{0:b}".format(n)[::-1]  # little-endian
        result = 0
        for i, binary_digit in enumerate(binary_string):
            if binary_digit == '1':
                result += 1 << (1 << i)  # 2 ** (2 ** i)
        return result
    

Formula

If n = Sum_{i=0..k} 2^s_i, then a(n) = Sum_{i=0..k} 2^(2^s_i).
a(n) = 2 * A253317(n+1).
a(2^n-1) = A060803(n-1) for n >= 1.
a(2^n) = A001146(n).
A197819[m, a(n)] = A228539[m, n]. (Compare link about Boolean Walsh functions.)

A130831 Irregular triangle read by rows: row(n) contains the first A001146(n) terms of A001316.

Original entry on oeis.org

1, 2, 1, 2, 2, 4, 1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 64, 2, 4, 4, 8, 4, 8, 8, 16
Offset: 1

Views

Author

Roger L. Bagula, Aug 20 2007

Keywords

Comments

The n-th row of the triangle consists of the first A001146(n) terms of A001316. - Benjamin Heiland, Dec 12 2011

Examples

			Triangle begins:
{1, 2},
{1, 2, 2, 4},
{1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16}
...
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Jun 07 2008
New name using Benjamin Heiland's comment, Joerg Arndt, May 11 2023

A135797 Numbers of the form x^4 + 6*x^2*y^2 + y^4 (where x,y are positive integers).

Original entry on oeis.org

8, 41, 128, 136, 313, 353, 648, 656, 776, 1201, 1241, 1513, 2048, 2056, 2176, 2696, 3281, 3321, 3593, 4481, 5000, 5008, 5128, 5648, 7048, 7321, 7361, 7633, 8521
Offset: 1

Views

Author

Artur Jasinski, Nov 29 2007

Keywords

Comments

Squares of these numbers are of the form N^4-M^2 (where N belongs to A135786 and M to A135796). Proof uses: (x^4+6*x^2*y^2+y^4)^2 = (x^2-y^2)^4+(4*x^3*y+4*x*y^3)^2.
Refers to A057102, which had an incorrect description and has been replaced by A256418. As a result the present sequence should be re-checked. - N. J. A. Sloane, Apr 06 2015

Crossrefs

Programs

  • Mathematica
    a = {}; Do[Do[w = x^4 + 6x^2 y^2 + y^4; If[w < 10000, AppendTo[a, w]], {x, y, 1000}], {y, 1, 1000}]; Union[a]
    (* alternate program *)
    Union[Select[#[[1]]^4+6#[[1]]^2 #[[2]]^2+#[[2]]^4&/@Tuples[Range[ 1000],2], #<10000&]] (* Harvey P. Dale, Oct 07 2012 *)

A135794 Numbers of the form x^5 + 10*x^3*y^2 + 5*x*y^4 (where x,y are integers).

Original entry on oeis.org

16, 121, 122, 496, 512, 528, 1441, 1562, 1563, 1684, 3376, 3872, 3888, 3904, 4400, 6841, 8282, 8403, 8404, 8525, 9966, 12496, 15872, 16368, 16384, 16400, 16896, 20272, 21121, 27962, 29403, 29524, 29525, 29646, 31087, 33616, 37928, 46112
Offset: 1

Views

Author

Artur Jasinski, Nov 29 2007, Oct 10 2008

Keywords

Comments

Squares of these numbers are of the form N^5+M^2 (where N belongs to A000404 and M to A135795). Proof uses: (x^5+10x^3 y^2+5xy^4)^2=(x^2-y^2)^5+(5x^4y+10x^2y^3+y^5)^2.
Also numbers of the form ((y + x)^5 - (y - x)^5)/2 = x^5 + 10*x^3*y^2 + 5*x*y^4. - Artur Jasinski, Oct 10 2008
Refers to A057102, which had an incorrect description and has been replaced by A256418. As a result the present sequence should be re-checked. - N. J. A. Sloane, Apr 06 2015

Crossrefs

Programs

  • Mathematica
    a = {}; Do[Do[w = x^5 + 10x^3 y^2 + 5x y^4; If[w < 100000, AppendTo[a, w]], {x, 1, 1000}], {y, 1, 1000}]; Union[a]
Previous Showing 11-17 of 17 results.