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 116 results. Next

A364837 Initial digit of 2^(2^n) = A001146(n).

Original entry on oeis.org

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

Views

Author

Marco Ripà, Aug 10 2023

Keywords

Comments

The sequence corresponds to the initial digit of 2vvn (since 2^(2^n) = ((((2^2)^2)^...)^2) (n times)), where vv indicates weak tetration (see links).
Conjecture: this sequence obeys Benford's law.
For any n > 1, the final digit of 2^(2^n) is 6.

Examples

			a(5) = 4, since 2^(2^5) = 2^32 = 4294967296.
		

Crossrefs

Programs

  • Mathematica
    Join[{2},Table[Floor[2^(2^n)/10^Floor[Log10[2^(2^n)]]],{n,27}]] (* Stefano Spezia, Aug 10 2023 *)
  • Python
    def A364837(n): return int(str(1<<(1<Chai Wah Wu, Sep 14 2023

Formula

a(n) = floor(2^(2^n)/10^floor(log_10(2^(2^n)))), for n > 0.
a(n) = A000030(A001146(n)).

Extensions

More terms from Jinyuan Wang, Aug 10 2023

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

A153450 Number of primes <= 2^(2^n) = pi(A001146(n)).

Original entry on oeis.org

1, 2, 6, 54, 6542, 203280221, 425656284035217743
Offset: 0

Views

Author

Harry J. Smith, Dec 27 2008

Keywords

Comments

The primes up to 2^(2^n) are exactly determined from the primes up to 2^(2^(n-1)), n >= 1, with the sieve of Eratosthenes. This gives an inductive algorithm to find all primes up to any integer (modulo space and time constraints...) This means that all odd primes are ultimately determined by the even prime, 2. - Daniel Forgues, Dec 04 2011

Examples

			a(3) = 54 because 2^(2^3) = 256 and there are 54 primes <= 256.
		

Crossrefs

Programs

Formula

a(n) = pi(2^(2^n)) = A007053(2^n).
a(n) = A000720(A001146(n)).

Extensions

a(6) from Charles R Greathouse IV, Dec 05 2011

A019434 Fermat primes: primes of the form 2^(2^k) + 1, for some k >= 0.

Original entry on oeis.org

3, 5, 17, 257, 65537
Offset: 1

Views

Author

Keywords

Comments

It is conjectured that there are only 5 terms. Currently it has been shown that 2^(2^k) + 1 is composite for 5 <= k <= 32 (see Eric Weisstein's Fermat Primes link). - Dmitry Kamenetsky, Sep 28 2008
No Fermat prime is a Brazilian number. So Fermat primes belong to A220627. For proof see Proposition 3 page 36 in "Les nombres brésiliens" in Links. - Bernard Schott, Dec 29 2012
This sequence and A001220 are disjoint (see "Other theorems about Fermat numbers" in Wikipedia link). - Felix Fröhlich, Sep 07 2014
Numbers n > 1 such that n * 2^(n-2) divides (n-1)! + 2^(n-1). - Thomas Ordowski, Jan 15 2015
From Jaroslav Krizek, Mar 17 2016: (Start)
Primes p such that phi(p) = 2*phi(p-1); primes from A171271.
Primes p such that sigma(p-1) = 2p - 3.
Primes p such that sigma(p-1) = 2*sigma(p) - 5.
For n > 1, a(n) = primes p such that p = 4 * phi((p-1) / 2) + 1.
Subsequence of A256444 and A256439.
Conjectures:
1) primes p such that phi(p) = 2*phi(p-2).
2) primes p such that phi(p) = 2*phi(p-1) = 2*phi(p-2).
3) primes p such that p = sigma(phi(p-2)) + 2.
4) primes p such that phi(p-1) + 1 divides p + 1.
5) numbers n such that sigma(n-1) = 2*sigma(n) - 5. (End)
Odd primes p such that ratio of the form (the number of nonnegative m < p such that m^q == m (mod p))/(the number of nonnegative m < p such that -m^q == m (mod p)) is a divisor of p for all nonnegative q. - Juri-Stepan Gerasimov, Oct 13 2020
Numbers n such that tau(n)*(number of distinct ratio (the number of nonnegative m < n such that m^q == m (mod n))/(the number of nonnegative m < n such that -m^q == m (mod n))) for nonnegative q is equal to 4. - Juri-Stepan Gerasimov, Oct 22 2020
The numbers of primitive roots for the five known terms are 1, 2, 8, 128, 32768. - Gary W. Adamson, Jan 13 2022
Prime numbers such that every residue is either a primitive root or a quadratic residue. - Keith Backman, Jul 11 2022
If there are only 5 Fermat primes, then there are only 31 odd order groups which have a 2-group automorphism group. See the Miles Englezou link for a proof. - Miles Englezou, Mar 10 2025

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 137-141, 197.
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • C. F. Gauss, Disquisitiones Arithmeticae, Yale, 1965; see Table 1, p. 458.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, pp. 78-79.
  • Richard K. Guy, Unsolved Problems in Number Theory, A3.
  • Hardy and Wright, An Introduction to the Theory of Numbers, bottom of page 18 in the sixth edition, gives an heuristic argument that this sequence is finite.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 7, 70.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 136-137.

