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

A033484 a(n) = 3*2^n - 2.

Original entry on oeis.org

1, 4, 10, 22, 46, 94, 190, 382, 766, 1534, 3070, 6142, 12286, 24574, 49150, 98302, 196606, 393214, 786430, 1572862, 3145726, 6291454, 12582910, 25165822, 50331646, 100663294, 201326590, 402653182, 805306366, 1610612734, 3221225470
Offset: 0

Views

Author

Keywords

Comments

Number of nodes in rooted tree of height n in which every node (including the root) has valency 3.
Pascal diamond numbers: reflect Pascal's n-th triangle vertically and sum all elements. E.g., a(3)=1+(1+1)+(1+2+1)+(1+1)+1. - Paul Barry, Jun 23 2003
Number of 2 X n binary matrices avoiding simultaneously the right-angled numbered polyomino patterns (ranpp) (00;1), (10;0) and (11;0). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1 < i2 and j1 < j2 and these elements are in the same relative order as those in the triple (x,y,z). - Sergey Kitaev, Nov 11 2004
Binomial and inverse binomial transform are in A001047 (shifted) and A122553. - R. J. Mathar, Sep 02 2008
a(n) = (Sum_{k=0..n-1} a(n)) + (2*n + 1); e.g., a(3) = 22 = (1 + 4 + 10) + 7. - Gary W. Adamson, Jan 21 2009
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if either 0) x is a proper subset of y or y is a proper subset of x and x and y are disjoint, or 1) x equals y. Then a(n) = |R|. - Ross La Haye, Mar 19 2009
Equals the Jacobsthal sequence A001045 convolved with (1, 3, 4, 4, 4, 4, 4, ...). - Gary W. Adamson, May 24 2009
Equals the eigensequence of a triangle with the odd integers as the left border and the rest 1's. - Gary W. Adamson, Jul 24 2010
An elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 58, 154, 178 and 184, lead to this sequence. For the corner squares these vectors lead to the companion sequence A097813. - Johannes W. Meijer, Aug 15 2010
a(n+2) is the integer with bit string "10" * "1"^n * "10".
a(n) = A027383(2n). - Jason Kimberley, Nov 03 2011
a(n) = A153893(n)-1 = A083416(2n+1). - Philippe Deléham, Apr 14 2013
a(n) = A082560(n+1,A000079(n)) = A232642(n+1,A128588(n+1)). - Reinhard Zumkeller, May 14 2015
a(n) is the sum of the entries in the n-th and (n+1)-st rows of Pascal's triangle minus 2. - Stuart E Anderson, Aug 27 2017
Also the number of independent vertex sets and vertex covers in the complete tripartite graph K_{n,n,n}. - Eric W. Weisstein, Sep 21 2017
Apparently, a(n) is the least k such that the binary expansion of A000045(k) ends with exactly n+1 ones. - Rémy Sigrist, Sep 25 2021
a(n) is the number of root ancestral configurations for a pair consisting of a matching gene tree and species tree with the modified lodgepole shape and n+1 cherry nodes. - Noah A Rosenberg, Jan 16 2025

Examples

			Binary: 1, 100, 1010, 10110, 101110, 1011110, 10111110, 101111110, 1011111110, 10111111110, 101111111110, 1011111111110, 10111111111110,
G.f. = 1 + 4*x + 10*x^2 + 22*x^3 + 46*x^4 + 94*x^5 + 190*x^6 + 382*x^7 + ...
		

References

  • J. Riordan, Series-parallel realization of the sum modulo 2 of n switching variables, in Claude Elwood Shannon: Collected Papers, edited by N. J. A. Sloane and A. D. Wyner, IEEE Press, NY, 1993, pp. 877-878.

Crossrefs

Programs

  • GAP
    List([0..35], n-> 3*2^n -2); # G. C. Greubel, Nov 18 2019
  • Haskell
    a033484 = (subtract 2) . (* 3) . (2 ^)
    a033484_list = iterate ((subtract 2) . (* 2) . (+ 2)) 1
    -- Reinhard Zumkeller, Apr 23 2013
    
  • Magma
    [3*2^n-2: n in [1..36]]; // Vincenzo Librandi, Nov 22 2010
    
  • Maple
    with(combinat):a:=n->stirling2(n,2)+stirling2(n+1,2): seq(a(n), n=1..35); # Zerinvary Lajos, Oct 07 2007
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=(a[n-1]+1)*2 od: seq(a[n], n=1..35); # Zerinvary Lajos, Feb 22 2008
  • Mathematica
    Table[3 2^n - 2, {n, 0, 35}] (* Vladimir Joseph Stephan Orlovsky, Dec 16 2008 *)
    (* Start from Eric W. Weisstein, Sep 21 2017 *)
    3*2^Range[0, 35] - 2
    LinearRecurrence[{3, -2}, {1, 4}, 36]
    CoefficientList[Series[(1+x)/(1-3x+2x^2), {x, 0, 35}], x] (* End *)
  • PARI
    a(n) = 3<Charles R Greathouse IV, Nov 02 2011
    
  • Sage
    [3*2^n -2 for n in (0..35)] # G. C. Greubel, Nov 18 2019
    

