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.

A001047 a(n) = 3^n - 2^n.

This page as a plain text file.
%I A001047 M3887 N1596 #337 Jul 03 2025 01:10:21
%S A001047 0,1,5,19,65,211,665,2059,6305,19171,58025,175099,527345,1586131,
%T A001047 4766585,14316139,42981185,129009091,387158345,1161737179,3485735825,
%U A001047 10458256051,31376865305,94134790219,282412759265,847255055011,2541798719465,7625463267259,22876524019505
%N A001047 a(n) = 3^n - 2^n.
%C A001047 a(n+1) is the sum of the elements in the n-th row of triangle pertaining to A036561. - _Amarnath Murthy_, Jan 02 2002
%C A001047 Number of 2 X n binary arrays with a path of adjacent 1's and no path of adjacent 0's from top row to bottom row. - _R. H. Hardin_, Mar 21 2002
%C A001047 With offset 1, partial sums of A027649. - _Paul Barry_, Jun 24 2003
%C A001047 Number of distinct lines through the origin in the n-dimensional lattice of side length 2. A049691 has the values for the 2-dimensional lattice of side length n. - _Joshua Zucker_, Nov 19 2003
%C A001047 a(n+1)/(n+1)=(3*3^n-2*2^n)/(n+1) is the second binomial transform of the harmonic sequence 1/(n+1). - _Paul Barry_, Apr 19 2005
%C A001047 a(n+1) is the sum of n-th row of A036561. - _Reinhard Zumkeller_, May 14 2006
%C A001047 The sequence gives the sum of the lengths of the segments in Cantor's dust generating sequence up to the i-th step. Measurement unit = length of the segment of i-th step. - _Giorgio Balzarotti_, Nov 18 2006
%C A001047 Let T be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xTy if x is a proper subset of y. Then a(n) = |T|. - _Ross La Haye_, Dec 22 2006
%C A001047 From _Alexander Adamchuk_, Jan 04 2007: (Start)
%C A001047 a(n) is prime for n in A057468.
%C A001047 p divides a(p) - 1 for prime p.
%C A001047 Quotients (3^p - 2^p - 1)/p, where p = prime(n), are listed in A127071.
%C A001047 Numbers k such that k divides 3^k - 2^k - 1 are listed in A127072.
%C A001047 Pseudoprimes in A127072(n) include all powers of primes {2,3,7} and some composite numbers that are listed in A127073, which includes all Carmichael numbers A002997.
%C A001047 Numbers n such that n^2 divides 3^n - 2^n - 1 are listed in A127074.
%C A001047 5 divides a(2n).
%C A001047 5^2 divides a(2*5n).
%C A001047 5^3 divides a(2*5^2n).
%C A001047 5^4 divides a(2*5^3n).
%C A001047 7^2 divides a(6*7n).
%C A001047 13 divides a(4n).
%C A001047 13^2 divides a(4*13n).
%C A001047 19 divides a(3n).
%C A001047 19^2 divides a(3*19n).
%C A001047 23^2 divides a(11n).
%C A001047 23^3 divides a(11*23n).
%C A001047 23^4 divides a(11*23^2n).
%C A001047 29 divides a(7n).
%C A001047 p divides a((p-1)n) for prime p>3.
%C A001047 p divides a((p-1)/2) for prime p in A097934. Also primes p such that 6 is a square mod p, except {2,3}, A038876(n).
%C A001047 p^(k+1) divides a(p^k*(p-1)/2*n) for prime p in A097934.
%C A001047 p^(k+1) divides a(p^k*(p-1)*n) for prime p>3.
%C A001047 Note the exception that for p = 23, p^(k+2) divides a(p^k*(p-1)/2*n).
%C A001047 There are no more such exceptions for primes p up to 600000. (End)
%C A001047 a(n) divides a(q*(n+1)-1), for all q integer. _Leonardo Sarasua_, Apr 15 2024
%C A001047 Final digits of terms follow sequence 1,5,9,5. - _Enoch Haga_, Nov 26 2007
%C A001047 This is also the second column sequence of the Sheffer triangle A143494 (2-restricted Stirling2 numbers). See the e.g.f. given below. - _Wolfdieter Lang_, Oct 08 2011
%C A001047 Partial sums give A000392. - _Jon Perry_, Apr 05 2014
%C A001047 For n >= 1, this is also row 2 of A281890: when consecutive positive integers are written as a product of primes in nondecreasing order, "3" occurs in n-th position a(n) times out of every 6^n. - _Peter Munn_, May 17 2017
%C A001047 a(n) is the number of ternary sequences of length n which include the digit 2. For example, a(2)=5 since the sequences are 02,20,12,21,22. - _Enrique Navarrete_, Apr 05 2021
%C A001047 a(n-1) is the number of ways we can form disjoint unions of two nonempty subsets of [n] such that the union contains n. For example, for n = 3, a(2) = 5 since the  disjoint unions are {1}U{3}, {1}U{2,3}, {2}U{3}, {2}U{1,3}, and {1,2}U{3}. Cf. A000392 if we drop the requirement that the union contains n. - _Enrique Navarrete_, Aug 24 2021
%C A001047 Configures as a composite Koch Snowflake Fractal (see illustration in links) based on the five-fold division of the Cantor Square/Cantor Dust Fractal of (9^n-4^n)/5 see my illustration in (A016153). - _John Elias_, Oct 13 2021
%C A001047 Number of pairs (A,B) where B is a subset of {1,2,...,n} and A is a proper subset of B. - _Jianing Song_, Jun 18 2022
%C A001047 From _Manfred Boergens_, Mar 29 2023: (Start)
%C A001047 With regard to the comments by _Ross La Haye_ and _Jianing Song_: Omitting "proper" gives A000244.
%C A001047 Number of pairs (A,B) where B is a nonempty subset of {1,2,...,n} and A is a nonempty subset of B. For nonempty proper subsets see a(n+1) in A028243. (End)
%C A001047 a(n) is the number of n-digit numbers whose smallest decimal digit is 7. - _Stefano Spezia_, Nov 15 2023
%C A001047 a(n-1) is the number of all possible player-reduced binary games observed by each player in an nx2 game assuming the individual strategies of k < n - 1 players are fixed and the remaining n - k - 1 player will play as one, either maintaining their status quo strategies or jointly adopting an alternative strategy. - _Ambrosio Valencia-Romero_, Apr 11 2024
%D A001047 John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 86-87.
%D A001047 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A001047 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A001047 T. D. Noe, <a href="/A001047/b001047.txt">Table of n, a(n) for n=0..200</a>
%H A001047 A. Abdurrahman, <a href="https://arxiv.org/abs/1909.10889">CM Method and Expansion of Numbers</a>, arXiv:1909.10889 [math.NT], 2019.
%H A001047 Nathan Bliss, Ben Fulan, Stephen Lovett and Jeff Sommars, <a href="http://www.jstor.org/stable/10.4169/amer.math.monthly.120.06.519">Strong divisibility, cyclotomic polynomials and iterated polynomials</a>, Am. Math. Monthly, Vol. 120, No. 6 (2013), pp. 519-536.
%H A001047 John Elias, <a href="/A001047/a001047.png">Illustration: Sierpinski half-hexagons</a>, <a href="/A001047/a001047_1.png">Illustration: Nicomachus triangle 2^n & 3^n correlation</a>, <a href="/A001047/a001047_2.png">Koch Snowflake Fractal Configuration</a>.
%H A001047 Joël Gay, <a href="https://tel.archives-ouvertes.fr/tel-01861199">Representation of Monoids and Lattice Structures in the Combinatorics of Weyl Groups</a>, Doctoral Thesis, Discrete Mathematics [cs.DM], Université Paris-Saclay, 2018.
%H A001047 Samuele Giraudo, <a href="http://doi.org/10.1007/s10801-014-0543-4">Combinatorial operads from monoids</a>, Journal of Algebraic Combinatorics, Vol. 41, No. 2 (2015), pp. 493-538; <a href="http://arxiv.org/abs/1306.6938">arXiv preprint</a>, arXiv preprint arXiv:1306.6938 [math.CO], 2013-2015.
%H A001047 Samuele Giraudo, <a href="https://doi.org/10.1016/j.aam.2016.02.003">Pluriassociative algebras I: The pluriassociative operad</a>, Advances in Applied Mathematics, Vol. 77 (2016), pp. 1-42; <a href="https://arxiv.org/abs/1603.01040">arXiv preprint</a>, arXiv:1603.01040 [math.CO], 2016.
%H A001047 Richard K. Guy, <a href="/A002186/a002186.pdf">Letters to N. J. A. Sloane, June-August 1968</a>
%H A001047 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=397">Encyclopedia of Combinatorial Structures 397</a>.
%H A001047 B. D. Josephson and J. M. Boardman, <a href="https://archive.org/details/eureka-24/page/19/mode/2up">Problems Drive 1961</a>, Eureka, The Journal of the Archimedeans, Vol. 24 (1961), p. 20; <a href="https://www.archim.org.uk/eureka/archive/Eureka-24.pdf">entire volume</a>.
%H A001047 Germain Kreweras, <a href="http://gallica.bnf.fr/ark:/12148/bpt6k480296q/f583.image">Inversion des polynômes de Bell bidimensionnels et application au dénombrement des relations binaires connexes</a>, C. R. Acad. Sci. Paris Ser. A-B, Vol. 268 (1969), pp. A577-A579.
%H A001047 Ross La Haye, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL12/LaHaye/lahaye5.html">Binary Relations on the Power Set of an n-Element Set</a>, Journal of Integer Sequences, Vol. 12 (2009), Article 09.2.6.
%H A001047 Richard Miles, <a href="https://doi.org/10.1090/S0002-9947-2013-05829-1">Synchronization points and associated dynamical invariants</a>, Trans. Amer. Math. Soc., Vol. 365, No. 10 (2013), pp. 5503-5524.
%H A001047 Rajesh Kumar Mohapatra and Tzung-Pei Hong, <a href="https://doi.org/10.3390/math10071161">On the Number of Finite Fuzzy Subsets with Analysis of Integer Sequences</a>, Mathematics (2022) Vol. 10, No. 7, 1161.
%H A001047 Jon Perry, <a href="https://web.archive.org/web/20060923015735/http://www.users.globalnet.co.uk/~perry/maths/collatz/collatz.htm">Relation to Collatz problem</a>.
%H A001047 Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H A001047 Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992.
%H A001047 Kalika Prasad, Munesh Kumari, Rabiranjan Mohanta, and Hrishikesh Mahato, <a href="https://arxiv.org/abs/2307.08073">The sequence of higher order Mersenne numbers and associated binomial transforms</a>, arXiv:2307.08073 [math.NT], 2023.
%H A001047 D. C. Santos, E. A. Costa, and P. M. M. C. Catarino, <a href="https://doi.org/10.3390/axioms14030203">On Gersenne Sequence: A Study of One Family in the Horadam-Type Sequence</a>, Axioms 14, 203, (2025). See p. 4.
%H A001047 Ambrosio Valencia-Romero and P. T. Grogan, <a href="https://doi.org/10.1371/journal.pone.0301394">The strategy dynamics of collective systems: Underlying hindrances beyond two-actor coordination</a>, PLOS ONE 19(4): e0301394 (<a href="https://doi.org/10.1371/journal.pone.0301394.s001">S1 Appendix</a>).
%H A001047 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (5,-6).
%F A001047 G.f.: x/((1-2*x)*(1-3*x)).
%F A001047 a(n) = 5*a(n-1) - 6*a(n-2).
%F A001047 a(n) = 3*a(n-1) + 2^(n-1). - _Jon Perry_, Aug 23 2002
%F A001047 Starting 0, 0, 1, 5, 19, ... this is 3^n/3 - 2^n/2 + 0^n/6, the binomial transform of A086218. - _Paul Barry_, Aug 18 2003
%F A001047 a(n) = A083323(n)-1 = A056182(n)/2 = (A002783(n)-1)/2 = (A003063(n+2)-A003063(n+1))/2. - _Ralf Stephan_, Jan 12 2004
%F A001047 Binomial transform of A000225. - _Ross La Haye_, Feb 07 2005
%F A001047 a(n) = Sum_{k=0..n-1} binomial(n, k)*2^k. - _Ross La Haye_, Aug 20 2005
%F A001047 a(n) = 2^(2n) - A083324(n). - _Ross La Haye_, Sep 10 2005
%F A001047 a(n) = A112626(n, 1). - _Ross La Haye_, Jan 11 2006
%F A001047 E.g.f.: exp(3*x) - exp(2*x). - _Mohammad K. Azarian_, Jan 14 2009
%F A001047 a(n) = A217764(n,1). - _Ross La Haye_, Mar 27 2013
%F A001047 a(n) = 2*a(n-1) + 3^(n-1). - _Toby Gottfried_, Mar 28 2013
%F A001047 a(n) = A000244(n) - A000079(n). - _Omar E. Pol_, Mar 28 2013
%F A001047 a(n) = Sum_{k=0..2} Stirling1(2,k)*(k+1)^n = c_2^{(-n)}, poly-Cauchy numbers. - _Takao Komatsu_, Mar 28 2013
%F A001047 a(n) = A227048(n,A098294(n)). - _Reinhard Zumkeller_, Jun 30 2013
%F A001047 a(n+1) = Sum_{k=0..n} 2^k*3^(n-k). - _J. M. Bergot_, Mar 27 2018
%F A001047 Sum_{n>=1} 1/a(n) = A329064. - _Amiram Eldar_, Nov 20 2020
%F A001047 a(n) = (1/2)*Sum_{k=0..n} binomial(n, k)*(2^(n-k) + 2^k - 2).
%F A001047 a(n) = A001117(n) + 2*A000918(n) + 1. - _Ambrosio Valencia-Romero_, Mar 08 2022
%F A001047 a(n) = A000225(n) + A028243(n+1). - _Ambrosio Valencia-Romero_, Mar 09 2022
%F A001047 From _Peter Bala_, Jun 27 2025: (Start)
%F A001047 exp(Sum_{n >=1} a(2*n)/a(n)*x^n/n) = Sum_{n >= 0} a(n+1)*x^n.
%F A001047 exp(Sum_{n >=1} a(3*n)/a(n)*x^n/n) = 1 + 19*x + 247*x^2 + ... is the g.f. of A019443.
%F A001047 exp(Sum_{n >=1} a(4*n)/a(n)*x^n/n) = 1 + 65*x + 2743*x^2 + ... is the g.f. of A383754.
%F A001047 The following are all examples of telescoping series:
%F A001047 Sum_{n >= 1} 6^n/(a(n)*a(n+1)) = 2, since 6^n/(a(n)*a(n+1)) = b(n) - b(n+1), where b(n) = 2^n/a(n);
%F A001047 Sum_{n >= 1} 18^n/(a(n)*a(n+1)*a(n+2)) = 22/75, since 18^n/(a(n)*a(n+1)*a(n+2)) = c(n) - c(n+1), where c(n) = (5*6^n - 2*4^n)/(15*a(n)*a(n+1));
%F A001047 Sum_{n >= 1} 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = 634/48735 since 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = d(n) - d(n+1), where d(n) = (57*18^n - 38*12^n + 8*8^n)/(513*a(n)*a(n+1)*a(n+2)).
%F A001047 Sum_{n >= 1} 6^n/(a(n)*a(n+2)) = 14/25; Sum_{n >= 1} (-6)^n/(a(n)*a(n+2)) = -6/25.
%F A001047 Sum_{n >= 1} 6^n/(a(n)*a(n+3)) = 306/1805.
%F A001047 Sum_{n >= 1} 6^n/(a(n)*a(n+4)) = 4282/80275; Sum_{n >= 1} (-6)^n/(a(n)*a(n+4)) = -1698/80275. (End)
%p A001047 seq(3^n - 2^n, n=0..40); # _Giorgio Balzarotti_, Nov 18 2006
%p A001047 A001047:=1/(3*z-1)/(2*z-1); # _Simon Plouffe_ in his 1992 dissertation, dropping the initial zero
%t A001047 Table[ 3^n - 2^n, {n, 0, 25} ]
%t A001047 LinearRecurrence[{5, -6}, {0, 1}, 25] (* _Harvey P. Dale_, Aug 18 2011 *)
%t A001047 Numerator@NestList[(3#+1)/2&,1/2,100] (* _Zak Seidov_, Oct 03 2011 *)
%o A001047 (Python) [3**n - 2**n for n in range(25)] # _Ross La Haye_, Aug 19 2005; corrected by _David Radcliffe_, Jun 26 2016
%o A001047 (Sage) [lucas_number1(n, 5, 6) for n in range(26)]  # _Zerinvary Lajos_, Apr 22 2009
%o A001047 (PARI) {a(n) = 3^n - 2^n};
%o A001047 (Magma) [3^n - 2^n: n in [0..30]]; // _Vincenzo Librandi_, Jul 17 2011
%o A001047 (Haskell)
%o A001047 a001047 n = a001047_list !! n
%o A001047 a001047_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (0, 1)
%o A001047 -- _Reinhard Zumkeller_, Jun 09 2013
%Y A001047 Cf. A000225, A016189, A036561, A097934, A038876, A127071, A127072, A127073, A127074, A002997, A057468, A109235, A281890, A329064, A350771.
%Y A001047 a(n) = row sums of A091913, row 2 of A047969, column 1 of A090888 and column 1 of A038719.
%Y A001047 Cf. A000392, A240400, A000244, A028243.
%Y A001047 Cf. partitions: A241766, A241759.
%Y A001047 A diagonal of A262307.
%K A001047 nonn,easy,nice
%O A001047 0,3
%A A001047 _N. J. A. Sloane_, _R. K. Guy_
%E A001047 Edited by _Charles R Greathouse IV_, Mar 24 2010