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

A198834 Number of sequences of n coin flips that win on the last flip, if the sequence of flips ends with (0,1,1) or (1,1,1).

Original entry on oeis.org

0, 0, 2, 2, 4, 6, 10, 16, 26, 42, 68, 110, 178, 288, 466, 754, 1220, 1974, 3194, 5168, 8362, 13530, 21892, 35422, 57314, 92736, 150050, 242786, 392836, 635622, 1028458, 1664080, 2692538, 4356618, 7049156, 11405774, 18454930, 29860704, 48315634, 78176338
Offset: 1

Views

Author

Paul Weisenhorn, Oct 30 2011

Keywords

Comments

If the sequence ends with (011) Abel wins; if it ends with (111) Kain wins.
Kain(n)=0 for n <> 3; Kain(3)=1.
Abel(n) = A128588(n-2) for n > 2.
a(n) = A006355(n-1) for n > 2.
Win probability for Abel: Sum_{n>=1} Abel(n)/2^n = 7/8.
Win probability for Kain: Kain(3)/8 = 1/8.
Mean length of the game: Sum_{n>=1} n*a(n)/2^n = 7.
Appears to be essentially the same as A163733, A118658, A055389. - R. J. Mathar, Oct 31 2011

Examples

			For n=6 the a(6)=6 solutions are (0,0,0,0,1,1), (1,0,0,0,1,1); (0,1,0,0,1,1), (1,1,0,0,1,1), (0,0,1,0,1,1), (1,0,1,0,1,1) all for Abel.
		

References

  • A. Engel, Wahrscheinlichkeit und Statistik, Band 2, Klett, 1978, pages 25-26.

Crossrefs

Programs

  • Maple
    a(1):=0: a(2):=0: a(3):=2:
    ml:=0.75: pot:=8:
    for n from 4 to 100 do
      pot:=2*pot:
      a(n):=a(n-1)+a(n-2):
      ml:=ml+n*a(n)/pot:
    end do:
    printf("%12.8f",ml);
    seq(a(n),n=1..100);
  • Mathematica
    Join[{0, 0}, Table[2*Fibonacci[n], {n, 70}]] (* Vladimir Joseph Stephan Orlovsky, Feb 10 2012 *)
    Join[{0},LinearRecurrence[{1,1},{0,2},50]] (* Vincenzo Librandi, Feb 19 2012 *)

Formula

a(n) = a(n-1) + a(n-2) for n > 3.
G.f.: 2*x^3/(1 - x - x^2).
a(n) = 2*A000045(n-2). - R. J. Mathar, Jan 11 2017
E.g.f.: 2 - 2*x + 2*exp(x/2)*(3*sqrt(5)*sinh(sqrt(5)*x/2) - 5*cosh(sqrt(5)*x/2))/5. - Stefano Spezia, Feb 19 2023

A206474 Riordan array ((1+x-x^2)/(1-x^2), x/(1-x^2)).

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 2, 1, 1, 1, 1, 3, 3, 1, 1, 0, 3, 3, 4, 4, 1, 1, 1, 1, 6, 6, 5, 5, 1, 1, 0, 4, 4, 10, 10, 6, 6, 1, 1, 1, 1, 10, 10, 15, 15, 7, 7, 1, 1, 0, 5, 5, 20, 20, 21, 21, 8, 8, 1, 1, 1, 1, 15, 15, 35, 35, 28, 28, 9, 9, 1, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 08 2012

Keywords

Comments

