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 15 results. Next

A081254 Numbers k such that A081252(m)/m^2 has a local maximum for m = k.

Original entry on oeis.org

1, 3, 6, 13, 26, 53, 106, 213, 426, 853, 1706, 3413, 6826, 13653, 27306, 54613, 109226, 218453, 436906, 873813, 1747626, 3495253, 6990506, 13981013, 27962026, 55924053, 111848106, 223696213, 447392426, 894784853, 1789569706, 3579139413
Offset: 1

Views

Author

Klaus Brockhaus, Mar 17 2003

Keywords

Comments

The limit of the local maxima, lim_{m->inf} A081252(m)/m^2 = 1/10. For local minima cf. A081253.
Row sums of the triangle A181971. - Reinhard Zumkeller, Jul 09 2012

Examples

			13 is a term since A081252(12)/12^2 = 15/144 = 0.104..., A081252(13)/13^2 = 18/169 = 0.106..., A081252(14)/14^2 = 20/196 = 0.102....
		

Crossrefs

Programs

  • Magma
    [Floor(2^(n-1)*5/3): n in [1..40]]; // Vincenzo Librandi, Apr 04 2012
    
  • Maple
    seq(floor(2^(n-1)*5/3),n=1..35); # Muniru A Asiru, Sep 20 2018
  • Mathematica
    Rest@CoefficientList[Series[-(x^2 - x - 1)*x/((x - 1)*(x + 1)*(2*x - 1)), {x, 0, 32}], x] (* Vincenzo Librandi, Apr 04 2012 *)
    a[n_]:=Floor[2^(n-1)*5/3]; Array[a,33,1] (* Stefano Spezia, Sep 01 2018 *)
  • PARI
    a(n) = 2^(n-1)*5\3; \\ Altug Alkan, Sep 21 2018

Formula

a(n) = floor(2^(n-1)*5/3). [corrected by Michel Marcus, Sep 21 2018]
a(n) = a(n-2) + 5*2^(n-3) for n > 2;
a(n+2) - a(n) = A020714(n-1);
a(n) + a(n-1) = A052549(n-1) for n > 1;
a(2*n+1) = A020989(n); a(2n) = A072197(n-1);
a(n+1) - a(n) = A048573(n-1).
G.f.: -(x^2 - x - 1)*x/((x - 1)*(x + 1)*(2*x - 1)).
a(n) = 5*2^(n-1)/3 + (-1)^n/6-1/2. a(n) = 2*a(n-1) + (1+(-1)^n)/2, a(1)=1. - Paul Barry, Mar 24 2003
a(2n) = 2*a(2*n-1) + 1, a(2*n+1) = 2*a(2*n), a(1)=1. a(n) = A000975(n-1) + 2^(n-1). - Philippe Deléham, Oct 15 2006
a(n) = A005578(n) + A000225(n-1). - Yuchun Ji, Sep 21 2018
a(n) - a(n-2) = 2 * (a(n-1) - a(n-3)), with a(0..2)=[1,3,6]. - Yuchun Ji, Mar 18 2020

A084214 Inverse binomial transform of a math magic problem.

Original entry on oeis.org

1, 1, 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: 0

Views

Author

Paul Barry, May 19 2003

Keywords

Comments

Inverse binomial transform of A060816.

Crossrefs

Programs

  • Haskell
    a084214 n = a084214_list !! n
    a084214_list = 1 : xs where
       xs = 1 : 4 : zipWith (+) (map (* 2) xs) (tail xs)
    -- Reinhard Zumkeller, Aug 01 2011
    
  • Magma
    [(5*2^n-3*0^n+4*(-1)^n)/6: n in [0..35]]; // Vincenzo Librandi, Jun 15 2011
    
  • Maple
    A084214 := proc(n)
        (5*2^n - 3*0^n + 4*(-1)^n)/6 ;
    end proc:
    seq(A084214(n),n=0..60) ; # R. J. Mathar, Aug 18 2024
  • Mathematica
    f[n_]:=2/(n+1);x=3;Table[x=f[x];Numerator[x],{n,0,5!}] (* Vladimir Joseph Stephan Orlovsky, Mar 12 2010 *)
    LinearRecurrence[{1,2},{1,1,4},50] (* Harvey P. Dale, Mar 05 2021 *)
  • PARI
    a(n) = 5<<(n-1)\3 + bitnegimply(1,n); \\ Kevin Ryde, Dec 20 2023

Formula

