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 11-16 of 16 results.

A173078 a(n) = (5*2^n - 2*(-1)^n - 9)/3.

Original entry on oeis.org

1, 3, 11, 23, 51, 103, 211, 423, 851, 1703, 3411, 6823, 13651, 27303, 54611, 109223, 218451, 436903, 873811, 1747623, 3495251, 6990503, 13981011, 27962023, 55924051, 111848103, 223696211, 447392423, 894784851, 1789569703, 3579139411
Offset: 1

Views

Author

Paul Curtz, Feb 09 2010

Keywords

Comments

The sequence and higher-order differences in subsequent rows are
1, 3, 11, 23, 51, 103, 211, 423, 851, 1703, 3411, 6823, 13651
2, 8, 12, 28, 52, 108, 212, 428, 852, 1708, 3412, 6828, 13652
6, 4, 16, 24, 56, 104, 216, 424, 856, 1704, 3416, 6824, 13656
-2, 12, 8, 32, 48, 112, 208, 432, 848, 1712, 3408, 6832, 13648
14, -4, 24, 16, 64, 96, 224, 416, 864, 1696, 3424, 6816, 13664
-18, 28, -8, 48, 32, 128, 192, 448, 832, 1728, 3392, 6848, 1363
46, -36, 56, -16, 96, 64, 256, 384, 896, 1664, 3456, 6784, 1369
The main diagonal 1,8,16,... is essentially A000079.
A subdiagonal is 2, 4, 8, 16, ... A155559.
Other diagonals are 3, 12, 24, 48, ... = 3*A151821, 6, 12, 24, ... = A082505 and -2, -4, -8, -16, ..., a negated variant of A171449.

Programs

  • GAP
    List([1..40], n-> (5*2^n - 2*(-1)^n - 9)/3); # G. C. Greubel, Dec 01 2019
  • Magma
    [5*2^n/3-2*(-1)^n/3-3: n in [1..40]]; // Vincenzo Librandi, Aug 05 2011
    
  • Maple
    seq( (5*2^n -2*(-1)^n -9)/3, n=1..40); # G. C. Greubel, Dec 01 2019
  • Mathematica
    LinearRecurrence[{2,1,-2},{1,3,11},40] (* Harvey P. Dale, Oct 01 2018 *)
  • PARI
    vector(40, n, (5*2^n - 2*(-1)^n - 9)/3) \\ G. C. Greubel, Dec 01 2019
    
  • Sage
    [(5*2^n - 2*(-1)^n - 9)/3 for n in (1..40)] # G. C. Greubel, Dec 01 2019
    

Formula

a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
a(n+1) - 2*a(n) = A010686(n-1).
a(n) = A084214(n+1) - 3.
G.f.: x*(1 + x + 4*x^2) / ( (1-x)*(1-2*x)*(1+x) ).
a(2n+3) - a(2n+1) = 10*A000302(n).
E.g.f.: (-2*exp(-x) + 6 - 9*exp(x) + 5*exp(2*x))/3. - G. C. Greubel, Dec 01 2019

A151794 a(1)=2, a(2)=4, a(3)=6; a(n+3) = a(n+2)+ 2*a(n), n>=1.

Original entry on oeis.org

2, 4, 6, 14, 26, 54, 106, 214, 426, 854, 1706, 3414, 6826, 13654, 27306, 54614, 109226, 218454, 436906, 873814, 1747626, 3495254, 6990506, 13981014, 27962026, 55924054, 111848106, 223696214, 447392426, 894784854, 1789569706, 3579139414, 7158278826, 14316557654
Offset: 1

Views

Author

K. S. Bhanu (bhanu_105(AT)yahoo.com), Jun 21 2009

Keywords

Comments

Consider the following coin tossing experiment. Let n >= 1 be a predetermined integer. We toss an unbiased coin sequentially. For each outcome, we score two points for a head (H) and one point for a tail (T). The coin is tossed until the total score reaches n or jumps from n-1 to n+1. The results of the tosses are written in a linear array. Then the probability of non-occurrence of double heads (HH) is given by p(n) = a(n) / 2^n, n>=1.

References

  • Bhanu K. S, Deshpande M. N. & Cholkar C. P. (2006): Coin tossing -Some Surprising Results, International Journal of Mathematical Education In Science and Technology, Vol.37, No.1, pp.115-119.

Programs

  • Mathematica
    Join[{2},LinearRecurrence[{1,2},{4,6},40]] (* Harvey P. Dale, Oct 19 2012 *)
  • PARI
    Vec(2*x*(-x+x^2-1)/((1+x)*(2*x-1)) + O(x^100)) \\ Colin Barker, Jun 12 2015

Formula

