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-6 of 6 results.

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

Original entry on oeis.org

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
Offset: 0

Views

Author

Keywords

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
With offset 1, partial sums of A027649. - Paul Barry, Jun 24 2003
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
a(n+1) is the sum of n-th row of A036561. - Reinhard Zumkeller, May 14 2006
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
From Alexander Adamchuk, Jan 04 2007: (Start)
a(n) is prime for n in A057468.
p divides a(p) - 1 for prime p.
Quotients (3^p - 2^p - 1)/p, where p = prime(n), are listed in A127071.
Numbers k such that k divides 3^k - 2^k - 1 are listed in A127072.
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.
Numbers n such that n^2 divides 3^n - 2^n - 1 are listed in A127074.
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 in A097934. 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 in A097934.
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)
a(n) divides a(q*(n+1)-1), for all q integer. Leonardo Sarasua, Apr 15 2024
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
Partial sums give A000392. - Jon Perry, Apr 05 2014
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
From Manfred Boergens, Mar 29 2023: (Start)
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)
a(n) is the number of n-digit numbers whose smallest decimal digit is 7. - Stefano Spezia, Nov 15 2023
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

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 86-87.
  • 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

a(n) = row sums of A091913, row 2 of A047969, column 1 of A090888 and column 1 of A038719.
Cf. partitions: A241766, A241759.
A diagonal of A262307.

Programs

  • Haskell
    a001047 n = a001047_list !! n
    a001047_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (0, 1)
    -- Reinhard Zumkeller, Jun 09 2013
  • Magma
    [3^n - 2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    seq(3^n - 2^n, n=0..40); # Giorgio Balzarotti, Nov 18 2006
    A001047:=1/(3*z-1)/(2*z-1); # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • 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 *)
  • PARI
    {a(n) = 3^n - 2^n};
    
  • Python
    [3**n - 2**n for n in range(25)] # Ross La Haye, Aug 19 2005; corrected by David Radcliffe, Jun 26 2016
    
  • Sage
    [lucas_number1(n, 5, 6) for n in range(26)]  # Zerinvary Lajos, Apr 22 2009
    

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) = A083323(n)-1 = A056182(n)/2 = (A002783(n)-1)/2 = (A003063(n+2)-A003063(n+1))/2. - Ralf Stephan, Jan 12 2004
Binomial transform of A000225. - Ross La Haye, Feb 07 2005
a(n) = Sum_{k=0..n-1} binomial(n, k)*2^k. - Ross La Haye, Aug 20 2005
a(n) = 2^(2n) - A083324(n). - Ross La Haye, Sep 10 2005
a(n) = A112626(n, 1). - Ross La Haye, Jan 11 2006
E.g.f.: exp(3*x) - exp(2*x). - Mohammad K. Azarian, Jan 14 2009
a(n) = A217764(n,1). - Ross La Haye, Mar 27 2013
a(n) = 2*a(n-1) + 3^(n-1). - Toby Gottfried, Mar 28 2013
a(n) = A000244(n) - A000079(n). - Omar E. Pol, Mar 28 2013
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) = A227048(n,A098294(n)). - Reinhard Zumkeller, Jun 30 2013
a(n+1) = Sum_{k=0..n} 2^k*3^(n-k). - J. M. Bergot, Mar 27 2018
Sum_{n>=1} 1/a(n) = A329064. - Amiram Eldar, Nov 20 2020
a(n) = (1/2)*Sum_{k=0..n} binomial(n, k)*(2^(n-k) + 2^k - 2).
a(n) = A001117(n) + 2*A000918(n) + 1. - Ambrosio Valencia-Romero, Mar 08 2022
a(n) = A000225(n) + A028243(n+1). - Ambrosio Valencia-Romero, Mar 09 2022
From Peter Bala, Jun 27 2025: (Start)
exp(Sum_{n >=1} a(2*n)/a(n)*x^n/n) = Sum_{n >= 0} a(n+1)*x^n.
exp(Sum_{n >=1} a(3*n)/a(n)*x^n/n) = 1 + 19*x + 247*x^2 + ... is the g.f. of A019443.
exp(Sum_{n >=1} a(4*n)/a(n)*x^n/n) = 1 + 65*x + 2743*x^2 + ... is the g.f. of A383754.
The following are all examples of telescoping series:
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);
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));
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)).
Sum_{n >= 1} 6^n/(a(n)*a(n+2)) = 14/25; Sum_{n >= 1} (-6)^n/(a(n)*a(n+2)) = -6/25.
Sum_{n >= 1} 6^n/(a(n)*a(n+3)) = 306/1805.
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)

Extensions

Edited by Charles R Greathouse IV, Mar 24 2010

A090888 Matrix defined by a(n,k) = 3^n*Fibonacci(k) - 2^n*Fibonacci(k-2), read by antidiagonals.

Original entry on oeis.org

