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 31-40 of 43 results. Next

A319511 Triangle read by rows: T(n,k) is the number of Boolean functions on n variables having an algebraic degree equal to k (for n >= 0 and 0 <= k <= n).

Original entry on oeis.org

1, 1, 2, 1, 6, 8, 1, 14, 112, 128, 1, 30, 2016, 30720, 32768, 1, 62, 65472, 67043328, 2080374784, 2147483648, 1, 126, 4194176, 4398042316800, 144110790029344768, 9079256848778919936, 9223372036854775808
Offset: 0

Views

Author

Valentin Bakoev, Sep 21 2018

Keywords

Comments

The canonical representation of a given Boolean function f of n variables by its Algebraic Normal Form (ANF) is a multivariate polynomial of the form f(x_1, x_2, ..., x_n)= a + M_1 + M_2 + ... + M_s, where a is the Boolean constant 0 or 1, the + sign denotes sum modulo 2 (XOR) between different monomials, and 0 <= s < 2^n. The monomial M_i is a conjunction of some of these variables, for i= 1, 2, ..., s. The algebraic degree of a monomial is the number of variables in the monomial and the algebraic degree of a Boolean function is the maximum degree of the monomials. There are binomial(n, k) monomials of k variables, for k= 0, 1, ..., n. The case k= 0 means that no one of the variables is chosen to form a monomial. It corresponds to the Boolean constant 1, which is considered as a monomial. Its algebraic degree is equal to 0 and so T(n,0)= 1, for n= 0, 1, ... The zero constant is not considered as a monomial. It corresponds to the empty set - the case when no one of the possible monomials is chosen to form an ANF. Its algebraic degree is defined usually as -infinity. That is why the zero constant is not represented in the triangle.
The set of all Boolean functions of n variables can be partitioned into subsets in accordance with their algebraic degrees. The n-th row of the triangle represents the cardinalities of these subsets. Thus the sum of all numbers in the n-th row is the number of all Boolean functions of n variables - 1 (because of the zero constant), i.e., 2^(2^n)-1.
Equivalently, the number of nonempty sets of subsets of an n-set such that the maximum cardinality of the subsets is k. - Andrew Howroyd, Sep 23 2018

Examples

			Triangle begins:
  1;
  1, 2;
  1, 6, 8;
  1, 14, 112, 128;
  1, 30, 2016, 30720, 32768;
  1, 62, 65472, 67043328, 2080374784, 2147483648;
  1, 126, 4194176, 4398042316800, 144110790029344768, 9079256848778919936, 9223372036854775808;
  ...
From _Andrew Howroyd_, Sep 23 2018: (Start)
Case n=2: There are a total of 15 Boolean functions on two variables excluding the constant 0 function or equivalently 15 nonempty sets of subsets of {1,2}. These can be partitioned according to k the size of the largest subset as follows:
k=0: {{}};
k=1: {{1}}, {{1},{}}, {{2}}, {{2},{}}, {{1},{2}}, {{1},{2},{}};
k=2: {{1,2}}, {{1,2},{}}, {{1,2},{1}}, {{1,2},{1},{}}, {{1,2},{2}}, {{1,2},{2},{}}, {{1,2},{1},{2}}, {{1,2},{1},{2},{}}.
(End)
		

Crossrefs

Row sums are A051179.

Programs

  • Mathematica
    Table[(2^Binomial[n, k] - 1)*2^Sum[Binomial[n, i], {i, 0, k - 1}], {n, 0, 6}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 02 2019 *)
  • Maxima
    T(n,k):= (2^binomial(n,k) - 1)*2^sum(binomial(n,i), i, 0, k-1);
    
  • PARI
    T(n,k) = {((2^binomial(n, k)) - 1)*2^sum(i=0, k-1, binomial(n, i))} \\ Andrew Howroyd, Sep 22 2018

Formula

