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 10 results.

A003063 a(n) = 3^(n-1) - 2^n.

Original entry on oeis.org

-1, -1, 1, 11, 49, 179, 601, 1931, 6049, 18659, 57001, 173051, 523249, 1577939, 4750201, 14283371, 42915649, 128878019, 386896201, 1161212891, 3484687249, 10456158899, 31372671001, 94126401611, 282395982049, 847221500579, 2541731610601, 7625329049531, 22876255584049
Offset: 1

Views

Author

Henrik Johansson (Henrik.Johansson(AT)Nexus.SE)

Keywords

Comments

Binomial transform of A000918: (-1, 0, 2, 6, 14, 30, ...). - Gary W. Adamson, Mar 23 2012
This sequence demonstrates 2^n as a loose lower bound for g(n) in Waring's problem. Since 3^n > 2(2^n) for all n > 2, the number 2^(n + 1) - 1 requires 2^n n-th powers for its representation since 3^n is not available for use in the sum: the gulf between the relevant powers of 2 and 3 widens considerably as n gets progressively larger. - Alonso del Arte, Feb 01 2013

Examples

			a(3) = 1 because 3^2 - 2^3 = 9 - 8 = 1.
a(4) = 11 because 3^3 - 2^4 = 27 - 16 = 11.
a(5) = 49 because 3^4 - 2^5 = 81 - 32 = 49.
		

Crossrefs

Cf. A000918, A056182 (first differences), A064686, A083313, A214091, A369490.
Cf. A363024 (prime terms).
From the third term onward the first differences of A005173.
Difference between two leftmost columns of A090888.
A diagonal in A254027.
Right edge of irregular triangle A252750.

Programs

Formula

Let b(n) = 2*(3/2)^n - 1. Then a(n) = -b(1-n)*3^(n-1) for n > 0. A083313(n) = A064686(n) = b(n)*2^(n-1) for n > 0. - Michael Somos, Aug 06 2006
From Colin Barker, May 27 2013: (Start)
a(n) = 5*a(n-1) - 6*a(n-2).
G.f.: -x*(1-4*x) / ((1-2*x)*(1-3*x)). (End)
E.g.f.: (1/3)*(2 - 3*exp(2*x) + exp(3*x)). - G. C. Greubel, Nov 03 2022

Extensions

A few more terms from Alonso del Arte, Feb 01 2013

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

A005056 a(n) = 3^n + 2^n - 1.

Original entry on oeis.org

1, 4, 12, 34, 96, 274, 792, 2314, 6816, 20194, 60072, 179194, 535536, 1602514, 4799352, 14381674, 43112256, 129271234, 387682632, 1162785754, 3487832976, 10462450354, 31385253912, 94151567434, 282446313696, 847322163874, 2541932937192, 7625731702714
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of A083313. - Paul Barry, Apr 25 2003
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if either 0) x is a proper subset of y or y is a proper subset of x and x and y are disjoint, 1) x is not a subset of y and y is not a subset of x and x and y are disjoint, or 2) x equals y. Then a(n) = |R|. - Ross La Haye, Mar 19 2009

Crossrefs

Cf. A083313.

Programs

Formula

From Paul Barry, Apr 25 2003: (Start)
G.f.: (1-2x-x^2)/((1-x)(1-2x)(1-3x)).
E.g.f.: exp(3x) + exp(2x) - exp(x). (End)
a(n) = 5*a(n-1) - 6*a(n-2) - 2 for n > 1, a(0)=1, a(1)=4. - Vincenzo Librandi, Dec 31 2010
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) for n > 2, a(0)=1, a(1)=4, a(2)=12. - Rick L. Shepherd, Aug 07 2017
a(n) = A007689(n)-1. - R. J. Mathar, Mar 10 2022

A064686 a(n) = number of n-digit base-3 biquams.

Original entry on oeis.org

0, 2, 7, 23, 73, 227, 697, 2123, 6433, 19427, 58537, 176123, 529393, 1590227, 4774777, 14332523, 43013953, 129074627, 387289417, 1161999323, 3486260113, 10459304627, 31378962457, 94138984523, 282421147873, 847271832227
Offset: 1

Views

Author

David W. Wilson, Oct 10 2001

Keywords

Comments