1, 2, 0, 4, 1, 1, 8, 5, 3, 1, 16, 19, 9, 4, 2, 32, 65, 27, 14, 7, 3, 64, 211, 81, 46, 23, 11, 5, 128, 665, 243, 146, 73, 37, 18, 8, 256, 2059, 729, 454, 227, 119, 60, 29, 13, 512, 6305, 2187, 1394, 697, 373, 192, 97, 47, 21, 1024, 19171, 6561, 4246, 2123, 1151, 600, 311
Offset: 0

Views

Author

Ross La Haye, Feb 12 2004; revised Sep 24 2004, Sep 10 2005

Keywords

Comments

a(0,k) = A000045(k-1); a(1,k) = A000032(k); a(2,k) = A000285(k+1).
a(n,1) = a(n-1,1) + a(n-1,3) for n > 0; a(n,1) = A001047(n) = 2^(2n) - A083324(n); a(n,2) = A000244(n) = 2^(2n) - A005061(n); a(n,3) = 2a(n-1,4) for n > 0; a(n,3) = A027649(n); a(n,4) = A083313(n+1); a(n,5) = A084171(n+1).
Sum[a(n-k,k), {k,0,n}] = A098703(n+1), antidiagonal sums.
Let R, S and T be binary relations on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xRy if x is a subset of y or y is a subset of x, xSy if x is a subset of y and xTy if x is a proper subset of y. Then a(n,3) = |R|, a(n,2) = |S| and a(n,1) = |T|. Note that a binary relation W on P(A) can be defined also such that for every element x, y of P(A) xWy if x is a proper subset of y and there are no z in P(A) such that x is a proper subset of z and z is a proper subset of y. A090802(n,1) = |W|. Also, a(n,0) = |P(A)|.

Examples

			   1    0    1    1    2    3    5    8    13    21    34
   2    1    3    4    7   11   18   29    47    76   123
   4    5    9   14   23   37   60   97   157   254   411
   8   19   27   46   73  119  192  311   503   814  1317
  16   65   81  146  227  373  600  973  1573  2546  4119
  32  211  243  454  697 1151 1848 2999  4847  7846 12693
  64  665  729 1394 2123 3517 5640 9157 14797 23954 38751
a(5,3) = 454 because Fibonacci(3) = 2, Fibonacci(1) = 1 and (2 * 3^5) - (1 * 2^5) = 454.
		

Programs

  • Mathematica
    Table[3^(n - k) Fibonacci@ k - 2^(n - k) Fibonacci[k - 2], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Nov 28 2015 *)

Formula

a(n, k) = 3^n*Fibonacci(k) - 2^n*Fibonacci(k-2).
a(n, 0) = 2^n, a(n, 1) = 3^n - 2^n, a(n, k) = a(n, k-1) + a(n, k-2) for k > 1.
a(0, k) = Fibonacci(k-1), a(1, k) = Lucas(k), a(n, k) = 5a(n-1, k) - 6a(n-2, k) for n > 1.
O.g.f. (by rows) = (-2^n + (2^(n+1) - 3^n)x)/(-1+x+x^2). - Ross La Haye, Mar 30 2006
a(n,1) - a(n,0) = A003063(n+1). - Ross La Haye, Jun 22 2007
Binomial transform (by columns) of A118654. - Ross La Haye, Jun 22 2007

Extensions

More terms from Ray Chandler, Oct 27 2004

A053154 Number of 2-element intersecting families (with not necessarily distinct sets) of an n-element set.

Original entry on oeis.org

0, 1, 5, 22, 95, 406, 1715, 7162, 29615, 121486, 495275, 2009602, 8124935, 32761366, 131834435, 529712842, 2125993055, 8525430046, 34166159195, 136858084882, 548012945975, 2193794127526, 8780404589555, 35137304693722
Offset: 0

Views

Author

Vladeta Jovovic, Goran Kilibarda, Feb 28 2000

Keywords

Comments

Let P(A) be the power set of an n-element set A. Then a(n) = the number of pairs of elements {x,y} of P(A) for which either 0) x and y are disjoint and for which either x is a subset of y or y is a subset of x, or 1) x and y are intersecting but for which x is not a subset of y and y is not a subset of x, or 2) x and y are intersecting and for which either x is a proper subset of y or y is a proper subset of x. - Ross La Haye, Jan 11 2008

Crossrefs

Programs

  • Magma
    [(4^n-3^n+2^n-1)/2: n in [0..30]]; // Vincenzo Librandi, Oct 06 2017
  • Mathematica
    Table[(4^n-3^n+2^n-1)/2, {n,1,30}] (* Clark Kimberling, Mar 12 2012 *)
    CoefficientList[Series[x (1 - 5 x + 7 x^2) / ((1 - x) (1 - 4 x) (1 - 3 x) (1 - 2 x)), {x, 0, 33}], x] (* Vincenzo Librandi, Oct 06 2017 *)
  • PARI
    a(n) = (4^n-3^n+2^n-1)/2; \\ Michel Marcus, Nov 30 2015
    

Formula