a(n) = (5*2^n - 3*0^n + 4*(-1)^n)/6.
G.f.: (1+x^2)/((1+x)*(1-2*x)).
E.g.f.: (5*exp(2*x) - 3*exp(0) + 4*exp(-x))/6.
From Paul Barry, May 04 2004: (Start)
The binomial transform of a(n+1) is A020989(n).
a(n) = A001045(n-1) + A001045(n+1) - 0^n/2. (End)
a(n) = Sum_{k=0..n} A001045(n+1)*C(1, k/2)*(1+(-1)^k)/2. - Paul Barry, Oct 15 2004
a(n) = a(n-1) + 2*a(n-2) for n > 2. - Klaus Brockhaus, Dec 01 2009
From Yuchun Ji, Mar 18 2019: (Start)
a(n+1) = Sum_{i=0..n} a(i) + 1 - (-1)^n, a(0)=1.
a(n) = A000975(n-3)*10 + 5 + (-1)^(n-3), a(0)=1, a(1)=1, a(2)=4. (End)
a(n) = A081254(n) + (n-1 mod 2). - Kevin Ryde, Dec 20 2023
a(n) = 2*A048573(n-2) for n>=2. - Alois P. Heinz, May 20 2025

A083424 a(n) = (5*4^n + (-2)^n)/6.

Original entry on oeis.org

1, 3, 14, 52, 216, 848, 3424, 13632, 54656, 218368, 873984, 3494912, 13981696, 55922688, 223698944, 894779392, 3579150336, 14316535808, 57266274304, 229064835072, 916259864576, 3665038409728, 14660155736064, 58640618749952
Offset: 0

Views

Author

Paul Barry, Apr 30 2003

Keywords

Comments

Binomial transform of A083423.

Examples

			Factorizations of initial terms: 1, (3), (2)*(7), (2)^2*(13), (2)^3*(3)^3, (2)^4*(53), (2)^5*(107), (2)^6*(3)*(71), (2)^7*(7)*(61), (2)^8*(853), (2)^9*(3)*(569), (2)^10*(3413), (2)^11*(6827), (2)^12*(3)^2*(37)*(41), (2)^13*(7)*(47)*(83), (2)^14*(13)*(4201), (2)^15*(3)*(23)*(1583), (2)^16*(218453), ...
		

Crossrefs

Programs

Formula

a(n) = 2*a(n-1) + 8*a(n-2). - N. J. A. Sloane, Jul 16 2014
G.f.: (1+x)/(1-2*x-8*x^2). [Corrected by N. J. A. Sloane, Jul 16 2014]
E.g.f.: (5*exp(4*x) + exp(-2*x))/6.
From N. J. A. Sloane, Jul 18 2014: (Start)
2^(n-1)|a(n) for n >= 1;
3|a(3n+1). (End)
From Klaus Purath, Oct 15 2020: (Start)
a(n) = A048573(n)*2^(n-1).
a(n) = A048573(n)*(A048573(n+1) - A048573(n-1))/5. (End)
a(n+1) = 4*a(n) - (-1)^n*A000079(n). - Paul Curtz, May 22 2025

A140966 a(n) = (5 + (-2)^n)/3.

Original entry on oeis.org

2, 1, 3, -1, 7, -9, 23, -41, 87, -169, 343, -681, 1367, -2729, 5463, -10921, 21847, -43689, 87383, -174761, 349527, -699049, 1398103, -2796201, 5592407, -11184809, 22369623, -44739241, 89478487, -178956969, 357913943, -715827881, 1431655767, -2863311529, 5726623063
Offset: 0

Views

Author

Paul Curtz, Jul 27 2008

Keywords

Comments

Inverse binomial transform of A048573.
This is an example of the case k=-1 of sequences with recurrences a(n) = k*a(n-1) + (k+3)*a(n-2) - (2*k+2)*a(n-3).
The case k=1 is covered, for example, by A097163, A135520, A136326, A136336, or A137208.
Sequences with k=2 are A094554 and A094555.
Sequences with k=3 are A084175, A108924, and A139818.

Crossrefs

Programs

Formula

a(n) = -a(n-1) + 2*a(n-2).
G.f.: (2+3*x)/((1-x)*(1+2*x)).
a(n+1) - a(n) = (-1)^(n+1)*A000079(n).
a(n+3) = (-1)^n*A083582(n).
a(n+1) - 2*a(n) = -a(n+2).
a(n+1) - 3*a(n) = 5*(-1)^(n+1)*A078008(n) = (-1)^(n+1)*A001045(n-1).
a(2n+3) = -A083584(n), a(2n) = A163834(n). - Philippe Deléham, Feb 24 2014
E.g.f.: (5*exp(x) + exp(-2*x))/3. - Stefano Spezia, Jul 27 2024