Triangle T(n,k), read by rows, given by (1, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Antidiagonal sums are A158780(n+1).
Row sums are 2*Fibonacci(n) = 2*A000045(n), n>0.

Examples

			Triangle begins :
1
1, 1
0, 1, 1
1, 1, 1, 1
0, 2, 2, 1, 1
1, 1, 3, 3, 1, 1
0, 3, 3, 4, 4, 1, 1
1, 1, 6, 6, 5, 5, 1, 1
0, 4, 4, 10, 10, 6, 6, 1, 1
1, 1, 10, 10, 15, 15, 7, 7, 1, 1
0, 5, 5, 20, 20, 21, 21, 8, 8, 1, 1
1, 1, 15, 15, 35, 35, 28, 28, 9, 9, 1, 1
		

Crossrefs

Programs

  • Mathematica
    t[1, 0] = 1; t[2, 0] = 0; t[n_, n_] = 1; t[n_ /; n >= 0, k_ /; k >= 0] /; k <= n := t[n, k] = t[n-1, k-1] + t[n-2, k]; t[n_, k_] = 0; Table[t[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 28 2013 *)

Formula

T(2n, 2k) = A128908(n,k), T(2n+1, 2k) = T(2n+1, 2k+1) = A085478(n,k) = Binomial (n+k, 2k), T(2n+2, 2k+1) = A078812(n,k) = Binomial(n+k-1, 2k-1).
T(n,k) = T(n-1,k-1) + T(n-2,k), T(0,0) = T(0,1) = 1, T(0,2) = 0.
G.f.: (1+x-x^2)/(1-x*y-x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = (-1)^n* A000129(n) (n>0), A000007(n), A135528(n-1), A055389(n) for x = -2, -1, 0, 1 respectively .

A272632 Non-Fibonacci numbers that are both a sum and a difference of two Fibonacci numbers.

Original entry on oeis.org

4, 6, 7, 10, 11, 16, 18, 26, 29, 42, 47, 68, 76, 110, 123, 178, 199, 288, 322, 466, 521, 754, 843, 1220, 1364, 1974, 2207, 3194, 3571, 5168, 5778, 8362, 9349, 13530, 15127, 21892, 24476, 35422, 39603, 57314, 64079, 92736, 103682, 150050, 167761, 242786
Offset: 1

Views

Author

Altug Alkan, May 04 2016

Keywords

Comments

Intersection of A001690 and A007298 and A084176.
Sequence focuses on the non-Fibonacci numbers because of the fact that all Fibonacci numbers are both the sum of two Fibonacci numbers and the difference of two Fibonacci numbers by definition of Fibonacci numbers.
For relation with Lucas numbers, see formula section.

Examples

			6 is a term because 6 = Fibonacci(1) + Fibonacci(5) = Fibonacci(6) - Fibonacci(3).
16 is a term because 16 = Fibonacci(6) + Fibonacci(6) = Fibonacci(8) - Fibonacci(5).
167761 is a term because it is not a Fibonacci number and 167761 = Fibonacci(24) + Fibonacci(26) = 46368 + 121393 and Fibonacci(24) + Fibonacci(26) = Fibonacci(27) - Fibonacci(23) by definition.
		

Crossrefs

Programs

  • Mathematica
    mxf=30; {s,d} = Reap[Do[{a,b} = Fibonacci@{i,j}; Sow[a+b, 0]; Sow[a-b, 1], {i, mxf}, {j, i}]][[2]]; Complement[ Intersection[s, d], Fibonacci@ Range@ mxf] (* Giovanni Resta, May 04 2016 *)

Formula

a(2*n-1) = fibonacci(n+1) + fibonacci(n+3) =A000204(n+2) for n >= 1.
a(2*n) = 2*fibonacci(n+3) = A078642(n+1) for n >= 1.
G.f.: -x*(4+6*x+3*x^2+4*x^3)/(-1+x^2+x^4) . - R. J. Mathar, Jan 13 2023
a(n) = a(n-2) + a(n-4) for n > 4. - Christian Krause, Oct 31 2023

A173388 a(n) = a(n - 3) + a(n - 4) if n is even, else a(n - 2) + a(n - 3).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 4, 4, 6, 6, 10, 10, 16, 16, 26, 26, 42, 42, 68, 68, 110, 110, 178, 178, 288, 288, 466, 466, 754, 754, 1220, 1220, 1974, 1974, 3194, 3194, 5168, 5168, 8362, 8362, 13530, 13530, 21892, 21892, 35422, 35422, 57314, 57314, 92736, 92736
Offset: 0

Views

Author

Roger L. Bagula, Feb 17 2010

Keywords

Comments

The sequence is designed so that all the numbers, see A055389 or A006355, except the first two appear twice.
The limiting ratio a(n+1)/a(n) alternates between the golden ratio and one.
Essentially the same as A214927 (except for the first 4 terms and the offset). - Georg Fischer, Oct 01 2018

Programs

  • Mathematica
    a[0] = 1; a[1] = 1; a[2] = 1; a[3] = 1;
    a[n_] := a[n] = If[Mod[n, 2] == 0, a[n - 3] + a[n - 4], a[n - 2] + a[n - 3]];
    Table[a[n], {n, 0, 50}]

Formula

a(n) = a(n-2)+a(n-4), n > 7.
G.f.: (x^7+1+x-x^6)/(1-x^2-x^4).

Extensions

Formula added by the Assoc. Editors of the OEIS, Feb 24 2010
Previous Showing 11-14 of 14 results.