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.

Previous Showing 31-40 of 84 results. Next

A002250 a(n) = 4^n - 2*3^n.

Original entry on oeis.org

-1, -2, -2, 10, 94, 538, 2638, 12010, 52414, 222778, 930478, 3840010, 15714334, 63920218, 258869518, 1045044010, 4208873854, 16921588858, 67944635758, 272553384010, 1092538058974, 4377125804698, 17529423925198, 70180457820010, 280910117637694, 1124205329623738, 4498515895713838
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [4^n-2*3^n: n in [0..30]]; // Vincenzo Librandi, Jun 20 2013
    
  • Mathematica
    Table[4^n - 2 3^n, {n, 0, 30}] (* or *) CoefficientList[Series[-(1 - 5 x) / ((1 - 3 x) (1 - 4 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 20 2013 *)
  • PARI
    a(n)=4^n-2*3^n \\ Charles R Greathouse IV, Jun 23 2020

Formula

From Bruno Berselli, Jan 25 2011: (Start)
G.f.: -(1-5*x)/((1-3*x)*(1-4*x)).
a(n) = 7*a(n-1) - 12*a(n-2) for n > 1. (End)
From Elmo R. Oliveira, Sep 15 2024: (Start)
E.g.f.: exp(3*x)*(exp(x) - 2).
a(n) = A000302(n) - A008776(n). (End)

A129736 Primes of the form 4^k - 3^k.

Original entry on oeis.org

7, 37, 14197, 17050729021, 332306984815842876487217260305275077
Offset: 1

Views

Author

N. J. A. Sloane, May 13 2007

Keywords

Crossrefs

Programs

  • GAP
    Filtered(List([1..100], n -> 4^n-3^n), IsPrime); # Muniru A Asiru, Feb 09 2018
    
  • Magma
    [a: n in [0..300] | IsPrime(a) where a is 4^n-3^n]; // Vincenzo Librandi, Nov 23 2010
    
  • Maple
    select(isprime, [seq(4^n - 3^n, n=0..100)]); # Muniru A Asiru, Feb 09 2018
  • Mathematica
    fQ[n_] := If[PrimeQ[4^n - 3^n], 4^n - 3^n, Nothing]; Array[fQ, 300] (* Robert G. Wilson v, Feb 12 2018 *)
  • PARI
    lista(nn) = for(k=1, nn, if(isprime(p=4^k-3^k), print1(p", "))) \\ Altug Alkan, Mar 03 2018

Formula

a(n) = A005061(A059801(n)). - Michel Marcus, Feb 12 2018

A167784 a(n) = 2^n - (1 - (-1)^n)*3^((n-1)/2).

Original entry on oeis.org

1, 0, 4, 2, 16, 14, 64, 74, 256, 350, 1024, 1562, 4096, 6734, 16384, 28394, 65536, 117950, 262144, 484922, 1048576, 1979054, 4194304, 8034314, 16777216, 32491550, 67108864, 131029082, 268435456, 527304974, 1073741824, 2118785834, 4294967296, 8503841150
Offset: 0

Views

Author

Paul Curtz, Nov 12 2009

Keywords

Comments

Binomial transform of A077917, the signed variant of A127864.

Crossrefs

Cf. A154383.

Programs

  • Maple
    seq(2^n - (1 - (-1)^n)*3^((n-1)/2), n=0..100); # Robert Israel, Apr 11 2019
  • Mathematica
    LinearRecurrence[{2, 3, -6}, {1, 0, 4}, 40] (* Harvey P. Dale, Nov 29 2011 *)

Formula

a(n) = A167936(n+1) - A167936(n).
a(2n) = A000302(n). a(2n+1) = 2*A005061(n).
a(n) = 2*a(n-1) + 3*a(n-2) - 6*a(n-3).
G.f.: (x-1)^2/((2*x-1)*(3*x^2-1)).
a(n+4) mod 9 = A153130(n+4) = A146501(n+2), n>=0.
E.g.f.: exp(2*x) - (2/sqrt(3))*sinh(sqrt(3)*x). - G. C. Greubel, Jun 27 2016

Extensions

Edited and extended by R. J. Mathar, Feb 27 2010
Incorrect b-file corrected by Robert Israel, Apr 11 2019

A248337 a(n) = 6^n - 4^n.

Original entry on oeis.org

0, 2, 20, 152, 1040, 6752, 42560, 263552, 1614080, 9815552, 59417600, 358602752, 2160005120, 12993585152, 78095728640, 469111242752, 2816814940160, 16909479575552, 101491237191680, 609084862103552, 3655058928435200, 21932552593866752, 131604111656222720, 789659854309425152, 4738099863344906240, 28429162130022858752
Offset: 0

Views

Author

Vincenzo Librandi, Oct 05 2014

Keywords

Crossrefs

Cf. sequences of the form k^n - 4^n: -A000302 (k=0), -A024036 (k=1), -A020522 (k=2), -A005061 (k=3), A005060 (k=5), this sequence (k=6), A190542 (k=7), A059409 (k=8), A118004 (k=9), A248338 (k=10), A139742 (k=11), 8*A016159 (k=12).

Programs

  • Magma
    [6^n-4^n: n in [0..30]];
    
  • Mathematica
    Table[6^n - 4^n, {n,0,30}]
    CoefficientList[Series[(2 x)/((1-4 x)(1-6 x)), {x, 0, 30}], x]
    LinearRecurrence[{10,-24},{0,2},30] (* Harvey P. Dale, Aug 18 2024 *)
  • PARI
    vector(20,n,6^(n-1)-4^(n-1)) \\ Derek Orr, Oct 05 2014
    
  • SageMath
    A248337=BinaryRecurrenceSequence(10,-24,0,2)
    [A248337(n) for n in range(31)] # G. C. Greubel, Nov 11 2024

Formula

G.f.: 2*x/((1-4*x)*(1-6*x)).
a(n) = 10*a(n-1) - 24*a(n-2).
a(n) = 2^n*(3^n-2^n) = A000079(n) * A001047(n) = A000400(n) - A000302(n).
a(n) = 2*A081199(n). - Bruno Berselli, Oct 05 2014
E.g.f.: 2*exp(5*x)*sinh(x). - G. C. Greubel, Nov 11 2024

Extensions

More terms added by G. C. Greubel, Nov 11 2024

A269576 a(n) = Product_{i=1..n} (4^i - 3^i).

Original entry on oeis.org

1, 7, 259, 45325, 35398825, 119187843775, 1692109818073675, 99792176520894983125, 24195710911432718503470625, 23942309231057283642583777144375, 96180015123706384385790918441966041875
Offset: 1

Views

Author

Bob Selcoe, Mar 02 2016

Keywords

Comments

In general, for sequences of the form a(n) = Product_{i=1..n} j^i-k^i, where j>k>=1 and n>=1: given probability p=(k/j)^n that an outcome will occur at the n-th stage of an infinite process, then r = 1 - a(n)/j^((n^2+n)/2) is the probability that the outcome has occurred at or before the n-th iteration. Here j=4 and k=3, so p=(3/4)^n and r = 1-a(n)/A053763(n+1). The limiting ratio of r is ~ 0.9844550.

Crossrefs

Cf. sequences of the form Product_{i=1..n}(j^i - 1): A005329 (j=2), A027871 (j=3), A027637 (j=4), A027872 (j=5), A027873 (j=6), A027875 (j=7),A027876 (j=8), A027877 (j=9), A027878 (j=10), A027879 (j=11), A027880 (j=12).
Cf. sequences of the form Product_{i=1..n}(j^i - k^1), k>1: A263394 (j=3, k=2), A269661 (j=5, k=4).

Programs

  • Maple
    seq(mul(4^i-3^i,i=1..n),n=0..20); # Robert Israel, Jun 01 2023
  • Mathematica
    Table[Product[4^i - 3^i, {i, n}], {n, 11}] (* Michael De Vlieger, Mar 07 2016 *)
    FoldList[Times,Table[4^n-3^n,{n,20}]] (* Harvey P. Dale, Jul 30 2018 *)
  • PARI
    a(n) = prod(k=1, n, 4^k-3^k); \\ Michel Marcus, Mar 05 2016

Formula

a(n) = Product_{i=1..n} A005061(i).
a(n) ~ c * 2^(n*(n+1)), where c = QPochhammer(3/4) = 0.015545038845451847... . - Vaclav Kotesovec, Oct 10 2016
a(n+3)/a(n+2) - 7 * a(n+2)/a(n+1) + 12 * a(n+1)/a(n) = 0. - Robert Israel, Jun 01 2023

A269731 Dimensions of the 3-polytridendriform operad TDendr_3.

Original entry on oeis.org

1, 7, 61, 595, 6217, 68047, 770149, 8939707, 105843409, 1273241431, 15517824973, 191202877411, 2377843390873, 29807864423071, 376255282112629, 4778240359795147, 61007205215610529, 782648075371992487, 10083436451634033757, 130413832663780730995, 1692599303723819234281, 22037570163808433691247, 287762084009227350367621
Offset: 1

Views

Author

N. J. A. Sloane, Mar 08 2016

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,7]; [n le 2 select I[n] else (7*(2*n-1)*Self(n-1)-(n-2)*Self(n-2))/(n+1): n in [1..30]]; // Vincenzo Librandi, Nov 29 2016
  • Mathematica
    Rest[CoefficientList[Series[(1 - 7*x - Sqrt[1 - 14*x + x^2])/(24*x), {x, 0, 20}], x]] (* Vaclav Kotesovec, Apr 24 2016 *)
    Table[-I*LegendreP[n, -1, 2, 7]/(2*Sqrt[3]), {n, 1, 20}] (* Vaclav Kotesovec, Apr 24 2016 *)
    RecurrenceTable[{a[1] == 1, a[2] == 7, (n + 1) a[n] == 7 (2 n - 1) a[n-1] - (n - 2) a[n-2]}, a, {n, 25}] (* Vincenzo Librandi, Nov 29 2016 *)
  • PARI
    A001263(n,k) = binomial(n-1,k-1) * binomial(n, k-1)/k;
    dimTDendr(n,q) = sum(k = 0, n-1, (q+1)^k * q^(n-k-1) * A001263(n,k+1));
    my(q=3); vector(23, n, dimTDendr(n,q)) \\ Gheorghe Coserea, Apr 23 2016
    
  • PARI
    my(q=3, x='x + O('x^24)); Vec(serreverse(x/((1+q*x)*(1+(q+1)*x)))) \\ Gheorghe Coserea, Sep 30 2017
    

Formula

a(n) = P_n(3), where P_n(x) is the polynomial associated with row n of triangle A126216 in order of decreasing powers of x.
Recurrence: (n+1)*a(n) = 7*(2*n-1)*a(n-1) - (n-2)*a(n-2). - Vaclav Kotesovec, Apr 24 2016
a(n) ~ sqrt(24 + 14*sqrt(3)) * (7 + 4*sqrt(3))^n / (24*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Apr 24 2016
A(x) = -serreverse(A005061(x))(-x). - Gheorghe Coserea, Sep 30 2017
From Peter Bala, Dec 25 2020: (Start)
a(n) = (1/(2*m*(m+1))) * Integral_{x = 1..2*m+1} Legendre_P(n,x) dx at m = 3.
a(n) = (1/(2*n+1)) * (1/(2*m*(m+1))) * ( Legendre_P(n+1,2*m+1) - Legendre_P(n-1,2*m+1) ) at m = 3. (End)

Extensions

More terms from Gheorghe Coserea, Apr 23 2016

A327316 Triangular array read by rows: row n shows the coefficients of this polynomial of degree n: p(x,n) = ((x+r)^n - (x+s)^n)/(r - s), where r = 3 and s = 2.

Original entry on oeis.org

1, 5, 2, 19, 15, 3, 65, 76, 30, 4, 211, 325, 190, 50, 5, 665, 1266, 975, 380, 75, 6, 2059, 4655, 4431, 2275, 665, 105, 7, 6305, 16472, 18620, 11816, 4550, 1064, 140, 8, 19171, 56745, 74124, 55860, 26586, 8190, 1596, 180, 9, 58025, 191710, 283725, 247080
Offset: 1

Views

Author

Clark Kimberling, Nov 01 2019

Keywords

Comments

For every choice of integers r and s, the polynomials p(n,x) form a strong divisibility sequence. Thus, if r, s, and x are integers, then p(x,n) is a strong divisibility sequence. That is, gcd(p(x,h),p(x,k)) = p(x,gcd(h,k)).

Examples

			First seven rows:
     1
     5      2
    19     15     3
    65     76    30     4
   211    325   190    50    5
   665   1266   975   380   75    6
  2059   4655  4431  2275  665  105   7
		

Crossrefs

Cf. A001047 (x=0), A005061 (x=1), A005060 (x=2), A005062 (x=3), A081200 (x=1/2).

Programs

  • Mathematica
    f[x_, n_] := ((x + r)^n - (x + s)^n)/(r - s);
    r = 3; s = 2;
    Column[Table[Expand[f[x, n]], {n, 1, 5}]]
    c[x_, n_] := CoefficientList[Expand[f[x, n]], x]
    TableForm[Table[c[x, n], {n, 1, 10}]] (* A327316 array *)
    Flatten[Table[c[x, n], {n, 1, 12}]]   (* A327316 sequence *)

A343237 Triangle T obtained from the array A(n, k) = (k+1)^(n+1) - k^(n+1), n, k >= 0, by reading antidiagonals upwards.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 5, 1, 1, 15, 19, 7, 1, 1, 31, 65, 37, 9, 1, 1, 63, 211, 175, 61, 11, 1, 1, 127, 665, 781, 369, 91, 13, 1, 1, 255, 2059, 3367, 2101, 671, 127, 15, 1, 1, 511, 6305, 14197, 11529, 4651, 1105, 169, 17, 1
Offset: 0

Views

Author

Wolfdieter Lang, May 10 2021

Keywords

Comments

This is the row reversed version of the triangle A047969(n, m). The corresponding array A047969 is a(n, k) = A(k, n) (transposed of array A).
A(n-1, k-1) = k^n - (k-1)^n gives the number of n-digit numbers with digits from K = {1, 2, 3, ..., k} such that any digit from K, say k, appears at least once. Motivated by a comment in A005061 by Enrique Navarrete, the instance k=4 for n >= 1 (the column 3 in array A), and the d = 3 (sub)-diagonal sequence of T for m >= 0.

Examples

			The array A begins:
n\k  0  1   2    3     4     5     6      7      8      9 ...
-------------------------------------------------------------
0:   1  1   1    1     1     1     1      1      1      1 ...
1:   1  3   5    7     9    11    13     15     17     19 ...
2:   1  7  19   37    61    91   127    169    217    271 ...
3:   1 15  65  175   369   671  1105   1695   2465   3439 ...
4:   1 31 211  781  2101  4651  9031  15961  26281  40951 ...
5:   1 63 665 3367 11529 31031 70993 144495 269297 468559 ...
...
The triangle T begins:
n\m   0    1     2     3     4     5    6    7   8  9 10 ...
-------------------------------------------------------------
0:    1
1:    1    1
2:    1    3     1
3:    1    7     5     1
4:    1   15    19     7     1
5:    1   31    65    37     9     1
6:    1   63   211   175    61    11    1
7:    1  127   665   781   369    91   13    1
8:    1  255  2059  3367  2101   671  127   15   1
9:    1  511  6305 14197 11529  4651 1105  169  17  1
10:   1 1023 19171 58975 61741 31031 9031 1695 217 19  1
...
Combinatorial interpretation (cf. A005061 by _Enrique Navarrete_)
The three digits numbers with digits from K ={1, 2, 3, 4} having at least one 4 are:
j=1 (one 4): 114, 141, 411; 224, 242, 422; 334, 343, 433; 124, 214, 142, 241, 412, 421; 134, 314, 143, 341, 413, 431; 234, 243, 423. That is,  3*3 + 3!*3 = 27 = binomial(3, 1)*(4-1)^(3-1) = 3*3^2;
j=2 (twice 4):  144, 414, 441;  244, 424, 442;  344, 434, 443; 3*3 = 9 = binomial(3, 2)*(4-1)^(3-2) = 3*3;
j=3 (thrice 4) 444; 1 = binomial(3, 3)*(4-1)^(3-3).
Together: 27 + 9 + 1 = 37 = A(2, 3) = T(5, 3).
		

Crossrefs

Cf. A005061, A008292, A047969 (reversed), A045531 (central diagonal), A047970 (row sums of triangle).
Row sequences of array A (nexus numbers): A000012, A005408, A003215, A005917(k+1), A022521, A022522, A022523, A022524, A022525, A022526, A022527, A022528.
Column sequences of array A: A000012, A000225(n+1), A001047(n+1), A005061(n+1), A005060(n+1), A005062(n+1), A016169(n+1), A016177(n+1), A016185(n+1), A016189(n+1), A016195(n+1), A016197(n+1).

Programs

  • Maple
    egf := exp(exp(x)*y + x)*(exp(x)*y - y + 1): ser := series(egf, x, 12):
    cx := n -> series(n!*coeff(ser, x, n), y, 12):
    Arow := n -> seq(k!*coeff(cx(n), y, k), k=0..9):
    for n from 0 to 5 do Arow(n) od; # Peter Luschny, May 10 2021
  • Mathematica
    A[n_, k_] := (k + 1)^(n + 1) - k^(n + 1); Table[A[n - k, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Amiram Eldar, May 10 2021 *)

Formula

Array A(n, k) = (k+1)^(n+1) - k^(n+1), n, k >= 0.
A(n-1, k-1) = Sum_{j=1} binomial(n, j)*(k-1)^(n-j) = Sum_{j=0} binomial(n, j)*(k-1)^(n-j) - (k-1)^n = (1+(k-1))^n - (k-1)^n = k^n - (k-1)^n (from the combinatorial comment on A(n-1, k-1) above).
O.g.f. row n of array A: RA(n, x) = P(n, x)/(1 - x)^n, with P(n, x) = Sum_{m=0..n} A008292(n+1, m+1)*x^m, (the Eulerian number triangle A008292 has offset 1) for n >= 0. (See the Oct 26 2008 comment in A047969 by Peter Bala). RA(n, x) = polylog(-(n+1), x)*(1-x)/x. (For P(n, x) see the formula by Vladeta Jovovic, Sep 02 2002.)
E.g.f. of e.g.f.s of the rows of array A: EE(x, y) = exp(x)*(1 + y*(exp(x) - 1))*exp(y*exp(x)), that is A(n, k) = [y^k/k!][x^n/n!] EE(x, y).
Triangle T(n, m) = A(n-m, m) = (m+1)^(n-m+1) - m^(n-m+1), n >= 0, m = 0, 1, ..., n.
E.g.f.: -(exp(x)-1)/(x*exp(x)*y-x). - Vladimir Kruchinin, Nov 02 2022

A380024 a(n) = 4^n - 3^n - binomial(n,2)*3^(n-2).

Original entry on oeis.org

0, 1, 6, 28, 121, 511, 2152, 9094, 38563, 163729, 694282, 2934592, 12348541, 51697075, 215291356, 891989002, 3677964295, 15099277669, 61745907934, 251632677604, 1022414950465, 4143511249831, 16755357788176, 67628131638478, 272531374722091
Offset: 0

Views

Author

Enrique Navarrete, Feb 05 2025

Keywords

Comments

a(n) is the number of words of length n defined on 4 letters where one of the letters is used at least once but not twice.

Examples

			For n=2, the 6 words on {0, 1, 2, 3} that use 0 at least once but not twice are 10, 01, 20, 02, 30, 03.
		

Crossrefs

Programs

  • Mathematica
    Array[4^#-3^#-Binomial[#,2]*3^(#-2)&,25,0] (* or *) LinearRecurrence[{13,-63,135,-108},{0,1,6,28},25] (* James C. McMahon, Feb 14 2025 *)
  • Python
    def A380024(n): return (1<<(n<<1))-((n*(n-1)>>1)+9)*3**(n-2) if n>1 else n # Chai Wah Wu, Feb 14 2025

Formula

E.g.f.: exp(3*x)*(exp(x)-(x^2)/2-1).
G.f.: x*(1 - 7*x + 13*x^2)/((1 - 3*x)^3*(1 - 4*x)). - Stefano Spezia, Mar 03 2025

A228213 Number of second differences of arrays of length n + 2 of numbers in 0..3.

Original entry on oeis.org

13, 103, 625, 3151, 14053, 58975, 242461, 989527, 4017157, 16245775, 65514541, 263652487, 1059392917, 4251920575, 17050729021, 68332056247, 273715645477, 1096024843375, 4387586157901, 17560804984807, 70274600998837
Offset: 1

Views

Author

R. H. Hardin, Aug 16 2013

Keywords

Examples

			Some solutions for n=4:
..5....0...-5....3....4....1....3...-3...-6....2....2....1...-5....1....0....2
.-4....2....2...-3...-5....1....1....3....3...-1....3....1....3....4....3....1
..2....0...-1....5....5...-3...-5....1....1....4...-5....1....0...-6...-3...-1
..3...-2....2...-6...-2....0....3...-5....1...-5....4...-1...-3....6....3....0
		

Crossrefs

Column 3 of A228218.

Formula

Empirical: a(n) = 7*a(n-1) - 12*a(n-2) = A005061(n+2) for n>7.
Conjectures from Colin Barker, Sep 09 2018: (Start)
G.f.: x*(13 + 12*x + 60*x^2 + 12*x^3 - 504*x^4 - 1584*x^5 - 1728*x^6) / ((1 - 3*x)*(1 - 4*x)).
a(n) = 4^(2+n) - 3^(2+n) for n>5.
(End)
Previous Showing 31-40 of 84 results. Next