Crossrefs

Subsequence of A147545 and of A334101. Cf. also A333788, A334092.
Cf. A045544.

Programs

Formula

a(n+1) = A180024(A049084(a(n))). - Reinhard Zumkeller, Aug 08 2010
a(n) = 1 + A001146(n-1), if 1 <= n <= 5. - Omar E. Pol, Jun 08 2018

A000215 Fermat numbers: a(n) = 2^(2^n) + 1.

Original entry on oeis.org

3, 5, 17, 257, 65537, 4294967297, 18446744073709551617, 340282366920938463463374607431768211457, 115792089237316195423570985008687907853269984665640564039457584007913129639937
Offset: 0

Views

Author

Keywords

Comments

It is conjectured that just the first 5 numbers in this sequence are primes.
An infinite coprime sequence defined by recursion. - Michael Somos, Mar 14 2004
For n>0, Fermat numbers F(n) have digital roots 5 or 8 depending on whether n is even or odd (Koshy). - Lekraj Beedassy, Mar 17 2005
This is the special case k=2 of sequences with exact mutual k-residues. In general, a(1)=k+1 and a(n)=min{m | m>a(n-1), mod(m,a(i))=k, i=1,...,n-1}. k=1 gives Sylvester's sequence A000058. - Seppo Mustonen, Sep 04 2005
For n>1 final two digits of a(n) are periodically repeated with period 4: {17, 57, 37, 97}. - Alexander Adamchuk, Apr 07 2007
For 1 < k <= 2^n, a(A007814(k-1)) divides a(n) + 2^k. More generally, for any number k, let r = k mod 2^n and suppose r != 1, then a(A007814(r-1)) divides a(n) + 2^k. - T. D. Noe, Jul 12 2007
From Daniel Forgues, Jun 20 2011: (Start)
The Fermat numbers F_n are F_n(a,b) = a^(2^n) + b^(2^n) with a = 2 and b = 1.
For n >= 2, all factors of F_n = 2^(2^n) + 1 are of the form k*(2^(n+2)) + 1 (k >= 1).
The products of distinct Fermat numbers (in their binary representation, see A080176) give rows of Sierpiński's triangle (A006943). (End)
Let F(n) be a Fermat number. For n > 2, F(n) is prime if and only if 5^((F(n)-1)/4) == sqrt(F(n)-1) (mod F(n)). - Arkadiusz Wesolowski, Jul 16 2011
Conjecture: let the smallest prime factor of Fermat number F(n) be P(F(n)). If F(n) is composite, then P(F(n)) < 3*2^(2^n/2 - n - 2). - Arkadiusz Wesolowski, Aug 10 2012
The Fermat primes are not Brazilian numbers, so they belong to A220627, but the Fermat composites are Brazilian numbers so they belong to A220571. For a proof, see Proposition 3 page 36 on "Les nombres brésiliens" in Links. - Bernard Schott, Dec 29 2012
It appears that this sequence is generated by starting with a(0)=3 and following the rule "Write in binary and read in base 4". For an example of "Write in binary and read in ternary", see A014118. - John W. Layman, Jul 30 2013
Conjecture: the numbers > 5 in this sequence, i.e., 2^2^k + 1 for k>1, are exactly the numbers n such that (n-1)^4-1 divides 2^(n-1)-1. - M. F. Hasler, Jul 24 2015

Examples

			a(0) = 1*2^1 + 1 = 3 = 1*(2*1) + 1.
a(1) = 1*2^2 + 1 = 5 = 1*(2*2) + 1.
a(2) = 1*2^4 + 1 = 17 = 2*(2*4) + 1.
a(3) = 1*2^8 + 1 = 257 = 16*(2*8) + 1.
a(4) = 1*2^16 + 1 = 65537 = 2048*(2*16) + 1.
a(5) = 1*2^32 + 1 = 4294967297 = 641*6700417 = (10*(2*32) + 1)*(104694*(2*32) + 1).
a(6) = 1*2^64 + 1 = 18446744073709551617 = 274177*67280421310721 = (2142*(2*64) + 1)*(525628291490*(2*64) + 1).
		