Extensions

Definition simplified by R. J. Mathar, Sep 11 2009

A135318 The Kentucky-2 sequence: a(n) = a(n-2) + 2*a(n-4), with a[0..3] = [1, 1, 1, 2].

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 8, 11, 16, 21, 32, 43, 64, 85, 128, 171, 256, 341, 512, 683, 1024, 1365, 2048, 2731, 4096, 5461, 8192, 10923, 16384, 21845, 32768, 43691, 65536, 87381, 131072, 174763, 262144, 349525, 524288, 699051, 1048576, 1398101, 2097152, 2796203
Offset: 0

Views

Author

Paul Curtz, Feb 16 2008

Keywords

Comments

Shifted Jacobsthal recurrence.
From L. Edson Jeffery, Apr 21 2011: (Start)
Let U be the unit-primitive matrix (see [Jeffery])
U=U_(6,2)=
(0 0 1)
(0 2 0)
(2 0 1),
let i in {0,1}, m>=0 an integer and n=2*m+i. Then a(n)=a(2*m+i)=Sum_{j=0..2} (U^m)_(i,j). (End)
a(n) is also the pebbling number of the cycle graph C_{n+1} for n > 1. - Eric W. Weisstein, Jan 07 2021
From Greg Dresden and Ziyi Xie, Aug 25 2023: (Start)
a(n) is the number of ways to tile a zig-zag strip of n cells using squares (of 1 cell) and triangles (of 3 cells). Here is the zig-zag strip corresponding to n=11, with 11 cells:
_ _
_| |_| |_
| |_| |_| |_
|_| |_| |_| |
| |_| |_| |_|
|_| |_| |_|,
and here are the two types of triangles (where one is just a reflection of the other):
_ _
| |_ _| |
| | | |
| _| and |_ |
|_| |_|.
As an example, here is one of the a(11) = 32 ways to tile the zig-zag strip of 11 cells:
_ _
_| |_| |_
| |_| | |_
| |_ | |
| _| |_| _|
|_| |_| |_|. (End)

Examples

			Let i=0 and m=3. Then U^3 = (2,0,3;0,8,0;6,0,5), and the first-row sum (corresponding to i=0) is 2 + 0 + 3 = 5. Hence a(n) = a(2*m+i) = a(2*3+0) = a(6) = 2 + 3 = 5.
		

Crossrefs

Programs

  • Magma
    [(2^Floor(n/2)*(5-(-1)^n)+(-1)^Floor(n/2)*(1+(-1)^n))/6: n in [0..50]]; // Vincenzo Librandi, Aug 10 2011
  • Maple
    a:= n-> (<<0|1>, <2|1>>^(iquo(n, 2, 'm')). <<1, 1+m>>)[1,1]:
    seq(a(n), n=0..50);  # Alois P. Heinz, May 30 2022
  • Mathematica
    LinearRecurrence[{0,1,0,2},{1,1,1,2},40] (* Harvey P. Dale, Oct 14 2015 *)

Formula

From R. J. Mathar, Feb 19 2008: (Start)
O.g.f.: (1/(1+x^2)+(-2-3*x)/(2*x^2-1))/3.
a(2n) = A001045(n+1).
a(2n+1) = A000079(n). (End)
From L. Edson Jeffery, Apr 21 2011: (Start)
G.f.: (1+x+x^3)/((1+x^2)*(1-2*x^2)).
a(n) = (((-i)^(n+1)-i^(n+1))*2*i*sqrt(2)+3*(1+(-1)^(n+1))*2^((n+2)/2)+(1-(-1)^(n+1))*2^((n+5)/2))/(12*sqrt(2)), where i=sqrt(-1). (End)
a(n) = (2^floor(n/2)*(5-(-1)^n)+(-1)^floor(n/2)*(1+(-1)^n))/6 = (A016116(n)*A010711(n)+2*A056594(n))/6. - Bruno Berselli, Apr 21 2011
a(2n) = 2*a(2n-1) - a(2n-2); a(2n+1) = a(2n) + a(2n-2). - Richard R. Forberg, Aug 19 2013
a(n) = A112387(n + (-1)^n). - Alois P. Heinz, Sep 28 2023
E.g.f.: (2*cos(x) + 4*cosh(sqrt(2)*x) + 3*sqrt(2)*sinh(sqrt(2)*x))/6. - Stefano Spezia, Nov 09 2024
a(2*n) + a(2*n+1) = A048573(n) for n >= 0. - Paul Curtz, May 18 2025

