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

A171478 a(n) = 6*a(n-1) - 8*a(n-2) + 2 for n > 1; a(0) = 1, a(1) = 8.

Original entry on oeis.org

1, 8, 42, 190, 806, 3318, 13462, 54230, 217686, 872278, 3492182, 13974870, 55911766, 223671638, 894735702, 3579041110, 14316361046, 57265837398, 229064136022, 916258116950, 3665035613526, 14660148745558, 58640607565142
Offset: 0

Views

Author

Klaus Brockhaus, Dec 09 2009

Keywords

Comments

Second binomial transform of A168648.
Partial sums of A080960.

Crossrefs

Cf. A168648 ((10*2^n+2*(-1)^n)/3, a(0)=1), A080960 (third binomial transform of A010685), A171472, A171473.

Programs

  • GAP
    a:=[1,8];; for n in [3..25] do a[n]:=6*a[n-1]-8*a[n-2]+2; od; a; # Muniru A Asiru, Mar 22 2018
  • Magma
    [(10*4^n-9*2^n+2)/3: n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
    
  • Maple
    a:= proc(n) option remember: if n = 0 then 1 elif n = 1 then 8 elif  n >= 2 then 6*procname(n-1) - 8*procname(n-2) + 2 fi; end:
    seq(a(n), n = 0..25); # Muniru A Asiru, Mar 22 2018
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==8,a[n]==6a[n-1]-8a[n-2]+2},a,{n,30}] (* or *) LinearRecurrence[{7,-14,8},{1,8,42},30] (* Harvey P. Dale, May 04 2012 *)
  • PARI
    {m=23; v=concat([1, 8], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]+2); v}
    

Formula

a(n) = (10*4^n - 9*2^n + 2)/3.
G.f.: (1+x)/((1-x)*(1-2*x)*(1-4*x)).
a(0)=1, a(1)=8, a(2)=42, a(n) = 7*a(n-1) - 14*a(n-2) + 8*a(n-3). - Harvey P. Dale, May 04 2012
a(n) = A203241(n+1) + 2^n*(2^(n+1)-1), n>0. - J. M. Bergot, Mar 21 2018

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
Showing 1-2 of 2 results.