A biquam or biquanimous number (A064544) is a number whose digits can be split into two groups with equal sum.
This is the same as A083313 (apart from the initial term). Proof: Let sum(w) denote the sum of the digits of w. There are 2*3^(n-1) n-digit base-3 numbers: w = (w_1,w_2,...,w_n) with w_i in {0,1,2} for all i and w_1 != 0. Partition them into 4 classes: (i) sum(w) is odd, (ii) sum(w) is even, w contains no 1's and has an odd number of 2s, (iii) sum(w) is even, w contains no 1's and has an even number of 2s and (iv) sum(w) is even and w contains some 1's. Clearly, no biquams occur in cases (i) and (ii), case (iii) consists entirely of biquams and, we claim, so does case (iv). For case (iv) forces an even number, say 2k, of 1's. An even number of 2s clearly gives a biquam and an odd number 2m+1 of 2s does too because {m 2s, (k+1) 1's} and {(m+1) 2s, (k-1) 1's} is a biquam split. There are 3^(n-1) w's in case (i) and 2^(n-2) w's in case (ii) and hence 2*3^(n-1) - (3^(n-1) + 2^(n-2)) = 3^(n-1) - 2^(n-2) (A083313) biquams among n-digit base-3 numbers. - David Callan, Sep 15 2004
a(n) % 100 = 23 for n = 4*k-1, k>=1; a(n) % 100 = 27 for n = 4*k+1, k>=1. - Alex Ratushnyak, Jul 03 2012
The fraction of biquams for any base approaches 1/2 as the number of digits grows but only if you count leading zeros. Without counting leading zeros, the fraction appears to converge to (b-1)/2b where b is the base used. For base 3 this is 1/3 which fits the data in this sequence (see paper cited below for proofs and the OEIS data collated as fractions). - Timothy Varghese, Aug 08 2021

Crossrefs

Essentially the same as A083313.
Cf. A053152 (partial sums).

Programs

  • Python
    print([0]+[3**n - 2**(n-1) for n in range(1,29)])
    # Alex Ratushnyak, Jul 02 2012

Formula

a(1) = 0, a(n) = 3^(n-1)-2^(n-2) for n>=2. - Alex Ratushnyak, Jul 02 2012
a(n) = 5*a(n-1)-6*a(n-2) for n>3. G.f.: -x^2*(3*x-2) / ((2*x-1)*(3*x-1)). - Colin Barker, May 27 2013

A083314 (2*4^n-(3^n-1))/2.

Original entry on oeis.org

1, 3, 12, 51, 216, 903, 3732, 15291, 62256, 252303, 1019052, 4105731, 16511496, 66311703, 266043972, 1066567371, 4273443936, 17115299103, 68525766492, 274296776211, 1097768235576, 4392816334503, 17576495514612, 70321672588251
Offset: 0

Views

Author

Paul Barry, Apr 24 2003

Keywords

Comments

Binomial transform of A083313

Crossrefs

Cf. A083315.

Programs

  • Mathematica
    Table[(2*4^n-(3^n-1))/2,{n,0,30}] (* or *) LinearRecurrence[{8,-19,12},{1,3,12},30] (* Harvey P. Dale, Sep 29 2016 *)

Formula

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

A134319 Triangle read by rows. T(n, k) = binomial(n, k)*(2^k - 1 + 0^k).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 9, 7, 1, 4, 18, 28, 15, 1, 5, 30, 70, 75, 31, 1, 6, 45, 140, 225, 186, 63, 1, 7, 63, 245, 525, 651, 441, 127, 1, 8, 84, 392, 1050, 1736, 1764, 1016, 255, 1, 9, 108, 588, 1890, 3906, 5292, 4572, 2295, 511, 1, 10, 135, 840, 3150, 7812, 13230, 15240, 11475, 5110, 1023
Offset: 0

Views

Author

Gary W. Adamson, Oct 19 2007

Keywords

Examples

			First few rows of the triangle:
  1;
  1, 1;
  1, 2,  3;
  1, 3,  9,   7;
  1, 4, 18,  28,  15;
  1, 5, 30,  70,  75,  31;
  1, 6, 45, 140, 225, 186,  63;
  1, 7, 63, 245, 525, 651, 441, 127;
  ...
		

Crossrefs

Cf. A083313, A083323 (row sums), A255047 (main diagonal).