G.f.: 2*x*(-x+x^2-1)/((1+x)*(2*x-1)).
a(n) = A084214(n), n>1.
a(n) = A168648(n-2), n>2.
a(n) = 2*A048573(n-2), n>1.
a(n) = (4*(-1)^n+5*2^n)/6 for n>1. - Colin Barker, Jun 12 2015

A275788 a(0) = 0, a(n+1) = 2*a(n) + (-1)^floor(n/3).

Original entry on oeis.org

0, 1, 3, 7, 13, 25, 49, 99, 199, 399, 797, 1593, 3185, 6371, 12743, 25487, 50973, 101945, 203889, 407779, 815559, 1631119, 3262237, 6524473, 13048945, 26097891, 52195783, 104391567, 208783133, 417566265, 835132529, 1670265059, 3340530119, 6681060239
Offset: 0

Views

Author

Paul Curtz, Aug 09 2016

Keywords

Comments

a(n) and its successive differences:
0, 1, 3, 7, 13, 25, 49, ...
1, 2, 4, 6, 12, 24, 50, 100, ...
1, 2, 2, 6, 12, 26, 50, 100, 198, ...
1, 0, 4, 6, 14, 24, 50, 98, 200, 398, ...
-1, 4, 2, 8, 10, 26, 48, 102, 198, 400, 794, ...
5, -2, 6, 2, 16, 22, 54, 96, 202, 394, 800, 1590, ...
-7, 8, -4, 14, 6, 32, 42, 106, 192, 406, 790, 1600, 3178, ...
... .
Each row has the recurrence a(n) + a(n+3) = 7*2^n.
Main diagonal: 2*A001045(n).
Upper diagonals: A084214(n+1), 3*2^n, ... .
Subdiagonals: 2^n, A078008(n), A084214(n+1), -2^n, ... .
a(-n) = 0, 1/2, 3/4, 7/8, -1/16, -17/32, -49/64, 15/128, ... .
b(n), numerators of a(-n), and first differences:
0, 1, 3, 7, -1, -17, -49, 15, 143, 399, -113, -1137, ...
1, 2, 4, -8, -16, -32, 64, 128, 256, -512, -1024, ... = A000079(n)*A130151(n), not in the OEIS.

Examples

			a(1)=2*0+1=1, a(2)=2*1+1=3, a(2)=2*3+1=7, a(3)=2*7-1=13, a(4)=2*13-1=25, ... .
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x (1 + x + x^2)/((1 + x) (1 - 2 x) (1 - x + x^2)), {x, 0, 33}], x] (* Michael De Vlieger, Aug 11 2016 *)
    LinearRecurrence[{2,0,-1,2}, {0, 1, 3, 7}, 25] (* G. C. Greubel, Aug 16 2016 *)
  • PARI
    concat(0, Vec(x*(1+x+x^2)/((1+x)*(1-2*x)*(1-x+x^2)) + O(x^40))) \\ Colin Barker, Aug 10 2016

Formula

From Colin Barker, Aug 09 2016: (Start)
a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4) for n>3.
G.f.: x*(1 + x + x^2) / ((1+x)*(1-2*x)*(1-x+x^2)).
(End)
a(n+3) = 7*2^n - a(n), a(0)=0, a(1)=1, a(2)=3.

Extensions

More terms from Colin Barker, Aug 10 2016

A338198 Triangle read by rows, T(n,k) = ((k+1)*2^(n-k)-(k-2)*(-1)^(n-k))/3 for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 2, 1, 1, 2, 3, 2, 1, 6, 5, 4, 3, 1, 10, 11, 8, 5, 4, 1, 22, 21, 16, 11, 6, 5, 1, 42, 43, 32, 21, 14, 7, 6, 1, 86, 85, 64, 43, 26, 17, 8, 7, 1, 170, 171, 128, 85, 54, 31, 20, 9, 8, 1, 342, 341, 256, 171, 106, 65, 36, 23, 10, 9, 1, 682, 683, 512, 341, 214, 127, 76, 41, 26, 11, 10, 1
Offset: 0

Views

Author

Werner Schulte, Oct 15 2020

Keywords

Comments

This triangle is related to the Jacobsthal numbers (A001045).

Examples

			The triangle T(n,k) for 0 <= k <= n starts:
n\k :    0     1     2    3    4    5    6   7   8   9
======================================================
  0 :    1
  1 :    0     1
  2 :    2     1     1
  3 :    2     3     2    1
  4 :    6     5     4    3    1
  5 :   10    11     8    5    4    1
  6 :   22    21    16   11    6    5    1
  7 :   42    43    32   21   14    7    6   1
  8 :   86    85    64   43   26   17    8   7   1
  9 :  170   171   128   85   54   31   20   9   8   1
etc.
		

Crossrefs

For columns k = 0 to 8 see A078008, A001045, A000079, A001045, A084214, A014551, A083595, A083582, A259713 respectively.