a(n) = (A083324(n) - 1)/2.
a(n) = (4^n - 3^n + 2^n - 1)/2.
a(n) = 3*StirlingS2(n+1,4) + 2*StirlingS2(n+1,3) + StirlingS2(n+1,2). - Ross La Haye, Jan 11 2008
From Wolfdieter Lang, Oct 28 2011 (Start)
E.g.f.: Sum_{j=1..4} ((-1)^j*exp(j*x))/2 = exp(x)*(exp(4*x)-1)/(exp(x)+1)/2.
O.g.f.: Sum_{j=1..4} (((-1)^j)/(1-j*x))/2 = x*(1-5*x+7*x^2)/product(1-j*x,j=1..4). See A196847.
(End)
G.f.: x*(1-5*x+7*x^2)/((1-x)*(1-4*x)*(1-3*x)*(1-2*x)). - Vincenzo Librandi, Oct 06 2017

A083325 a(n) = 5^n - 4^n + 3^n.

Original entry on oeis.org

1, 4, 18, 88, 450, 2344, 12258, 63928, 331650, 1710664, 8776098, 44810968, 227894850, 1155188584, 5839863138, 29458185208, 148335970050, 745888724104, 3746365209378, 18799770682648, 94271406797250, 472449572045224, 2366624986030818, 11850654354079288
Offset: 0

Views

Author

Paul Barry, Apr 27 2003

Keywords

Comments

Binomial transform of A083324.

Examples

			a(2) = 5^2 - 4^2 + 3^2 =  25 - 16 +  9 = 18.
a(3) = 5^3 - 4^3 + 3^3 = 125 - 64 + 27 = 88.
		

Programs

Formula

a(n) = 5^n - 4^n + 3^n.
G.f.: (1 - 8*x + 17*x^2)/((1 - 3*x)(1 - 4*x)(1 - 5*x)).
E.g.f.: exp(5x) - exp(4x) + exp(3x).

A137786 a(n) = 4^n - 3^n - 2^n.

Original entry on oeis.org

-1, -1, 3, 29, 159, 749, 3303, 14069, 58719, 241949, 988503, 4015109, 16241679, 65506349, 263636103, 1059360149, 4251855039, 17050597949, 68331794103, 273715121189, 1096023794799, 4387584060749, 17560800790503, 70274592610229, 281192530396959, 1125052584678749
Offset: 0

Views

Author

Keywords

Comments

a(n) mod 100 = 49 for n = 4*k + 1, k > 0; a(n) mod 100 = 3 for n = 4*k + 2, k >= 0. [Alex Ratushnyak, Jul 03 2012]

Crossrefs

Programs

  • Magma
    I:=[-1,-1,3]; [n le 3 select I[n] else 9*Self(n-1)-26*Self(n-2)+24*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Feb 12 2014
  • Maple
    A137786:=n->4^n - 3^n - 2^n; seq(A137786(n), n=0..25); # Wesley Ivan Hurt, Feb 10 2014
  • Mathematica
    Table[4^n - 3^n - 2^n, {n, 0, 25}] (* Bruno Berselli, Jul 04 2012 *)
    LinearRecurrence[{9,-26,24},{-1,-1,3},30] (* Harvey P. Dale, Sep 19 2012 *)
    CoefficientList[Series[-(1 - 8 x + 14 x^2)/((1 - 2 x) (1 - 3 x) (1 - 4 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 12 2014 *)
  • PARI
    a(n) = 4^n-3^n-2^n; \\ Joerg Arndt, Jul 04 2012
    
  • Python
    print([4**n - 3**n - 2**n for n in range(99)])
    # Alex Ratushnyak, Jul 03 2012
    

Formula

G.f.: -(1-8*x+14*x^2)/((1-2*x)*(1-3*x)*(1-4*x)). - Bruno Berselli, Jul 04 2012
a(0)=-1, a(1)=-1, a(2)=3, a(n) = 9*a(n-1) - 26*a(n-2) + 24*a(n-3). - Harvey P. Dale, Sep 19 2012
E.g.f.: exp(2*x)*(exp(2*x) - exp(x) - 1). - Elmo R. Oliveira, Sep 12 2024

Extensions

Offset set to 0, terms corrected, more terms added by Alex Ratushnyak, Jul 03 2012.

A317887 Numbers k such that 4^k - 3^k + 2^k is prime.

Original entry on oeis.org

1, 2, 4, 18, 56, 60, 88, 1288, 1784, 3406, 9250, 11968, 36216, 57206, 89148, 107514, 155410, 202906
Offset: 1

Views

Author

Jinyuan Wang, Aug 09 2018

Keywords

Comments

1 is the only odd number in this sequence.
a(15) > 65432.
a(16) > 10^5. - Michael S. Branicky, Nov 21 2024

Examples

			2 is in the sequence since 4^2 - 3^2 + 2^2 = 16 - 9 + 4 = 11 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 5000], PrimeQ[4^# - 3^# + 2^#] &]
  • PARI
    for(n=1, 5000, if(ispseudoprime(4^n-3^n+2^n), print1(n, ", ")))

Extensions

a(13)-a(14) from Giovanni Resta, Aug 10 2018
a(15) from Michael S. Branicky, Nov 21 2024
a(16) from Georg Grasegger, Apr 07 2025
a(17)-a(18) from Georg Grasegger, May 06 2025
Showing 1-6 of 6 results.