References

  • M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 2nd. ed., 2001; see p. 3.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 7.
  • P. Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 87.
  • James Gleick, Faster, Vintage Books, NY, 2000 (see pp. 259-261).
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, pp. 78-79.
  • R. K. Guy, Unsolved Problems in Number Theory, A3.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 14.
  • E. Hille, Analytic Function Theory, Vol. I, Chelsea, N.Y., see p. 64.
  • T. Koshy, "The Digital Root Of A Fermat Number", Journal of Recreational Mathematics Vol. 32 No. 2 2002-3 Baywood NY.
  • M. Krizek, F. Luca & L. Somer, 17 Lectures on Fermat Numbers, Springer-Verlag NY 2001.
  • C. S. Ogilvy and J. T. Anderson, Excursions in Number Theory, Oxford University Press, NY, 1966, p. 36.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see pp. 18, 59.
  • C. A. Pickover, The Math Book, Sterling, NY, 2009; see p. 202.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 6-7, 70-75.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 136-137.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1987, pp. 148-149.

Crossrefs

a(n) = A001146(n) + 1 = A051179(n) + 2.
See A004249 for a similar sequence.
Cf. A080176 for binary representation of Fermat numbers.

Programs

  • Haskell
    a000215 = (+ 1) . (2 ^) . (2 ^)  -- Reinhard Zumkeller, Feb 13 2015
    
  • Maple
    A000215 := n->2^(2^n)+1;
  • Mathematica
    Table[2^(2^n) + 1, {n, 0, 8}] (* Alonso del Arte, Jun 07 2011 *)
  • Maxima
    A000215(n):=2^(2^n)+1$ makelist(A000215(n),n,0,10); /* Martin Ettl, Dec 10 2012 */
    
  • PARI
    a(n)=if(n<1,3*(n==0),(a(n-1)-1)^2+1)
    
  • Python
    def a(n): return 2**(2**n) + 1
    print([a(n) for n in range(9)]) # Michael S. Branicky, Apr 19 2021

Formula

a(0) = 3; a(n) = (a(n-1)-1)^2 + 1, n >= 1.
a(n) = a(n-1)*a(n-2)*...*a(1)*a(0) + 2, n >= 0, where for n = 0, we get the empty product, i.e., 1, plus 2, giving 3 = a(0). - Benoit Cloitre, Sep 15 2002 [edited by Daniel Forgues, Jun 20 2011]
The above formula implies that the Fermat numbers (being all odd) are coprime.
Conjecture: F is a Fermat prime if and only if phi(F-2) = (F-1)/2. - Benoit Cloitre, Sep 15 2002
A000120(a(n)) = 2. - Reinhard Zumkeller, Aug 07 2010
If a(n) is composite, then a(n) = A242619(n)^2 + A242620(n)^2 = A257916(n)^2 - A257917(n)^2. - Arkadiusz Wesolowski, May 13 2015
Sum_{n>=0} 1/a(n) = A051158. - Amiram Eldar, Oct 27 2020
From Amiram Eldar, Jan 28 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = A249119.
Product_{n>=0} (1 - 1/a(n)) = 1/2. (End)
a(n) = 2*A077585(n) + 3. - César Aguilera, Jul 26 2023
a(n) = 2*2^A000225(n) + 1. - César Aguilera, Jul 11 2024

A225546 Tek's flip: Write n as the product of distinct factors of the form prime(i)^(2^(j-1)) with i and j integers, and replace each such factor with prime(j)^(2^(i-1)).

Original entry on oeis.org

1, 2, 4, 3, 16, 8, 256, 6, 9, 32, 65536, 12, 4294967296, 512, 64, 5, 18446744073709551616, 18, 340282366920938463463374607431768211456, 48, 1024, 131072, 115792089237316195423570985008687907853269984665640564039457584007913129639936, 24, 81, 8589934592, 36, 768
Offset: 1

Views

Author

Paul Tek, May 10 2013

Keywords

Comments

This is a multiplicative self-inverse permutation of the integers.
A225547 gives the fixed points.
From Antti Karttunen and Peter Munn, Feb 02 2020: (Start)
This sequence operates on the Fermi-Dirac factors of a number. As arranged in array form, in A329050, this sequence reflects these factors about the main diagonal of the array, substituting A329050[j,i] for A329050[i,j], and this results in many relationships including significant homomorphisms.
This sequence provides a relationship between the operations of squaring and prime shift (A003961) because each successive column of the A329050 array is the square of the previous column, and each successive row is the prime shift of the previous row.
A329050 gives examples of how significant sets of numbers can be formed by choosing their factors in relation to rows and/or columns. This sequence therefore maps equivalent derived sets by exchanging rows and columns. Thus odd numbers are exchanged for squares, squarefree numbers for powers of 2 etc.
Alternative construction: For n > 1, form a vector v of length A299090(n), where each element v[i] for i=1..A299090(n) is a product of those distinct prime factors p(i) of n whose exponent e(i) has the bit (i-1) "on", or 1 (as an empty product) if no such exponents are present. a(n) is then Product_{i=1..A299090(n)} A000040(i)^A048675(v[i]). Note that because each element of vector v is squarefree, it means that each exponent A048675(v[i]) present in the product is a "submask" (not all necessarily proper) of the binary string A087207(n).
This permutation effects the following mappings:
A000035(a(n)) = A010052(n), A010052(a(n)) = A000035(n). [Odd numbers <-> Squares]
A008966(a(n)) = A209229(n), A209229(a(n)) = A008966(n). [Squarefree numbers <-> Powers of 2]
(End)
From Antti Karttunen, Jul 08 2020: (Start)
Moreover, we see also that this sequence maps between A016825 (Numbers of the form 4k+2) and A001105 (2*squares) as well as between A008586 (Multiples of 4) and A028983 (Numbers with even sum of the divisors).
(End)