T(n,k) = ((2^binomial(n, k)) - 1)*2^(Sum_{i=0..k-1} binomial(n, i)).
T(n,0) = 1.
T(n,1) = 2^(n + 1) - 2 = A000918(n+1).
T(n,0) + T(n,1) + 1 = 2^(n+1) = A000079(n+1).
T(n,n) = 2^(2^n - 1) = A058891(n+1) = A001146(n)/2.
T(n,n) = A305860(n,0).

A322848 a(n) = floor(e^(e^n) - 1).

Original entry on oeis.org

1, 14, 1617, 528491310, 514843556263457213182264, 28511235679461510605581038657982805983853648817939444953417128835
Offset: 0

Views

Author

Greg Huber, Dec 28 2018

Keywords

Comments

Analog of A051179 replacing 2 with e.

Crossrefs

Cf. A051179.

Programs

  • Mathematica
    Table[Floor[E^(E^n)-1],{n,0,5}] (* Harvey P. Dale, Feb 05 2020 *)
  • PARI
    default(realprecision, 10000);
    A322848(n) = floor(exp(exp(n)))-1; \\ Antti Karttunen, Jan 17 2019

A356241 a(n) is the number of distinct Fermat numbers dividing n.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Jul 30 2022

Keywords

Comments

A051179(n) is the least number k such that a(k) = n.
The asymptotic density of occurrences of 0 is 1/2.
The asymptotic density of occurrences of 1 is (1/2) * Sum_{k>=0} 1/2^(2^k) = (1/2) * A007404 = 0.4082107545... .

Crossrefs