Programs

  • Mathematica
    Table[((k + 1)*2^(n - k) - (k - 2)*(-1)^(n - k))/3, {n, 0, 11}, {k, 0, n}] // Flatten (* Michael De Vlieger, Oct 15 2020 *)

Formula

T(n,n) = 1 for n >= 0; T(n,n-1) = n-1 for n > 0.
T(n,k) = T(n-1,k) + 2 * T(n-2,k) for 0 <= k <= n-2.
T(n,k) = 2 * T(n-1,k) - (k-2) * (-1)^(n-k) for 0 <= k < n.
T(n,k) = T(n+1-k,1) + (k-1) * T(n-k,1) for 0 <= k < n.
T(n+1,k) * T(n-1,k) - T(n,k+1) * T(n,k-1) = T(n-k,1)^2 for 0 < k < n.
Row sums are A083579(n+1) for n >= 0.
G.f. of column k >= 0: (1+(k-1)*t) * t^k / (1-t-2*t^2).
G.f.: Sum_{n>=0, k=0..n} T(n,k) * x^k * t^n = (1 - (1+x)*t + 2*x*t^2) / ((1 - x*t)^2 * (1 - t - 2*t^2)).
Conjecture: Let M(n,k) be the matrix inverse of T(n,k), seen as a matrix. Then M(i,j) = 0 if j < 0 or j > i, M(n,n) = 1 for n >= 0, M(n,n-1) = 1-n for n > 0, and M(n,k) = (-1)^(n-k) * (k^2-2) * (n-2)! / k! for 0 <= k <= n-2.

A344109 a(n) = (5*2^n + 7*(-1)^n)/3.

Original entry on oeis.org

4, 1, 9, 11, 29, 51, 109, 211, 429, 851, 1709, 3411, 6829, 13651, 27309, 54611, 109229, 218451, 436909, 873811, 1747629, 3495251, 6990509, 13981011, 27962029, 55924051, 111848109, 223696211, 447392429, 894784851, 1789569709, 3579139411, 7158278829, 14316557651, 28633115309, 57266230611, 114532461229, 229064922451
Offset: 0

Views

Author

Paul Curtz, May 09 2021

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,2}, {4,1}, 28] (* Amiram Eldar, May 10 2021 *)

Formula

a(n+1) = 5*2^n - a(n) for n >= 0, with a(0) = 4.
a(n+2) = 5*2^n + a(n) for n >= 0, with a(0) = 4, a(1) = 1.
a(n+3) = 15*2^n - a(n) for n >= 0, with a(0) = 4, a(1) = 1, a(2) = 9.
a(n) = A001045(n+2) + A154879(n).
a(2*n+1) = A321421(n).
a(n) = a(n-1) + 2*a(n-2) for n >= 2. - Pontus von Brömssen, May 09 2021
G.f.: (4 - 3*x)/(1 - x - 2*x^2). - Stefano Spezia, May 10 2021
a(n) = 2*A014551(n) - A001045(n).
a(n) = abs(A156550(n)) - (-1)^n.
a(n+3) = a(n) + 7*A084214(n+1) for n >= 0, with a(0) = 4.
a(n) = 5*A001045(n+1) - A084214(n+1) for n >= 0.
a(n) = A084214(n+1) + 3*(-1)^n for n >= 0.

A356050 a(n) = 2*A135318(n+1) - A135318(n).

Original entry on oeis.org

1, 1, 3, 4, 5, 6, 11, 14, 21, 26, 43, 54, 85, 106, 171, 214, 341, 426, 683, 854, 1365, 1706, 2731, 3414, 5461, 6826, 10923, 13654, 21845, 27306, 43691, 54614, 87381, 109226, 174763, 218454, 349525, 436906, 699051, 873814, 1398101, 1747626, 2796203, 3495254, 5592405
Offset: 0

Views

Author

Paul Curtz, Aug 19 2022

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 1, 0, 2}, {1, 1, 3, 4}, 50] (* Amiram Eldar, Aug 19 2022 *)

Formula

a(n) = A135318(n) + A230096(n+1).
a(n) = a(n-8) + 5*A094958(n-5).
a(2*n) = A001045(n+2).
a(2*n+1) = A084214(n+1).
From Stefano Spezia, Aug 20 2022: (Start)
O.g.f.: (1 + x + 2*x^2 + 3*x^3)/((1 + x^2)*(1 - 2*x^2)).
E.g.f.: (8*cosh(sqrt(2)*x) - 2*cos(x) + 5*sqrt(2)*sinh(sqrt(2)*x) - 4*sin(x))/6. (End)
3*a(n) = A228826(n+1) +A094958(n+3). - R. J. Mathar, Jan 25 2023
Previous Showing 11-16 of 16 results.