Examples

			  7744  = prime(1)^2^(2-1)*prime(1)^2^(3-1)*prime(5)^2^(2-1).
a(7744) = prime(2)^2^(1-1)*prime(3)^2^(1-1)*prime(2)^2^(5-1) = 645700815.
		

Crossrefs

Cf. A225547 (fixed points) and the subsequences listed there.
Transposes A329050, A329332.
An automorphism of positive integers under the binary operations A059895, A059896, A059897, A306697, A329329.
An automorphism of A059897 subgroups: A000379, A003159, A016754, A122132.
Permutes lists where membership is determined by number of Fermi-Dirac factors: A000028, A050376, A176525, A268388.
Sequences f that satisfy f(a(n)) = f(n): A048675, A064179, A064547, A097248, A302777, A331592.
Pairs of sequences (f,g) that satisfy a(f(n)) = g(a(n)): (A000265,A008833), (A000290,A003961), (A005843,A334747), (A006519,A007913), (A008586,A334748).
Pairs of sequences (f,g) that satisfy a(f(n)) = g(n), possibly with offset change: (A000040,A001146), (A000079,A019565).
Pairs of sequences (f,g) that satisfy f(a(n)) = g(n), possibly with offset change: (A000035, A010052), (A008966, A209229), (A007814, A248663), (A061395, A299090), (A087207, A267116), (A225569, A227291).
Cf. A331287 [= gcd(a(n),n)].
Cf. A331288 [= min(a(n),n)], see also A331301.
Cf. A331309 [= A000005(a(n)), number of divisors].
Cf. A331590 [= a(a(n)*a(n))].
Cf. A331591 [= A001221(a(n)), number of distinct prime factors], see also A331593.
Cf. A331740 [= A001222(a(n)), number of prime factors with multiplicity].
Cf. A331733 [= A000203(a(n)), sum of divisors].
Cf. A331734 [= A033879(a(n)), deficiency].
Cf. A331735 [= A009194(a(n))].
Cf. A331736 [= A000265(a(n)) = a(A008833(n)), largest odd divisor].
Cf. A335914 [= A038040(a(n))].
A self-inverse isomorphism between pairs of A059897 subgroups: (A000079,A005117), (A000244,A062503), (A000290\{0},A005408), (A000302,A056911), (A000351,A113849 U {1}), (A000400,A062838), (A001651,A252895), (A003586,A046100), (A007310,A000583), (A011557,A113850 U {1}), (A028982,A042968), (A053165,A065331), (A262675,A268390).
A bijection between pairs of sets: (A001248,A011764), (A007283,A133466), (A016825, A001105), (A008586, A028983).
Cf. also A336321, A336322 (compositions with another involution, A122111).