Extensions

More terms from R. J. Mathar, Feb 19 2008

A251149 T(n,k) = Number of (n+1) X (k+1) 0..2 arrays with every 2 X 2 subblock summing to 4 and no 2 X 2 subblock having exactly two nonzero entries.

Original entry on oeis.org

13, 27, 27, 53, 49, 53, 107, 87, 87, 107, 213, 161, 143, 161, 213, 427, 299, 247, 247, 299, 427, 853, 565, 433, 401, 433, 565, 853, 1707, 1075, 777, 667, 667, 777, 1075, 1707, 3413, 2065, 1413, 1141, 1061, 1141, 1413, 2065, 3413, 6827, 3991, 2607, 1987, 1743
Offset: 1

Views

Author

R. H. Hardin, Nov 30 2014

Keywords

Comments

Table starts:
...13...27...53...107...213...427...853..1707..3413...6827..13653..27307..54613
...27...49...87...161...299...565..1075..2065..3991...7761..15163..29749..58563
...53...87..143...247...433...777..1413..2607..4863...9167..17433..33417..64493
..107..161..247...401...667..1141..1987..3521..6327..11521..21227..39541..74387
..213..299..433...667..1061..1743..2925..5003..8689..15307..27317..49359..90237
..427..565..777..1141..1743..2763..4491..7453.12569..21501..37255..65355.116035
..853.1075.1413..1987..2925..4491..7101.11491.18917..31587..53389..91275.157789
.1707.2065.2607..3521..5003..7453.11491.18193.29359..48081..79675.133405.225555
.3413.3991.4863..6327..8689.12569.18917.29359.46575..75087.122521.201881.335501
.6827.7761.9167.11521.15307.21501.31587.48081.75087.119441.192507.313341.514067

Examples

			Some solutions for n=4, k=4:
..0..1..0..2..1....1..0..1..1..1....1..0..1..1..2....2..1..2..1..1
..1..2..1..1..0....1..2..1..1..1....1..2..1..1..0....0..1..0..1..1
..1..0..1..1..2....1..0..1..1..1....0..1..0..2..1....1..2..1..2..0
..1..2..1..1..0....1..2..1..1..1....1..2..1..1..0....0..1..0..1..1
..1..0..1..1..2....1..0..1..1..1....0..1..0..2..1....2..1..2..1..1
		

Crossrefs

Column 1 is A048573(n+2).

Formula

Empirical for column k:
k=1: a(n) = a(n-1) +2*a(n-2)
k=2: a(n) = 3*a(n-1) -5*a(n-3) +a(n-4) +2*a(n-5)
k=3: a(n) = 3*a(n-1) -5*a(n-3) +a(n-4) +2*a(n-5)
k=4: a(n) = 3*a(n-1) -5*a(n-3) +a(n-4) +2*a(n-5)
k=5: a(n) = 3*a(n-1) -5*a(n-3) +a(n-4) +2*a(n-5)
k=6: a(n) = 3*a(n-1) -5*a(n-3) +a(n-4) +2*a(n-5)
k=7: a(n) = 3*a(n-1) -5*a(n-3) +a(n-4) +2*a(n-5)

A112387 a(n) = 2^(n/2) if n is even and a(n-1) - a(n-2) if n is odd, a(1) = 1.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 8, 5, 16, 11, 32, 21, 64, 43, 128, 85, 256, 171, 512, 341, 1024, 683, 2048, 1365, 4096, 2731, 8192, 5461, 16384, 10923, 32768, 21845, 65536, 43691, 131072, 87381, 262144, 174763, 524288, 349525, 1048576, 699051, 2097152, 1398101, 4194304
Offset: 0

Views

Author

Edwin F. Sampang, Dec 05 2005

Keywords

Comments

