|
|
A001047
|
|
a(n) = 3^n - 2^n.
(Formerly M3887 N1596)
|
|
148
|
|
|
0, 1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58025, 175099, 527345, 1586131, 4766585, 14316139, 42981185, 129009091, 387158345, 1161737179, 3485735825, 10458256051, 31376865305, 94134790219, 282412759265, 847255055011, 2541798719465, 7625463267259, 22876524019505
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
a(n+1) is the sum of the elements in the n-th row of triangle pertaining to A036561. - Amarnath Murthy, Jan 02 2002
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
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
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
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
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
a(n) is prime for n = {2,3,5,17,29,31,53,59,101,277,647,1061,2381,...} = A057468(n) Numbers n such that 3^n - 2^n is prime.
p divides a(p) - 1 for prime p.
Quotients (3^p - 2^p - 1)/p, where p = prime(n), are listed in A127071 = {2,6,42,294,15918,122010,7588770,61144062,...}.
Numbers n such that n divides 3^n - 2^n - 1 are listed in A127072 = {1,2, 3,4, 5,7,8,9, 11,13,16,17,19,23,27,29,31,32,37, 41,43,45,47,49, 53,59, 61,64,67, 71,73,79,81,83, 89,97,...}.
Pseudoprimes in A127072(n) include all powers of primes {2,3,7} and some composite numbers that are listed in A127073(n) = {45,245,405,561,637,639,833,891,...}, which includes all Carmichael numbers A002997(n) = {561,1105,1729,2465,2821,6601,8911,10585,15841,29341,...}.
Numbers n such that n^2 divides 3^n - 2^n - 1 are listed in A127074(n) = {1,2,3,4,7,49,179,619,17807,...}.
5 divides a(2n).
5^2 divides a(2*5n).
5^3 divides a(2*5^2n).
5^4 divides a(2*5^3n).
7^2 divides a(6*7n).
13 divides a(4n).
13^2 divides a(4*13n).
19 divides a(3n).
19^2 divides a(3*19n).
23^2 divides a(11n).
23^3 divides a(11*23n).
23^4 divides a(11*23^2n).
29 divides a(7n).
p divides a((p-1)n) for prime p>3.
p divides a((p-1)/2)) for prime p = {5,19,23,29,43,47,53,...} = A097936(n) Primes p such that p divides 3^((p-1)/2) - 2^((p-1)/2). Also primes p such that 6 is a square mod p, except {2,3}, A038876(n).
p^(k+1) divides a(p^k*(p-1)/2*n) for prime p = {5,19,23,29,43,47,53,...} = A097936(n).
p^(k+1) divides a(p^k*(p-1)*n) for prime p>3.
Note the exception that for p = 23, p^(k+2) divides a(p^k*(p-1)/2*n).
There are no more such exceptions for primes p up to 600000. (End)
Final digits of terms follow sequence 1,5,9,5. - Enoch Haga, Nov 26 2007
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
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
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
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
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
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
With regard to the comments by Ross La Haye and Jianing Song: Omitting "proper" gives A000244.
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)
|
|
REFERENCES
|
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).
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x/((1-2*x)*(1-3*x)).
a(n) = 5*a(n-1) - 6*a(n-2).
a(n) = 3*a(n-1) + 2^(n-1). - Jon Perry, Aug 23 2002
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
a(n) = Sum_{k=0..n-1} binomial(n, k)*2^k. - Ross La Haye, Aug 20 2005
a(n) = Sum_{k=0..2} Stirling1(2,k)*(k+1)^n = c_2^{(-n)}, poly-Cauchy numbers. - Takao Komatsu, Mar 28 2013
a(n+1) = Sum_{k=0..n} 2^k*3^(n-k). - J. M. Bergot, Mar 27 2018
a(n) = (1/2)*Sum_{k=0..n} binomial(n, k)*(2^(n-k) + 2^k - 2).
|
|
MAPLE
|
|
|
MATHEMATICA
|
Table[ 3^n - 2^n, {n, 0, 25} ]
LinearRecurrence[{5, -6}, {0, 1}, 25] (* Harvey P. Dale, Aug 18 2011 *)
Numerator@NestList[(3#+1)/2&, 1/2, 100] (* Zak Seidov, Oct 03 2011 *)
|
|
PROG
|
(Sage) [lucas_number1(n, 5, 6) for n in range(26)] # Zerinvary Lajos, Apr 22 2009
(PARI) {a(n) = 3^n - 2^n};
(Haskell)
a001047 n = a001047_list !! n
a001047_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (0, 1)
|
|
CROSSREFS
|
Cf. A000225, A016189, A036561, A097936, A038876, A127071, A127072, A127073, A127074, A002997, A057468, A109235, A281890, A329064, A350771.
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|