Programs

  • Maple
    x:= 'x': T:= (n,k)-> `if` (k=0, 1, abs(coeff(expand((1-1/2^x)^n -(1-2/2^x)^n), 1/(2^x)^k))): seq(seq(T(n,k), k=0..n), n=0..12); # Alois P. Heinz, Dec 10 2008
    # Alternative:
    T := (n, k) -> binomial(n, k)*(2^k - 1 + 0^k):
    for n from 0 to 7 do seq(T(n, k), k=0..n) od;
    # Or as a recursion:
    p := proc(n, m) option remember; if n = 0 then max(1, m) else
        (m + x)*p(n - 1, m) - (m + 1)*p(n - 1, m + 1) fi end:
    Trow := n -> seq((-1)^k * coeff(p(n, 0), x, n - k), k = 0..n):  # Peter Luschny, Jun 23 2023
  • Mathematica
    max = 10; T1 = Table[Binomial[n, k], {n, 0, max}, {k, 0, max}]; T2 = Table[ If[n == k, 2^n-1, 0], {n, 0, max}, {k, 0, max}]; TT = T1.T2 ; T[, 0]=1; T[n, k_] := TT[[n+1, k+1]]; Table[T[n, k], {n, 0, max}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 26 2016 *)

Formula

Previous definition: A007318 * a triangle by rows: for n > 0, n zeros followed by 2^n - 1.
Binomial transform of a diagonalized infinite lower triangular matrix with (1, 1, 3, 7, 15, ...) in the main diagonal and the rest zeros.
T(n,k) = |[1/(2^x)^k] 1 + (1-1/2^x)^n - (1-2/2^x)^n|. - Alois P. Heinz, Dec 10 2008
T(n,k) = binomial(n,k)*M(k) where M is Mersenne-like A255047. - Yuchun Ji, Feb 13 2019

Extensions

More terms from Alois P. Heinz, Dec 10 2008
New name using a formula of Yuchun Ji by Peter Luschny, Jun 23 2023

A254027 Table T(n,k) = 3^n - 2^k read by antidiagonals.

Original entry on oeis.org

0, 2, -1, 8, 1, -3, 26, 7, -1, -7, 80, 25, 5, -5, -15, 242, 79, 23, 1, -13, -31, 728, 241, 77, 19, -7, -29, -63, 2186, 727, 239, 73, 11, -23, -61, -127, 6560, 2185, 725, 235, 65, -5, -55, -125, -255, 19682, 6559, 2183, 721, 227, 49, -37, -119, -253, -511, 59048, 19681, 6557, 2179, 713, 211, 17, -101, -247, -509, -1023
Offset: 0

Views

Author

K. G. Stier, Jan 22 2015

Keywords

Comments