This sequence originated from the Fibonacci sequence, but instead of adding the last two terms, you get the average. Example, if you have the initial condition a(1)=x and a(2)=y, a(3)=(x+y)/2, a(4)=(x+3y)/4, a(5)=(3x+5y)/8, a(6)=(5x+11y)/16 and so on and so forth. I used the coefficients of x and y as well as the denominator.
As n approaches infinity a(n)/a(n+1) oscillates between the values 3/2 and 1/3.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n::even, 2^(n/2), a(n-1)-a(n-2))
        end: a(1):=1:
    seq(a(n), n=0..50);  # Alois P. Heinz, Sep 27 2023
  • Mathematica
    a[1] = 1; a[2] = 2; a[n_] := a[n] = If[ EvenQ[n], 2^(n/2), a[n - 1] - a[n - 2]]; Array[a, 43] (* Robert G. Wilson v, Dec 05 2005 *)
    nxt[{n_,a_,b_}]:={n+1,b,If[OddQ[n],2^((n+1)/2),b-a]}; NestList[nxt,{2,1,2},50][[All,2]] (* Harvey P. Dale, Jul 08 2019 *)

Formula

a(n) = 2^(n/2) if n is even, a(n) = a(n-1) - a(n-2) if n is odd, and a(1) = 1.
a(2n) = A000079(n), a(2n-1) = A001045(n).
G.f.: (1+x+x^2)/((1+x^2)*(1-2*x^2)). - Joerg Arndt, Apr 25 2021
a(n) = A135318(n + (-1)^n). - Paul Curtz, Sep 27 2023
E.g.f.: (3*cosh(sqrt(2)*x) + sin(x) + sqrt(2)*sinh(sqrt(2)*x))/3. - Stefano Spezia, Jun 30 2024
a(2*n) + a(2*n+1) = A048573(n); a(2*n+1) + a(2*n+2) = A001045(n+3). - Paul Curtz, Jan 03 2025

Extensions

Edited and extended by Robert G. Wilson v, Dec 05 2005
a(0)=1 prepended by Alois P. Heinz, Sep 27 2023

A081374 Size of "uniform" Hamming covers of distance 1, that is, Hamming covers in which all vectors of equal weight are treated the same, included or excluded from the cover together.

Original entry on oeis.org

1, 2, 2, 5, 10, 22, 43, 86, 170, 341, 682, 1366, 2731, 5462, 10922, 21845, 43690, 87382, 174763, 349526, 699050, 1398101, 2796202, 5592406, 11184811, 22369622, 44739242, 89478485, 178956970, 357913942, 715827883, 1431655766, 2863311530, 5726623061
Offset: 1

Views

Author

David Applegate, Aug 22 2003

Keywords

Comments

Motivation: consideration of the "hats" problem (which boils down to normal hamming covering codes) in the case when the people are indistinguishable or unlabeled.
From Paul Curtz, May 26 2011: (Start)
If we add a(0)=1 in front and build the table of a(n) and iterated differences in further rows we get:
1, 1, 2, 2, 5, 10,
0, 1, 0, 3, 5, 12,
1, -1, 3, 2, 7, 9,
-2, 4, -1, 5, 2, 13,
6, -5, 6, -3, 11, 6
-11, 11, -9, 14, -5, 21.
The first column is the inverse binomial transform, which is 1,0 followed by (-1)^n*A083322(n-1), n>=2.
The main diagonal in the table above is A001045, the adjacent upper diagonals are A078008, A048573 and A062092. (End)

Crossrefs

Cf. A083322.