Programs

  • Mathematica
    Array[If[# == 1, 1, Times @@ Flatten@ Map[Function[{p, e}, Map[Prime[Log2@ # + 1]^(2^(PrimePi@ p - 1)) &, DeleteCases[NumberExpand[e, 2], 0]]] @@ # &, FactorInteger[#]]] &, 28] (* Michael De Vlieger, Jan 21 2020 *)
  • PARI
    A019565(n) = factorback(vecextract(primes(logint(n+!n, 2)+1), n));
    a(n) = {my(f=factor(n)); for (i=1, #f~, my(p=f[i,1]); f[i,1] = A019565(f[i,2]); f[i,2] = 2^(primepi(p)-1);); factorback(f);} \\ Michel Marcus, Nov 29 2019
    
  • PARI
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A225546(n) = if(1==n,1,my(f=factor(n),u=#binary(vecmax(f[, 2])),prods=vector(u,x,1),m=1,e); for(i=1,u,for(k=1,#f~, if(bitand(f[k,2],m),prods[i] *= f[k,1])); m<<=1); prod(i=1,u,prime(i)^A048675(prods[i]))); \\ Antti Karttunen, Feb 02 2020
    
  • Python
    from math import prod
    from sympy import prime, primepi, factorint
    def A225546(n): return prod(prod(prime(i) for i, v in enumerate(bin(e)[:1:-1],1) if v == '1')**(1<Chai Wah Wu, Mar 17 2023

Formula

Multiplicative, with a(prime(i)^j) = A019565(j)^A000079(i-1).
a(prime(i)) = 2^(2^(i-1)).
From Antti Karttunen and Peter Munn, Feb 06 2020: (Start)
a(A329050(n,k)) = A329050(k,n).
a(A329332(n,k)) = A329332(k,n).
Equivalently, a(A019565(n)^k) = A019565(k)^n. If n = 1, this gives a(2^k) = A019565(k).
a(A059897(n,k)) = A059897(a(n), a(k)).
The previous formula implies a(n*k) = a(n) * a(k) if A059895(n,k) = 1.
a(A000040(n)) = A001146(n-1); a(A001146(n)) = A000040(n+1).
a(A000290(a(n))) = A003961(n); a(A003961(a(n))) = A000290(n) = n^2.
a(A000265(a(n))) = A008833(n); a(A008833(a(n))) = A000265(n).
a(A006519(a(n))) = A007913(n); a(A007913(a(n))) = A006519(n).
A007814(a(n)) = A248663(n); A248663(a(n)) = A007814(n).
A048675(a(n)) = A048675(n) and A048675(a(2^k * n)) = A048675(2^k * a(n)) = k + A048675(a(n)).
(End)
From Antti Karttunen and Peter Munn, Jul 08 2020: (Start)
For all n >= 1, a(2n) = A334747(a(n)).
In particular, for n = A003159(m), m >= 1, a(2n) = 2*a(n). [Note that A003159 includes all odd numbers]
(End)

Extensions

Name edited by Peter Munn, Feb 14 2020
"Tek's flip" prepended to the name by Antti Karttunen, Jul 08 2020

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

Original entry on oeis.org

2, 2, 10, 218, 64594, 4294642034, 18446744047940725978, 340282366920938463334247399005993378250, 115792089237316195423570985008687907850547725730273056332267095982282337798562
Offset: 0

Views

Author

Keywords

Comments

Inverse binomial transform of A001146.
Number of nondegenerate Boolean functions of n variables.
Twice the number of covers of an n-set S (A003465). That is, the number of subsets of the power set of S whose union is S. [corrected by Manfred Boergens, May 02 2024]
From David P. Moulton, Nov 11 2010: (Start)
To see why the formula in the definition gives the number of covers of an n-set we use inclusion-exclusion.
The set S has n elements and T, the power set of S, has 2^n elements.
Let U be the power set of T; we want to know how many elements of U have union S.
For any element i of S, let U_i be the subset of U whose unions do not contain i, so we want to compute the size of the complement of the union of the U_i s.
Write U_I for the union of U_i for i in I. Then U_I consists of all subsets of T whose union is disjoint from I, so it consists of all subsets of the power set of S - I. The power set of S - I has 2^(n - #I) elements, so U_I has size 2^2^(n - #I).
Then the basic inclusion-exclusion formula says that our answer is
#(U - union_{i in S} U_i) = Sum_{I subseteq S} (-1)^#I #U_I = Sum_{j=0..n} (-1)^j Sum_{#I = j} #U_I = Sum_{j=0..n} (-1)^j binomial(n,j)*2^2^(n-j), as required.
(End)
Here is Comtet's proof: Let P'(S) be the power set of nonempty subsets of S. Then |P'(P'(S))| = 2^(2^n-1)-1 = Sum_k binomial(n,k)*a(k). Apply the inverse binomial transform to get a(n) = Sum_k (-1)^k*binomial(n,k)*2^(2^(n-k)-1). - N. J. A. Sloane, May 19 2011
For disjoint subsets of the power set see A186021. For disjoint nonempty subsets of the power set see A000110. - Manfred Boergens, May 02 2024 and Apr 09 2025

Examples

			Let n = 2, S = {a,b}, and P = {0,a,b,ab}. There are ten subsets of P whose union is S: {ab}, {a,b}, {a,ab}, {b,ab}, {a,b,ab}, and the empty set together with the same five. - _Marc LeBrun_, Nov 10 2010
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 165.
  • M. A. Harrison, Introduction to Switching and Automata Theory. McGraw Hill, NY, 1965, p. 170.
  • S. Muroga, Threshold Logic and Its Applications. Wiley, NY, 1971, p. 38 and 214.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • C. G. Wagner, Covers of finite sets, Proc. 4th S-E Conf. Combin., Graph Theory, Computing, Congress. Numer. 8 (1973), 515-520.

Crossrefs

Equals twice A003465.
Row sums of A163353.
Diagonal of A381683.

Programs

  • Magma
    [&+[(-1)^(n-k)*Binomial(n, k)*2^(2^k): k in [0..n]]: n in [0..10]]; // Vincenzo Librandi, Dec 28 2015
  • Maple
    f:=n->add((-1)^(n-k)*binomial(n,k)*2^(2^k),k=0..n);
  • Mathematica
    Table[Sum[(-1)^(n-k) Binomial[n,k]2^(2^k),{k,0,n}],{n,0,10}] (* Harvey P. Dale, Oct 17 2011 *)
  • PARI
    a(n)=sum(k=0,n,(-1)^(n-k)*binomial(n,k)<<(2^k)) \\ Charles R Greathouse IV, Jan 02 2012
    
  • PARI
    a(n) = sum(k=0, n, (-1)^k*n!/k!/(n-k)!*2^(2^(n-k))); \\ Altug Alkan, Dec 29 2015
    

Formula

The coefficient of x^k in the polynomial p_n(x) = Sum_{j=0..n} (-1)^j binomial(n,j) * (x+1)^2^(n-j) gives the number of covers of a set of size n where the covers have k elements. Also, there is a recurrence: f_n(k) = k, if n = 0, and f_n(k) = f_{n-1}(k^2) - f_{n-1}(k), if n > 0, that gives a(n) = f_n(2) and p_n(x) = f_n(x+1). - David W. Wilson, Nov 11 2010
E.g.f.: Sum(exp((2^n-1)*x)*log(2)^n/n!, n=0..infinity). - Vladeta Jovovic, May 30 2004
For n > 0, a(n) = A076078(A002110(n)). - Matthew Vandermast, Nov 14 2010
a(n) ~ 2^(2^n). - Charles R Greathouse IV, Jan 02 2012
a(n) = 2*A003465(n). - Maurizio De Leo, Feb 27 2015

Extensions

Since this sequence arises in several different contexts, I replaced the old definition with an explicit formula. - N. J. A. Sloane, Nov 23 2010

A051179 a(n) = 2^(2^n) - 1.

Original entry on oeis.org

1, 3, 15, 255, 65535, 4294967295, 18446744073709551615, 340282366920938463463374607431768211455, 115792089237316195423570985008687907853269984665640564039457584007913129639935
Offset: 0

Views

Author

Alan DeKok (aland(AT)ox.org)

Keywords

Comments

In a tree with binary nodes (0, 1 children only), the maximum number of unique child nodes at level n.
Number of binary trees (each vertex has 0, or 1 left, or 1 right, or 2 children) such that all leaves are at level n. Example: a(1) = 3 because we have (i) root with a left child, (ii) root with a right child and (iii) root with two children. a(n) = A000215(n) - 2. - Emeric Deutsch, Jan 20 2004
Similarly, this is also the number of full balanced binary trees of height n. (There is an obvious 1-to-1 correspondence between the two sets of trees.) - David Hobby (hobbyd(AT)newpaltz.edu), May 02 2010
Partial products of A000215.
The first 5 terms n (only) have the property that phi(n)=(n+1)/2, where phi(n) = A000010(n) is Euler's totient function. - Lekraj Beedassy, Feb 12 2007
If A003558(n) is of the form 2^n and A179480(n+1) is even, then (2^(A003558(n)) - 1) is in A051179. Example: A003558(25) = 8 with A179480(25) = 4, even. Then (2^8 - 1) = 255. - Gary W. Adamson, Aug 20 2012
For any odd positive a(0), the sequence defined by a(n) = a(n-1) * (a(n-1) + 2) gives a constructive proof that there exist integers with at least n distinct prime factors, e.g., a(n), since omega(a(n)) >= n. As a corollary, this gives a constructive proof of Euclid's theorem stating that there are infinitely many primes. - Daniel Forgues, Mar 07 2017
From Sergey Pavlov, Apr 24 2017: (Start)
I conjecture that, for n > 7, omega(a(n)) > omega(a(n-1)) > n.
It seems that the largest prime divisor p(n+1) of a(n+1) is always bigger than the largest prime divisor of a(n): p(n+1) > p(n). For 3 < n < 8, p(n+1) > 100 * p(n).
(End)
It appears that a(n) is the integer whose bits indicate the possible subset sums of the first n powers of two. For another example, see the calculation for primes at A368491 - Yigit Oktar, Mar 20 2025

Examples

			15 = 3*5; 255 = 3*5*17; 65535 = 3*5*17*257; ... - _Daniel Forgues_, Mar 07 2017
		

References

  • M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 1999; see p. 4.

Crossrefs

Programs

Formula

a(n) = A000215(n) - 2.
a(n) = (a(n-1) + 1)^2 - 1, a(0) = 1. [ or a(n) = a(n-1)(a(n-1) + 2) ].
1 = 2/3 + 4/15 + 16/255 + 256/65535 + ... = Sum_{n>=0} A001146(n)/a(n+1) with partial sums: 2/3, 14/15, 254/255, 65534/65535, ... - Gary W. Adamson, Jun 15 2003
a(n) = b(n-1) where b(1)=1, b(n) = Product_{k=1..n-1} (b(k) + 2). - Benoit Cloitre, Sep 13 2003
A136308(n) = A007088(a(n)). - Jason Kimberley, Dec 19 2012
A000215(n) = a(n+1) / a(n). - Daniel Forgues, Mar 07 2017
Sum_{n>=0} 1/a(n) = A048649. - Amiram Eldar, Oct 27 2020

A003180 Number of equivalence classes of Boolean functions of n variables under action of symmetric group.

Original entry on oeis.org

2, 4, 12, 80, 3984, 37333248, 25626412338274304, 67516342973185974328175690087661568, 2871827610052485009904013737758920847669809829897636746529411152822140928
Offset: 0

Views

Author

Keywords

Comments

A003180(n-1) is the number of equivalence classes of Boolean functions of n variables from Post class F(8,inf) under action of symmetric group.
Also number of nonisomorphic sets of subsets of an n-set.
Also the number of unlabeled hypergraphs on n nodes [Qian]. - N. J. A. Sloane, May 12 2014
The number of unlabeled hypergraphs with empty hyperedges allowed on n nodes. Compare with A000612 where empty hyperedges are not allowed. - Michael Somos, Feb 15 2019
In the 1995 Encyclopedia of Integer Sequences this sequence appears twice, as both M1265 and M3458 (one entry began at n=0, the other at n=1).

Examples

			From _Gus Wiseman_, Aug 05 2019: (Start)
Non-isomorphic representatives of the a(0) = 2 through a(2) = 12 sets of subsets:
  {}    {}        {}
  {{}}  {{}}      {{}}
        {{1}}     {{1}}
        {{},{1}}  {{1,2}}
                  {{},{1}}
                  {{1},{2}}
                  {{},{1,2}}
                  {{2},{1,2}}
                  {{},{1},{2}}
                  {{},{2},{1,2}}
                  {{1},{2},{1,2}}
                  {{},{1},{2},{1,2}}
(End)
		

References

  • M. A. Harrison, Introduction to Switching and Automata Theory. McGraw Hill, NY, 1965, p. 147.
  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Section 7.1.1, p. 79.
  • S. Muroga, Threshold Logic and Its Applications. Wiley, NY, 1971, p. 38, Table 2.3.2. - Row 5.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Twice A000612. Cf. A001146. Row sums of A052265.

Programs

  • Maple
    with(numtheory):with(combinat):
    for n from 1 to 10 do
    p:=partition(n): s:=0: for k from 1 to nops(p) do q:=convert(p[k],multiset): for i from 0 to n do a(i):=0: od:
      for i from 1 to nops(q) do a(q[i][1]):=q[i][2]: od:
      c:=1: ord:=1: for i from 1 to n do c:=c*a(i)!*i^a(i):ord:=lcm(ord,i): od: ss:=0:
      for i from 1 to ord do if ord mod i=0 then ss:=ss+phi(ord/i)*2^add(gcd(j,i)*a(j),j=1..n): fi: od:
      s:=s+2^(ss/ord)/c:
    od:
    printf(`%d `,n):
    printf("%d ",s):
    od: # Vladeta Jovovic, Sep 19 2006
  • Mathematica
    a[n_] := Sum[1/Function[p, Product[Function[c, j^c*c!][Coefficient[p, x, j]], {j, 1, Exponent[p, x]}]][Total[x^l]]*2^(Function[w, Sum[Product[ 2^GCD[t, l[[i]]], {i, 1, Length[l]}], {t, 1, w}]/w][If[l == {}, 1, LCM @@ l]]), {l, IntegerPartitions[n]}];
    a /@ Range[0, 11] (* Jean-François Alcover, Feb 19 2020, after Alois P. Heinz in A000612 *)
    fix[s_] := 2^Sum[Sum[MoebiusMu[i/d] 2^Sum[GCD[j, d] s[j], {j, Keys[s]}], {d, Divisors[i]}]/i, {i, LCM @@ Keys[s]}];
    a[0] = 2;
    a[n_] := Sum[fix[s]/Product[j^s[j] s[j]!, {j, Keys[s]}], {s, Counts /@ IntegerPartitions[n]}];
    Table[a[n], {n, 0, 8}]
    (* Andrey Zabolotskiy, Mar 24 2020, after Christian G. Bower's formula; requires Mathematica 10+ *)

Formula

a(n) = Sum_{1*s_1+2*s_2+...=n} (fixA[s_1, s_2, ...]/(1^s_1*s_1!*2^s_2*s_2!*...)) where fixA[s_1, s_2, ...] = 2^Sum_{i>=1} ( Sum_{d|i} ( mu(i/d)*( 2^Sum_{j>=1} ( gcd(j, d)*s_j))))/i.
a(n) = 2 * A000612(n).

Extensions

More terms from Vladeta Jovovic, Sep 19 2006
Edited with formula by Christian G. Bower, Jan 08 2004

A051775 Table T(n,m) = Nim-product of n and m, read by antidiagonals, for n >= 0, m >= 0.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 19 1999

Keywords

Comments

Note on an algorithm, R. J. Mathar, May 29 2011: (Start)
Let N* denote the Nim-product and N+ the Nim-sum (A003987) of two numbers, and let * and + denote the usual multiplication and addition.
To compute n N* m, write n and m separately as Nim-sums with the aid of the binary representation of n = n0 + n1*2 + n2*4 + n3*8 + n4*16.. and m = m0 + m1*2 + m2*4 + m3*8 + m4*16... . Because Nim-summation is the same as the binary XOR-function, the + may then be replaced by N+ in both sums:
n = Nim-sum_i 2^a(i) and m = Nim-sum_j 2^b(j) with two integer sequences a(i) and b(j).
Because N+ and N* are the operations in a field, N+ and N* are distributive, which is used to write the product over the sums as a double-Nim-sum over Nim-products:
n N* m = Nim-sum_{i,j} 2^a(i) N* 2^b(j) .
What remains is to compute the Nim-products of powers of 2.
Splitting a(i) and b(j) separately into (ordinary) products of Fermat numbers A001146 (i.e., writing a(i) and b(j) in binary), and noting that the ordinary product of distinct Fermat numbers equals the Nim-product of distinct Fermat numbers,
2^a(i) N* 2^b(j) = 2^(2^A0) N* 2^(2^A1) N* ... N* 2^(2^B0) N* 2^(2^B1) N* ... for two binary integer sequences A and B.
This finite product is regrouped by pairing the cases for the same bit in the A-sequence and in the B-sequence. If the bit is set in both sequences, use that the Nim-square of a Fermat number is 3/2 times (ordinary multiple of) that Fermat number; if the bit is set only in one of the two sequences, use (again) that the Nim-product of distinct Fermat numbers is the ordinary product.
Due to the potential presence of the Nim-squares, this leaves in general a Nim-product which is treated by recursion.
This algorithm is implemented in the Maple program in the b-file. nimprodP2() calculates the Nim-product of two powers of 2. (End)

Examples

			The table begins:
  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  3  1  8 10 11  9 12 14 15 13  4  6  7  5 ...
  0  3  1  2 12 15 13 14  4  7  5  6  8 11  9 10 ...
  0  4  8 12  6  2 14 10 11 15  3  7 13  9  5  1 ...
  0  5 10 15  2  7  8 13  3  6  9 12  1  4 11 14 ...
  (...)
		

References

  • J. H. Conway, On Numbers and Games, Academic Press, p. 52.

Crossrefs

Programs

  • Maple
    We continue from A003987: to compute a Nim-multiplication table using (a) an addition table AT := array(0..NA, 0..NA) and (b) a nimsum procedure for larger values; MT := array(0..N,0..N); for a from 0 to N do MT[a,0] := 0; MT[0,a] := 0; MT[a,1] := a; MT[1,a] := a; od: for a from 2 to N do for b from a to N do t1 := {}; for i from 0 to a-1 do for j from 0 to b-1 do u1 := MT[i,b]; u2 := MT[a,j];
    if u1<=NA and u2<=NA then u12 := AT[u1,u2]; else u12 := nimsum(u1,u2); fi; u3 := MT[i,j]; if u12<=NA and u3<=NA then u4 := AT[u12,u3]; else u4 := nimsum(u12,u3); fi; t1 := { op(t1), u4}; #t1 := { op(t1), AT[ AT[ MT[i,b], MT[a,j] ], MT[i,j] ] }; od; od;
    t2 := sort(convert(t1,list)); j := nops(t2); for i from 1 to nops(t2) do if t2[i] <> i-1 then j := i-1; break; fi; od; MT[a,b] := j; MT[b,a] := j; od; od;
  • PARI
    NP_table=Map(); NP(x,y)={ if(x<2 || y<2, x*y, mapisdefined(NP_table, if(y>x, [x,y]=[y,x], [x,y])), mapget(NP_table,[x,y]), x==3, y-1, x==2, 3, my(F=4); until(!F *= F, if(x<2*F, F=if(x>F, bitxor(NP(F,y), NP(x-F,y)), yi, bitxor(NP(t,i), NP(t,y-i)), NP(F\2*3, NP(t/F,i/F))); break(3))); if(y==t, F=NP(F\2*3, NP(t/F,t/F)); break(2))); if(x<2*t, F=bitxor(NP(t,y), NP(x-t,y)); break(2)))); mapput(NP_table,[x,y], F); F)} \\ M. F. Hasler, Jan 18 2021
    A051775(n,m="")={if(m!="", NP(n,m), NP((1+m=sqrtint(8*n+1)\/2)*m/2-n-1, n-m*(m-1)/2))} \\ Then A051775(n) = a(n) [flattened sequence, cf. A025581 & A002262], A051775(n,m) = T(n,m): for example, {matrix(6,15,m,n, A051775(m,n))} - M. F. Hasler, Jan 22 2021
Showing 1-10 of 116 results. Next