Table shows differences of a given power of 3 to the powers of 2 (columns), and differences of the powers of 3 to a given power of 2 (rows), respectively.
Note that positive terms (table's upper right area) and negative terms (lower left area) are separated by an imaginary line with slope -log(3)/log(2) = -1.5849625.. (see A020857). This "border zone" of the table is of interest in terms of how close powers of 3 and powers of 2 can get: i.e., those T(n,k) where k/n is a good rational approximation to log(3)/log(2), see A254351 for numerators k and respective A060528 for denominators n.

Examples

			Table begins
   0    2   8  26  80..
  -1    1   7  25  79..
  -3   -1   5  23  73..
  -7   -5   1  19  65..
  -15 -13  -7  11  49..
  ..   ..  ..  ..  ..
		

Crossrefs

Row 0 (=3^n-1) is A024023.
Row 1 (=3^n-2) is A058481.
Row 2 (=3^n-4) is A168611.
Column 0 (=1-2^n) is (-1)A000225.
Column 1 (=3-2^n) is (-1)A036563.
Column 2 (=9-2^n) is (-1)A185346.
Column 3 (=27-2^n) is (-1)A220087.
0,0-Diagonal (=3^n-2^n) is A001047.
1,0-Diagonal (=3^n-2^(n-1)) for n>0 is A083313 or A064686.
0,1-Diagonal (=3^n-2^(n+1)) is A003063.
0,2-Diagonal (=3^n-2^(n+2)) is A214091.

Programs

  • Mathematica
    Table[3^(n-k) - 2^k, {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 18 2017 *)
  • PARI
    for(i=0, 10, {
         for(j=0, i, print1((3^(i-j)-2^j),", "))
    });

A304167 a(n) = 3^n - 2^(n-1) + 2 (n>=1).

Original entry on oeis.org

4, 9, 25, 75, 229, 699, 2125, 6435, 19429, 58539, 176125, 529395, 1590229, 4774779, 14332525, 43013955, 129074629, 387289419, 1161999325, 3486260115, 10459304629, 31378962459, 94138984525, 282421147875, 847271832229, 2541832273899, 7625530376125, 22876658237235, 68630108929429, 205890595223739
Offset: 1

Views

Author

Emeric Deutsch, May 10 2018

Keywords

Comments

For n>=2, a(n) is the number of vertices of the Sierpinski Gasket Rhombus graph SR(n) (see Theorem 2.1 in the D. Antony Xavier et al. reference).

Crossrefs

Programs

  • GAP
    List([1..40],n->3^n-2^(n-1)+2); # Muniru A Asiru, May 10 2018
  • Maple
    seq(3^n-2^(n-1)+2, n = 1 .. 40);
  • PARI
    Vec(x*(4 - 15*x + 15*x^2) / ((1 - x)*(1 - 2*x)*(1 - 3*x)) + O(x^30)) \\ Colin Barker, May 10 2018
    

Formula

From Colin Barker, May 10 2018: (Start)
G.f.: x*(4 - 15*x + 15*x^2) / ((1 - x)*(1 - 2*x)*(1 - 3*x)).
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) for n>3.
(End)
a(n) = A083313(n)+2. - R. J. Mathar, Jul 24 2022

A227621 The nearest integer of perimeter of T-square (fractal) after n-iterations, starting with a unit square.

Original entry on oeis.org

4, 8, 14, 23, 37, 57, 87, 133, 201, 304, 457, 688, 1034, 1553, 2331, 3499, 5251, 7878, 11819, 17731, 26598, 39899, 59851, 89778, 134669, 202005, 303010, 454517, 681778, 1022668, 1534004, 2301009, 3451515, 5177275, 7765914
Offset: 0

Views

Author

Kival Ngaokrajang, Jul 17 2013

Keywords

Comments

The round (nearest) function uses the convention that values halfway between two integers are rounded up, so a(4) = 37 = round(36 + 1/2).

Examples

			The central unit square has perimeter 4. At n=1, the additional 4 squares hide 4*1/2 = 2 units of length and add 4*3*1/2 = 6 units, to give a(1) = 4 - 2 + 6 = 8.
At n=2, the additional 12 squares hide 12*1/(2*2) units of length and add 12*3*1/(2*2) to give a(2) = 8 - 12/4 + 36/4 = 14.
		

Crossrefs

Cf. A083313.

Programs

Formula

a(0) = 4; for n >= 1, a(n) = round(A083313(n)/2^(n-3)).

A347940 Array T(n, k) = Sum_{j=2..n+2} (-1)^(n-j)*Stirling2(n+1, j-1)*j!*j^k/2, for n and k >= 0, read by antidiagonals.

Original entry on oeis.org

1, 2, 2, 4, 7, 4, 8, 23, 23, 8, 16, 73, 115, 73, 16, 32, 227, 533, 533, 227, 32, 64, 697, 2359, 3451, 2359, 697, 64, 128, 2123, 10133, 20753, 20753, 10133, 2123, 128, 256, 6433, 42655, 118843, 164731, 118843, 42655, 6433, 256, 512, 19427, 177053, 657833, 1220657, 1220657, 657833, 177053, 19427, 512
Offset: 0

Views

Author

Michel Marcus, Sep 20 2021

Keywords

Comments

T(m, n) is the number of saturated Cp^m*q^n-transfer systems where Cp^m*q^n is the cyclic group of order p^m*q^n, for m, n >= 0, p and q primes. See Hafeez et al. link page 1.

Examples

			Array begins:
   1   2     4      8      16       32 ...
   2   7    23     73     227      697 ...
   4  23   115    533    2359    10133 ...
   8  73   533   3451   20753   118843 ...
  16 227  2359  20753  164731  1220657 ...
  32 697 10133 118843 1220657 11467387 ...
  ...
		

Crossrefs

Columns k=0-1 gives A000079, A083313(n+1).
Main diagonal gives A220181(n+1).
Cf. A008277 (Stirling2), A143494.

Programs

  • PARI
    T(n, k) = sum(j=2, n+2, (-1)^(n-j)*stirling(n+1, j-1, 2)*j!*j^k/2);

Formula

T(n,k) = T(k,n).
T(n,k) = Sum_{j=0..min(n,k)} (j!*(j+2)!/2)*Stirling2(n+2,j+2;2)*Stirling2(k+2,j+2;2), n,k >= 0, where Stirling2(n,k;2) are the 2-Stirling numbers of the second kind A143494. - Fabián Pereyra, Jan 08 2022
Showing 1-10 of 10 results.