Cf. A080307 (positions of nonzeros), A080308 (positions of 0's).

Programs

  • Mathematica
    f = Table[(2^(2^n) + 1), {n, 0, 5}]; a[n_] := Count[f, _?(Divisible[n, #] &)]; Array[a, 100]

Formula

a(A000215(n)) = 1.
a(A051179(n)) = n.
a(A003593(n)) = A112753(n).
a(n) <= A356242(n).
a(A080307(n)) > 0 and a(A080308(n)) = 0.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=0} 1/(2^(2^k)+1) = 0.5960631721... (A051158).

A356242 a(n) is the number of Fermat numbers dividing n, counted with multiplicity.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 1, 0, 0, 2, 0, 1, 2, 0, 1, 1, 0, 0, 1, 2, 0, 3, 0, 0, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 0, 3, 0, 0, 1, 0, 2, 2, 0, 0, 3, 1, 0, 1, 0, 0, 2, 0, 0, 2, 0, 1, 1, 0, 1, 1, 1, 0, 2, 0, 0, 3, 0, 0, 1, 0, 1, 4, 0, 0, 1, 2, 0, 1
Offset: 1

Views

Author

Amiram Eldar, Jul 30 2022

Keywords

Comments

The multiplicity of a divisor d (not necessarily a prime) of n is defined in A169594 (see also the first formula).
A000244(n) is the least number k such that a(k) = n.
The asymptotic density of occurrences of 0 is 1/2.
The asymptotic density of occurrences of 1 is (1/2) * Sum_{k>=0} 1/(2^(2^k)+1) = (1/2) * A051158 = 0.2980315860... .

Crossrefs

Cf. A080307 (positions of nonzeros), A080308 (positions of 0's).

Programs

  • Mathematica
    f = Table[(2^(2^n) + 1), {n, 0, 5}]; a[n_] := Total[IntegerExponent[n, f]]; Array[a, 100]

Formula

a(n) = Sum_{k>=1} v(A000215(k), n), where v(m, n) is the exponent of the largest power of m that divides n.
a(A000215(n)) = 1.
a(A000244(n)) = a(A000351(n)) = a(A001026(n)) = n.
a(A003593(n)) = A112754(n).
a(n) >= A356241(n).
a(A051179(n)) = n.
a(A080307(n)) > 0 and a(A080308(n)) = 0.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=0} 1/(2^(2^k)) = 0.8164215090... (A007404).

A106375 Triangle read by rows: T(n,k) is the number of binary trees (each vertex has 0, or 1 left, or 1 right, or 2 children) with k edges and all leaves at level n.

Original entry on oeis.org

2, 1, 0, 4, 2, 4, 4, 1, 0, 0, 8, 4, 8, 24, 18, 36, 48, 40, 36, 24, 8, 1, 0, 0, 0, 16, 8, 16, 48, 100, 136, 240, 528, 616, 1152, 1936, 2466, 3716, 4912, 5840, 7088, 7768, 7696, 7120, 5796, 4056, 2464, 1232, 456, 112, 16, 1, 0, 0, 0, 0, 32, 16, 32, 96, 200, 528, 736, 1632
Offset: 1

Views

Author

Emeric Deutsch, May 05 2005

Keywords

Comments

Row n has 2^(n+1)-2 terms. In row n first nonzero term is T(n,n)=2^n and last nonzero term is T(n,2^(n+1)-2)=1. Row sums yield A051179. Column sums yield A106376.

Examples

			T(3,3)=8 because we have eight paths of length 3 (each edge can have two orientations).
Triangle begins:
2,1;
0,4,2,4,4,1;
0,0,8,4,8,24,18,36,48,40,36,24,8,1;
		

Crossrefs

Programs

  • Maple
    P[0]:=1: for n from 1 to 5 do P[n]:=sort(expand(2*t*P[n-1]+t^2*P[n-1]^2)) od: for n from 1 to 5 do seq(coeff(P[n],t^k),k=1..2^(n+1)-2) od; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := T[n, k] = Which[
       n == 1 && k == 1, 2,
       n == 1 && k == 2, 1,
       n == 1 || k == 1, 0,
       True, 2*T[n-1, k-1] + Sum[T[n-1, j]*T[n-1, k-2-j], {j, 1, k-3}]];
    Table[T[n, k], {n, 1, 5}, {k, 1, 2^(n+1)-2}] // Flatten (* Jean-François Alcover, Sep 21 2024, after Maple program for A106376 *)

Formula

T(n, k)=2T(n-1, k-1) + sum(T(n-1, j)T(n-1, k-2-j), j=1..k-3) (n, k>=2); T(1, 1)=2, T(1, 2)=1, T(1, k)=0 for k>=3, T(n, 1)=0 for n>=2. Generating polynomial P[n](t) of row n is given by rec. eq. P[n]=2tP[n-1]+(t*P[n-1])^2, P[0]=1.

A132076 a(1)=1, a(2)=2. a(n), for every positive integer n, is such that Product_{k=1..n} (Sum_{j=1..k} a(j)) = Sum_{k=1..n} Product_{j=1..k} a(j).

Original entry on oeis.org

1, 2, -6, -12, -240, -65280, -4294901760, -18446744069414584320, -340282366920938463444927863358058659840, -115792089237316195423570985008687907852929702298719625575994209400481361428480
Offset: 1

Views

Author

Leroy Quet, Oct 30 2007

Keywords

Comments

There are an infinite number of sequences {a(k)}, with different values for a(1) and a(2) (a(1) must be 0 or 1; a(2) can be anything), where Product_{k=1..n} (Sum_{j=1..k} a(j)) = Sum_{k=1..n} Product_{j=1..k} a(j), for all positive integers n. Setting a(1) to 1 and a(2) to 2 results in the sequence here.
All sequences (not necessarily integer sequences) with a(1) = 0 trivially have the property in the sequence name because each product is zero. For a general sequence in this family with a(1) = 1 and a(2) any integer, then a(3) = -a(2)^2 - a(2) and, for n >= 4, a(n) = -a(2)^(2^(n-3))*(a(2)^(2^(n-3))-1), so that all terms after a(2) are negatives of oblong (or promic) numbers (A002378). - Rick L. Shepherd, Aug 10 2014

Examples

			For n = 4, we have a(1) * (a(1)+a(2)) * (a(1)+a(2)+a(3)) * (a(1)+a(2)+a(3)+a(4)) = a(1) + a(1)*a(2) + a(1)*a(2)*a(3) + a(1)*a(2)*a(3)*a(4) =
1 * (1+2) * (1+2-6) * (1+2-6-12) = 1 + 1*2 + 1*2*(-6) + 1*2*(-6)*(-12) = 135.
		

Crossrefs

Programs

  • PARI
    a(n) = if(n<1, ,if(n<3, n, if(n==3, -6, -2^(2^(n-3))*(2^(2^(n-3))-1)))) \\ Rick L. Shepherd, Aug 10 2014

Formula

For n >= 4, a(n) = -2^(2^(n-3)) * (2^(2^(n-3)) - 1).
For n >= 4, a(n) = -A002378(A051179(n-3)). - Rick L. Shepherd, Aug 10 2014

Extensions

More terms from Max Alekseyev, Apr 29 2010

A173506 a(n) = (3^(3^n) - 1)/2.

Original entry on oeis.org

1, 13, 9841, 3812798742493, 221713244121518884974124815309574946401
Offset: 0

Views

Author

Roger L. Bagula, Feb 20 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(3^(3^m) -1)/2, {m, 0, 10}]
  • Sage
    [(3^(3^n) -1)/2 for n in (0..10)] # G. C. Greubel, Apr 25 2021

Formula

2*a(n+1) + 1 = ( 2*a(n) + 1 )^3.

Extensions

Introduced standard nomenclature in the definition, added recurrence - the Assoc. Editors of the OEIS, Feb 24 2010

A322851 a(n) = floor(2^(2^(n/2))-1).

Original entry on oeis.org

1, 1, 3, 6, 15, 49, 255, 2544, 65535, 6479346, 4294967295, 41981937869755, 18446744073709551615, 1762483107300123635910219390, 340282366920938463463374607431768211455
Offset: 0

Views

Author

Greg Huber, Dec 28 2018

Keywords

Comments

A051179 is a bisection of this sequence.

Crossrefs

Cf. A051179. A322852 is the base-e analog.

Programs

A382519 Odd positive integers m such that phi(m) and phi(m+1) are both powers of 2.

Original entry on oeis.org

1, 3, 5, 15, 255, 65535, 4294967295
Offset: 1

Views

Author

Caleb Stanford, Apr 05 2025

Keywords

Comments

Sequence is finite with only 7 values. With the exception of m = 5, the others are products of the first k Fermat primes; i.e., products of A019434 and matching the initial terms of A051179. With the exception of m = 5, sequence resembles A250405.

Examples

			5 is present because phi(5) = 4 and phi(6) = 2, both powers of two.
15 is present because phi(15) = 8 and phi(16) = 8, both powers of two.
17 is not present because phi(17) = 16 but phi(18) = 6, not a power of two.
		

Crossrefs

Subsequence of A382803.

Formula

a(n) = 2^2^k - 1 for k = 0, 1, 2, 3, 4, 5, equivalently the product of first k Fermat numbers, OR a(n) = 5. Sequence is finite because the next Fermat number, 4294967297 is composite.

A382803 Positive integers m such that phi(m) and phi(m+1) are both powers of 2.

Original entry on oeis.org

1, 2, 3, 4, 5, 15, 16, 255, 256, 65535, 65536, 4294967295
Offset: 1

Views

Author

Caleb Stanford, Apr 05 2025

Keywords

Comments

Numbers m such that m and m+1 are in A003401
Each of m and m+1 must be a power of 2 times a product of Fermat primes.
Apart from term 5, odd terms are of the form 2^2^k - 1 for k in 0...5.
Even terms are exactly numbers of the form 2^2^k such that 2^2^k + 1 is a Fermat prime (A019434).
The sequence is thus infinite iff A019434 is infinite, i.e., iff there are infinitely many Fermat primes.

Examples

			16 is present because phi(16) = 8 and phi(17) = 16, both powers of two.
17 is not present because phi(17) = 16 but phi(18) = 6, not a power of two.
		

Crossrefs

Previous Showing 31-40 of 43 results. Next