Formula

G.f.: (1+x)/(1-3*x+2*x^2).
a(n) = 2*(a(n-1) + 1) for n>0, with a(0)=1.
a(n) = A007283(n) - 2.
G.f. is equivalent to (1-2*x-3*x^2)/((1-x)*(1-2*x)*(1-3*x)). - Paul Barry, Apr 28 2004
From Reinhard Zumkeller, Oct 09 2004: (Start)
A099257(a(n)) = A099258(a(n)) = a(n).
a(n) = 2*A055010(n) = (A068156(n) - 1)/2. (End)
Row sums of triangle A130452. - Gary W. Adamson, May 26 2007
Row sums of triangle A131110. - Gary W. Adamson, Jun 15 2007
Binomial transform of (1, 3, 3, 3, ...). - Gary W. Adamson, Oct 17 2007
Row sums of triangle A051597 (a triangle generated from Pascal's rule given right and left borders = 1, 2, 3, ...). - Gary W. Adamson, Nov 04 2007
Equals A132776 * [1/1, 1/2, 1/3, ...]. - Gary W. Adamson, Nov 16 2007
a(n) = Sum_{k=0..n} A112468(n,k)*3^k. - Philippe Deléham, Feb 23 2014
a(n) = -(2^n) * A036563(1-n) for all n in Z. - Michael Somos, Jul 04 2017
E.g.f.: 3*exp(2*x) - 2*exp(x). - G. C. Greubel, Nov 18 2019

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

Original entry on oeis.org

2, 5, 11, 23, 47, 95, 191, 383, 767, 1535, 3071, 6143, 12287, 24575, 49151, 98303, 196607, 393215, 786431, 1572863, 3145727, 6291455, 12582911, 25165823, 50331647, 100663295, 201326591, 402653183, 805306367, 1610612735, 3221225471
Offset: 0

Views

Author

Keywords

Comments

A020944(a(n)) = 0. - Reinhard Zumkeller, Mar 13 2011
a(n) + a(n-1)^2 is a perfect square. - Vincenzo Librandi, Oct 28 2011
Number of distinct continued fractions of n terms chosen from {1,2}. - Clark Kimberling, Jul 20 2015
Also, the decimal representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 643", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. See A283508. - Robert Price, Mar 09 2017
This sequence has been used by the ninth-century mathematician Thabit ibn Qurra to devise the first method to construct amicable pairs (see Tattersall). - Stefano Spezia, Jul 18 2025

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 138.

Crossrefs

Cf. A283508.

Programs

Formula

a(n) = a(n-1)*2 + 1, a(0)=2.
a(n) = A083329(n+1).
a(n) = A055010(n+1).
G.f.: (2 - x)/((1-x)(1-2x)). - R. J. Mathar, Feb 13 2009
a(n) = A083416(2n) = A033484(n) + 1. - Philippe Deléham, Apr 14 2013
From G. C. Greubel, Sep 01 2016: (Start)
a(n) = 3*a(n-1) - 2*a(n-2).
E.g.f.: 3*exp(2*x) - exp(x). (End)

Extensions

Edited by N. J. A. Sloane, Feb 14 2009

A075427 a(0) = 1; a(n) = a(n-1)+1 if n is even, otherwise a(n) = 2*a(n-1).

Original entry on oeis.org

1, 2, 3, 6, 7, 14, 15, 30, 31, 62, 63, 126, 127, 254, 255, 510, 511, 1022, 1023, 2046, 2047, 4094, 4095, 8190, 8191, 16382, 16383, 32766, 32767, 65534, 65535, 131070, 131071, 262142, 262143, 524286, 524287, 1048574, 1048575, 2097150, 2097151, 4194302, 4194303, 8388606
Offset: 0

Views

Author

Reinhard Zumkeller, Sep 15 2002

Keywords

Comments

Fixed points for permutations A180200, A180201, A180198, and A180199. - Reinhard Zumkeller, Aug 15 2010
The Kn22 sums, see A180662, of triangle A194005 equal the terms of this sequence. - Johannes W. Meijer, Aug 16 2011

Crossrefs

Cf. A075426, A066880, A083416, A000225 (bisection), A000918 (bisection).

Programs

  • Haskell
    a075427 n = a075427_list !! n
    a075427_list = 1 : f 1 1 where
       f x y = z : f (x + 1) z where z = (1 + x `mod` 2) * y + 1 - x `mod` 2
    -- Reinhard Zumkeller, Feb 27 2012
    
  • Magma
    [2^Floor((n+3)/2)-3/2+(-1)^n/2: n in [0..30]]; // Vincenzo Librandi, Aug 17 2011
    
  • Maple
    A075427 := proc(n) if type(n,'even') then 2^(n/2+1)-1 ; else 2^(1+(n+1)/2)-2 ; end if; end proc: seq(A075427(n), n=0..40); # R. J. Mathar, Feb 18 2011
    isA := proc(n) convert(n, base, 2): 1 - %[1] = nops(%) - add(%) end:
    select(isA, [$1..4095]); # Peter Luschny, Oct 27 2022
  • Mathematica
    a[0]=1; a[n_]:=a[n]=If[EvenQ[n],a[n-1]+1,2*a[n-1]]; Table[a[n],{n,0,40}] (* Jean-François Alcover, Mar 20 2011 *)
    nxt[{n_,a_}]:={n+1,If[OddQ[n],a+1,2a]}; Transpose[NestList[nxt,{0,1},40]][[2]] (* or *) LinearRecurrence[{0,3,0,-2},{1,2,3,6},50] (* Harvey P. Dale, Mar 12 2016 *)
  • PARI
    a(n)=2^((n+3)\2)-3/2+(-1)^n/2 \\ Charles R Greathouse IV, Feb 06 2017
    
  • Python
    def A075427(n): return (1<<(n>>1)+2)-2 if n&1 else (1<<(n>>1)+1)-1 # Chai Wah Wu, Apr 23 2023

Formula

a(0) = 1; for n >= 1, a(2*n) = 2^(n+1)-1, a(2*n-1) = 2^(n+1)-2; a(n) = 2^floor((n+3)/2) - 3/2 + (-1)^n/2. - Benoit Cloitre, Sep 17 2002 [corrected by Robert FERREOL, Jan 26 2011]
a(n) = (-1)^n/2 - 3/2 + 2^(n/2)*(1 + sqrt(2) + (1-sqrt(2))*(-1)^n). - Paul Barry, Apr 22 2004
From Paul Barry, Jul 30 2004: (Start)
Interleaved Mersenne numbers: interleaves 2*2^n-1 and 2(2*2^n-1) (A000225(n+1) and 2*A000225(n+1)).
G.f.: (1+2*x)/((1-x^2)*(1-2*x^2));
a(n) = 3*a(n-2) - 2*a(n-4);
a(n) = Sum_{k=0..n} binomial(floor((n+1)/2), floor((k+1)/2)). (End)
For n > 0: a(n) = (1 + n mod 2) * a(n-1) + 1 - (n mod 2). - Reinhard Zumkeller, Feb 27 2012
E.g.f.: 2*(cosh(sqrt(2)*x) - sinh(x) + sqrt(2)*sinh(sqrt(2)*x)) - cosh(x). - Stefano Spezia, Jul 11 2023
From Alois P. Heinz, Dec 27 2023: (Start)
a(n) = 2^floor((n+3)/2)-1-(n mod 2).
a(n) = A066880(n) for n>=1. (End)

Extensions

Formulae corrected and minor edits by Johannes W. Meijer, Aug 16 2011

A094025 Expansion of (1+3x)/((1-x^2)(1-3x^2)).

Original entry on oeis.org

1, 3, 4, 12, 13, 39, 40, 120, 121, 363, 364, 1092, 1093, 3279, 3280, 9840, 9841, 29523, 29524, 88572, 88573, 265719, 265720, 797160, 797161, 2391483, 2391484, 7174452, 7174453, 21523359, 21523360, 64570080, 64570081, 193710243, 193710244
Offset: 0

Views

Author

Paul Barry, Apr 22 2004

Keywords

Comments

Add 1, triple, add 1, triple, ... (of course this is simply a restatement of one of Philippe Deléham's formulas). - Jon Perry, Aug 11 2014

Crossrefs

Formula

a(n)=4a(n-2)-3a(n-4); a(n)=3*3^(n/2)(1/4+sqrt(3)/4+(1/4-sqrt(3)/4)(-1)^n)+(-1)^n/2-1.
a(n) = a(n-1)*3 if n odd; a(n) = a(n-1)+1 if n even. - Philippe Deléham, Apr 22 2013
a(2n) = A003462(n+1); a(2n+1) = A123109(n+1) = A029858(n+1). - Philippe Deléham, Apr 22 2013

A099942 Start with 1, then alternately double or add 2.

Original entry on oeis.org

1, 2, 4, 8, 10, 20, 22, 44, 46, 92, 94, 188, 190, 380, 382, 764, 766, 1532, 1534, 3068, 3070, 6140, 6142, 12284, 12286, 24572, 24574, 49148, 49150, 98300, 98302, 196604, 196606, 393212, 393214, 786428, 786430, 1572860, 1572862, 3145724, 3145726
Offset: 0

Views

Author

N. J. A. Sloane, Nov 12 2004

Keywords

Crossrefs

Programs

  • Magma
    [3*2^Ceiling(n/2) + (-1)^n - 3: n in [0..50]]; // Vincenzo Librandi, Aug 17 2011
  • Mathematica
    LinearRecurrence[{0,3,0,-2},{1,2,4,8},50] (* Harvey P. Dale, May 03 2016 *)
  • PARI
    print1(a=1,",");for(n=1,20,print1(a=2*a,",",a=a+2,","))
    

Formula

a(0)=1; for n > 0, a(n) = a(n-1)*(1 + n mod 2) + 2*((n+1) mod 2).
G.f.: (2*x^3 + x^2 + 2*x + 1)/(2*x^4 - 3*x^2 + 1).
3*2^ceiling(n/2) + (-1)^n - 3. - Ralf Stephan, Dec 04 2004
a(2*n) = A033484(n).
a(n-1) + a(n) = A061776(n) for n > 0.
E.g.f.: -2*cosh(x) + 3*cosh(sqrt(2)*x) - 4*sinh(x) + 3*sqrt(2)*sinh(sqrt(2)*x). - Franck Maminirina Ramaharo, Nov 08 2018

Extensions

Edited and extended by Klaus Brockhaus, Nov 13 2004

A220753 Expansion of (1+4*x+5*x^2-x^3)/((1-x)*(1+x)*(1-2*x^2)).

Original entry on oeis.org

1, 4, 8, 11, 22, 25, 50, 53, 106, 109, 218, 221, 442, 445, 890, 893, 1786, 1789, 3578, 3581, 7162, 7165, 14330, 14333, 28666, 28669, 57338, 57341, 114682, 114685, 229370, 229373, 458746, 458749, 917498, 917501, 1835002, 1835005, 3670010, 3670013
Offset: 0

Views

Author

Philippe Deléham, Apr 13 2013

Keywords

Crossrefs

Programs

  • Magma
    m:=41; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+4*x+5*x^2-x^3)/((1-x)*(1+x)*(1-2*x^2)))); // Bruno Berselli, Apr 13 2013
  • Mathematica
    Table[7 2^Floor[n/2] - (3/2) (3 + (-1)^n), {n, 0, 40}] (* Bruno Berselli, Apr 13 2013 *)
    LinearRecurrence[{0, 3, 0, -2}, {1, 4, 8, 11}, 40] (* T. D. Noe, Apr 17 2013 *)

Formula

G.f.: (1+4*x+5*x^2-x^3)/((1-x)*(1+x)*(1-2*x^2)).
a(2n) = 7*2^n - 6 = A048489(n) = A063757(2n) = A005009(n)-6.
a(2n+1) = 7*2^n - 3 = A048489(n) + 3 = A063757(2n+1) - 3*A000225(n) = A005009(n)-3.
a(n) = a(n-1)*2 if n even.
a(n) = a(n-1)+3 if n odd.
a(n) = 3*a(n-2) - 2*a(n-4) with a(0)=1, a(1)=4, a(2)=8, a(3)=11.
a(n) = 7*2^floor(n/2) - (3/2)*(3+(-1)^n).
a(n) = A047290(A083416(n+1)). [Bruno Berselli, Apr 13 2013]
Showing 1-6 of 6 results.