Programs

  • Magma
    I:=[1,2,2,5]; [n le 4 select I[n] else 2*Self(n-1)-Self(n-3)+2*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 08 2016
  • Maple
    hatwork := proc(n,i,covered) local val, val2; options remember;
    # computes the minimum cover of the i-bit through n-bit words.
    # if covered is true the i-bit words are already covered (by the (i-1)-bit words)
    if (i>n or (i = n and covered)) then 0; elif (i = n and not covered) then 1; else
    # one choice is to include the i-bit words in the cover
    val := hatwork(n, i+1, true) + binomial(n,i);
    # the other choice is not to include the i-bit words in the cover
    if (covered) then val2 := hatwork (n, i+1, false); if (val2 < val) then val := val2; fi; else
    # if the i-bit words were not covered by (i-1), they must be covered by the (i+1)-bit words
    if (i <= n) then val2 := hatwork (n, i+2, true) + binomial(n,i+1); if (val2 < val) then val := val2; fi; fi; fi; val; fi; end proc;
    A081374 := proc (n) hatwork(n, 0, false); end proc;
  • Mathematica
    LinearRecurrence[{2,0,-1,2},{1,2,2,5},40] (* Harvey P. Dale, Feb 11 2015 *)

Formula

If (n mod 6 = 5) then sum(binomial(n, 3*i+1), i=0..n/3); elif (n mod 6 = 2) then sum(binomial(n, 3*i), i=0..n/3)+1; else sum(binomial(n, 3*i), i=0..n/3); fi;
G.f.: x*(2*x^3-2*x^2+1)/( (1-2*x)*(1+x)*(1-x+x^2) ).
a(n)=2*a(n-1)-a(n-3)+2*a(n-4).
From Paul Curtz, May 26 2011: (Start)
a(n+1) - 2*a(n) has period length 6: repeat 0, -2, 1, 0, 2, -1 (see A080425).
a(n) - A083322(n-1) = A010892(n-1) has period length 6.
a(n) + a(n+3) = 3*2^n = A007283(n).
a(n+6)-a(n) = 21*2^n = A175805(n).
a(n) - A131708(n) = -A131531(n). (End)

A169969 Locations of row maxima in "crushed" version of Stern's diatomic array.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 21, 27, 43, 53, 85, 107, 171, 213, 341, 427, 683, 853, 1365, 1707, 2731, 3413, 5461, 6827, 10923, 13653, 21845, 27307, 43691, 54613, 87381, 109227, 174763, 218453, 349525, 436907, 699051, 873813, 1398101, 1747627, 2796203, 3495253, 5592405
Offset: 1

Views

Author

N. J. A. Sloane, Aug 08 2010

Keywords

Comments

From Michel Marcus, Jan 22 2015: (Start)
The Stern's diatomic array begins (see A049456).
1...............................1
1...............2...............1
1.......3.......2.......3.......1
1...4...3...5...2...5...3...4...1
1.5.4.7.3.8.5.7.2.7.5.8.3.7.4.5.1
...
The "crushed" version is obtained by removing the right column, and then squeezing everything to the left.
1;
1, 2;
1, 3, 2, 3;
1, 4, 3, 5, 2, 5, 3, 4;
1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5;
...
This gives sequence 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, ... (cf. A002487).
The "crushed" array row maxima are: 1, 2, 3, 5, 8, ... (cf. A000045).
The indices of these values in A002487 are 1, 3, 5, 7, 11, ... : this sequence.
Note, for instance, that for 3rd row, the maximum which is 3, appears twice, at indices 5 and 7, giving 2 terms for this sequence.
(End)

Examples

			G.f. = x + 3*x^2 + 5*x^3 + 7*x^4 + 11*x^5 + 13*x^6 + 21*x^7 + 27*x^8 + 43*x^9 + ...
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n <= 5, {1, 3, 5, 7, 11}[[n]], a[n-2] + 2a[n-4]]; Array[a, 42] (* Jean-François Alcover, Dec 11 2016 *)
  • PARI
    fusc(n)=local(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); b; \\ from A002487
    lista(nn) = {nb = 2^(nn+1)-1; vall = vector(nb, n, fusc(n)); for (n=1, nn, vmax = 0; for (j=2^(n-1), 2^n-1, if (vall[j] > vmax, vmax = vall[j]);); for (j=2^(n-1), 2^n-1, if (vall[j] == vmax, print1(j, ", "));););} \\ Michel Marcus, Jan 22 2015

Formula

a(2n+1) + a(2n+2) = 3*2^(n+1), n>0 . - Yosu Yurramendi, Jun 29 2016
a(2n+3) = 3*2^(n+1) - a(n); a(2n+4) = 3*2^(n+1) + a(n), n>=0, a(0)=0 (new term), a(1)=1, a(2)=3 . - Yosu Yurramendi, Jun 29 2016
G.f.: x*(1 + 3*x + 4*x^2 + 4*x^3 + 4*x^4)/((1 + x^2)*(1 - 2*x^2)). - Ilya Gutkovskiy, Jun 29 2016
For n>1, a(n) = (2^(n/2 - 1)*(5 + 4*sqrt(2) + (-1)^n*(5 - 4*sqrt(2))) + cos(Pi*n/2) + sin(Pi*n/2))/3. - Vaclav Kotesovec, Jun 30 2016
a(2n) = a(2n-7) + 3*2^(n-1); a(2n-1) = a(2n-7) - 3*2^(n-1), n>=5 . - Yosu Yurramendi, Jul 06 2016
a(2n-1) = A168642(n), n>0; a(2n) = A048573(n), n>0; a(2n-1) = A026644(n) + 1, n>1; a(2n) = A084170(n) + 1, n>0 . - Yosu Yurramendi, Dec 11 2016

Extensions

More terms from Michel Marcus, Jan 22 2015

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-10 of 15 results. Next