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

A008776 Pisot sequences E(2,6), L(2,6), P(2,6), T(2,6).

Original entry on oeis.org

2, 6, 18, 54, 162, 486, 1458, 4374, 13122, 39366, 118098, 354294, 1062882, 3188646, 9565938, 28697814, 86093442, 258280326, 774840978, 2324522934, 6973568802, 20920706406, 62762119218, 188286357654, 564859072962, 1694577218886, 5083731656658, 15251194969974
Offset: 0

Views

Author

Keywords

Comments

Definitions of Pisot and related sequences:
Pisot sequence E(x, y): a(0) = x, a(1) = y, a(n) = floor(a(n-1)^2/a(n-2) + 1/2) = nearest integer to a(n-1)^2/a(n-2), with 0 < x < y.
Pisot sequence L(x, y): a(0) = x, a(1) = y, a(n) = ceiling(a(n-1)^2/a(n-2)).
Pisot sequence P(x, y): a(0) = x, a(1) = y, a(n) = ceiling(a(n-1)^2/a(n-2) - 1/2).
Pisot sequence T(x, y): a(0) = x, a(1) = y, a(n) = floor(a(n-1)^2/a(n-2)).
Pisot/Shallit sequence S(x, y): a(0) = x, a(1) = y, a(n) = floor(a(n-1)^2/a(n-2)+1).
A025192 is the main entry for the sequence of numbers 2*3^n.
Number of tilings of a 4 X (4n+4) rectangle into T tetrominoes.
Numbers n such that 3^n = n/2 mod n. Cf. A066601 3^n mod n. - Zak Seidov, Aug 26 2006, Nov 20 2008
For n >= 1, a(n) is equal to the number of functions f:{1,2...,n}->{1,2,3} such that for a fixed x in {1,2,...,n} and a fixed y in {1,2,3} we have f(x) != y. - Aleksandar M. Janjic and Milan Janjic, Mar 27 2007
a(n+1) is the number of compositions of n when there are 2 types of each natural number. - Milan Janjic, Aug 13 2010
2*Sum_{n>=2} 1/A083667(n) = 2*Sum_{n>=2} 2^(-n)*3^(-((n*(n-1))/2)) = Sum_{n>=1} 1/Product_{k=1..n} A008776(k) = Sum_{n>=1} 1/Product_{k=1..n} 2*3^k = 0.17609845431233461692099660022134... . - Alexander R. Povolotsky, Aug 08 2011
Number of monic squarefree polynomials over F_3 of degree n+1. - Charles R Greathouse IV, Feb 07 2012
a(n) is the sum of the elements of the n-th power of the matrix {{1, 2}, {2, 1}}. - Griffin N. Macris, Mar 25 2016
Let D(m) denote the set of divisors of a number m, and consider s1(m) and s2(m) the sums of those divisors that are congruent to 1 and 2 (mod 3) respectively. This sequence lists the numbers m such that s1(m) = 1 and s2(m) = 2. - Michel Lagneau, Feb 09 2017
a(n) is the multiplicative order of k modulo 3^(n+1), where k is any number congruent to 2 or 5 modulo 9. Note that for n > 0, k is a primitive root modulo 3^(n+1) if and only if k == 2, 5 (mod 9). - Jianing Song, Apr 20 2021

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (see p. 203).

Crossrefs

Apart from initial term, same as A025192.
Cf. A080643.
Cf. A000244.

Programs

  • GAP
    List([0..30], n-> 2*3^n); # G. C. Greubel, Sep 11 2019
    
  • Haskell
    a008776 = (* 2) . (3 ^)
    a008776_list = iterate (* 3) 2  -- Reinhard Zumkeller, Oct 19 2015
    
  • Magma
    [2*3^n: n in [0..30]]; // G. C. Greubel, Sep 11 2019
    
  • Maple
    # E(x,y) is f(n,x,y,1/2), T(x,y) is f(n,x,y,0), and S(x,y) is f(n,x,y,1).
    f:=proc(n,x,y,r) option remember;
    if n=0 then x
    elif n=1 then y
    else floor(f(n-1,x,y,r)^2/f(n-2,x,y,r) + r); fi; end;
    [seq(f(n,2,6,1/2),n=0..30)];
    # N. J. A. Sloane, Jul 30 2016
  • Mathematica
    Table[EulerPhi[3^n], {n, 0, 100}] (* Artur Jasinski, Nov 19 2008 *)
    Table[MatrixPower[{{1,2},{1,2}},n][[1]][[2]],{n,0,44}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    NestList[3#&,2,50] (* Harvey P. Dale, Nov 28 2022 *)
  • PARI
    a(n)=3^n<<1 \\ corrected by Michel Marcus, Aug 03 2015
    
  • Python
    def A008776(n): return 3**n<<1 # Chai Wah Wu, Apr 02 2025
  • Sage
    [2*3^n for n in (0..30)] # G. C. Greubel, Sep 11 2019
    

Formula

a(n) = 2*3^n.
a(n) = 3*a(n-1).
G.f.: 2/(1-3*x). - Philippe Deléham, Oct 08 2007
a(n-1) = phi(3^n). - Artur Jasinski, Nov 19 2008
E.g.f.: 2*exp(3*x). - Mohammad K. Azarian, Jan 15 2009
From Paul Curtz, Jan 20 2009: (Start)
a(n) = A048473(n) + 1.
a(n) = A052919(n+1)-1.
a(n) = A115099(n) - 2.
a(n) = A100774(n) + 2. (End)
If p[i]=2, (i >= 1), and if A is Hessenberg matrix of order n defined by: A[i,j] = p[j-i+1], (i <= j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n >= 1, a(n-1)=det A. - Milan Janjic, Apr 29 2010
G.f.: ((1/2)/G(0)-1)/x^2 where G(k) = 1 - 2^k/(2 - 4*x/(2*x - 2^k/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 22 2012
G.f.: -G(0)/x where G(k) = 1 - 1/(1-2*x)/(1-x/(x-1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 25 2013
G.f.: (1 - 1/Q(0))/x where Q(k) = 1 - x*(2*k-2)/(1 - x*(2*k+5)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Mar 19 2013
G.f.: W(0), where W(k) = 1 + 1/(1 - x*(2*k+3)/(x*(2*k+4) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 28 2013

Extensions

Jasinski formula corrected by Charles R Greathouse IV, Feb 18 2011

A052548 a(n) = 2^n + 2.

Original entry on oeis.org

3, 4, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610, 16777218, 33554434, 67108866, 134217730, 268435458, 536870914, 1073741826, 2147483650
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

The most "compact" sequence that satisfies Bertrand's Postulate. Begin with a(1) = 3 = n, then 2n - 2 = 4 = n_1, 2n_1 - 2 = 6 = n_2, 2n_2 - 2 = 10, etc. = a(n), hence there is guaranteed to be at least one prime between successive members of the sequence. - Andrew S. Plewe, Dec 11 2007
Number of 2-sided prudent polygons of area n, for n>0, see Beaton, p. 5. - Jonathan Vos Post, Nov 30 2010

Crossrefs

Programs

  • Haskell
    a052548 = (+ 2) . a000079
    a052548_list = iterate ((subtract 2) . (* 2)) 3
    -- Reinhard Zumkeller, Sep 05 2015
  • Magma
    [2^n + 2: n in [0..35]]; // Vincenzo Librandi, Apr 29 2011
    
  • Maple
    spec := [S,{S=Union(Sequence(Union(Z,Z)),Sequence(Z),Sequence(Z))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    2^Range[0,40]+2 (* Harvey P. Dale, Jun 26 2012 *)
  • PARI
    a(n)=1<Charles R Greathouse IV, Nov 20 2011
    

Formula

G.f.: (3-5*x)/((1-2*x)*(1-x)) = (3-5*x)/(1 - 3*x + 2*x^2) = 2/(1-x) + 1/(1-2*x).
a(0)=3, a(1)=4, a(n) = 3*a(n-1) - 2*a(n-2).
a(n) = A058896(n)/A000918(n), for n>0. - Reinhard Zumkeller, Feb 14 2009
a(n) = A173786(n,1), for n>0. - Reinhard Zumkeller, Feb 28 2010
a(n)*A000918(n) = A028399(2*n), for n>0. - Reinhard Zumkeller, Feb 28 2010
a(0)=3, a(n) = 2*a(n-1) - 2. - Vincenzo Librandi, Aug 06 2010
E.g.f.: (2 + exp(x))*exp(x). - Ilya Gutkovskiy, Aug 16 2016

Extensions

More terms from James Sellers, Jun 06 2000

A058481 a(n) = 3^n - 2.

Original entry on oeis.org

1, 7, 25, 79, 241, 727, 2185, 6559, 19681, 59047, 177145, 531439, 1594321, 4782967, 14348905, 43046719, 129140161, 387420487, 1162261465, 3486784399, 10460353201, 31381059607, 94143178825, 282429536479, 847288609441
Offset: 1

Views

Author

Vladeta Jovovic, Nov 26 2000

Keywords

Comments

a(n) = number of 2 X n binary matrices with no zero rows or columns.
a(n)^2 + 2*a(n+1) + 1 is a square number, i.e., a(n)^2 + 2*a(n+1) + 1 = (a(n)+3)^2: for n=2, a(2)^2 + 2*a(3) + 1 = 7^2 + 2*25 + 1 = 100 = (7+3)^2; for n=3, a(3)^2 + 2*a(4) + 1 = 25^2 + 2*79 + 1 = 784 = (25+3)^2. - Bruno Berselli, Apr 23 2010
Sum of n-th row of triangle of powers of 3: 1; 3 1 3; 9 3 1 3 9; 27 9 3 1 3 9 27; ... . - Philippe Deléham, Feb 24 2014
a(n) = least k such that k*3^n + 1 is a square. Thus, the square is given by (3^n-1)^2. - Derek Orr, Mar 23 2014
Binomial transform of A058481: (1, 6, 12, 24, 48, 96, ...) and second binomial transform of (1, 5, 1, 5, 1, 5, ...). - Gary W. Adamson, Aug 24 2016
Number of ordered pairs of nonempty sets whose union is [n]. a(2) = 7: ({1,2},{1,2}), ({1,2},{1}), ({1,2},{2}), ({1},{1,2}), ({1},{2}), ({2},{1,2}), ({2},{1}). If "nonempty" is omitted we get A000244. - Manfred Boergens, Mar 29 2023

Examples

			G.f. = x + 7*x^2 + 25*x^3 + 79*x^4 + 241*x^5 + 727*x^6 + 2185*x^7 + 6559*x^8 + ...
a(1) = 1;
a(2) = 3 + 1 + 3 = 7;
a(3) = 9 + 3 + 1 + 3 + 9 = 25;
a(4) = 27 + 9 + 3 + 1 + 3 + 9 + 27 = 79; etc. - _Philippe Deléham_, Feb 24 2014
		

Crossrefs

Programs

Formula

Number of m X n binary matrices with no zero rows or columns is Sum_{j=0..m} (-1)^j*C(m, j)*(2^(m-j)-1)^n.
From Mohammad K. Azarian, Jan 14 2009: (Start)
G.f.: 1/(1-3*x)-2/(1-x)+1.
E.g.f.: e^(3*x)-2*(e^x)+1. (End)
a(n) = 3*a(n-1) + 4 (with a(1)=1). - Vincenzo Librandi, Aug 07 2010
a(n) = 4*a(n-1) - 3*a(n-2). - G. C. Greubel, Aug 25 2016

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Dec 04 2000

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

Original entry on oeis.org

0, 4, 16, 52, 160, 484, 1456, 4372, 13120, 39364, 118096, 354292, 1062880, 3188644, 9565936, 28697812, 86093440, 258280324, 774840976, 2324522932, 6973568800, 20920706404, 62762119216, 188286357652, 564859072960, 1694577218884
Offset: 0

Views

Author

Pawel P. Mazur (Pawel.Mazur(AT)pwr.wroc.pl), Apr 06 2005

Keywords

Comments

a(n) is the number of steps which are made when generating all n-step nonreversing random walks that begin in a fixed point P on a two-dimensional square lattice. To make one step means to move along one edge on the lattice.
These are also the first local maxima reached in the Collatz trajectories of 2^n - 1. - David Rabahy, Oct 30 2017
Also the graph diameter of the n-Sierpinski carpet graph. - Eric W. Weisstein, Mar 13 2018
a(n) is the number of edge covers of F_{n,2}, which has adjacent vertices u and w, and n vertices each adjacent to both u and w. An edge cover is a subset of the edges where each vertex is adjacent to at least one vertex. To cover each of the n vertices v_i, we need to have at least the edge uv_i or wv_i or both, giving us three choices for each. We can then add the edge uw or not, which is 2*3^n choices. But we need to remove the case where all uv_i's were chosen and uw not chosen, and all ww_i's were chosen and uw not chosen. - Feryal Alayont, Jun 17 2024

Crossrefs

Programs

Formula

a(n) = 2*(3^n - 1).
a(n) = 4*Sum_{i=0..n-1} 3^i.
a(n) = 4*A003462(n).
a(n) = A048473(n) - 1. - Paul Curtz, Jan 19 2009
G.f.: 4*x/((1-x)*(1-3*x)). - Eric W. Weisstein, Mar 13 2018
a(n) = 4*a(n-1) - 3*a(n-2). - Eric W. Weisstein, Mar 13 2018
From Elmo R. Oliveira, Dec 06 2023: (Start)
a(n) = 2*A024023(n).
a(n) = 3*a(n-1) + 4 for n>0.
E.g.f.: 2*(exp(3*x) - exp(x)). (End)

A309010 Square array A(n, k) = Sum_{j=0..n} binomial(n,j)^k, n >= 0, k >= 0, read by antidiagonals.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 4, 4, 1, 2, 6, 8, 5, 1, 2, 10, 20, 16, 6, 1, 2, 18, 56, 70, 32, 7, 1, 2, 34, 164, 346, 252, 64, 8, 1, 2, 66, 488, 1810, 2252, 924, 128, 9, 1, 2, 130, 1460, 9826, 21252, 15184, 3432, 256, 10, 1, 2, 258, 4376, 54850, 206252, 263844, 104960, 12870, 512, 11
Offset: 0

Views

Author

Seiichi Manyama, Jul 06 2019

Keywords

Comments

A(n,k) is the constant term in the expansion of (Product_{j=1..k-1} (1 + x_j) + Product_{j=1..k-1} (1 + 1/x_j))^n for k > 0. - Seiichi Manyama, Oct 27 2019
Let B_k be the binomial poset containing all k-tuples of equinumerous subsets of {1,2,...} ordered by inclusion componentwise (described in Stanley reference below). Then A(k,n) is the number of elements in any n-interval of B_k. - Geoffrey Critzer, Apr 16 2020
Column k is the diagonal of the rational function 1 / (Product_{j=1..k} (1-x_j) - Product_{j=1..k} x_j) for k>0. - Seiichi Manyama, Jul 11 2020

Examples

			Square array, A(n, k), begins:
   1,  1,   1,    1,     1,      1, ... A000012;
   2,  2,   2,    2,     2,      2, ... A007395;
   3,  4,   6,   10,    18,     34, ... A052548;
   4,  8,  20,   56,   164,    488, ... A115099;
   5, 16,  70,  346,  1810,   9826, ...
   6, 32, 252, 2252, 21252, 206252, ...
Antidiagonals, T(n, k), begin:
  1;
  1,  2;
  1,  2,   3;
  1,  2,   4,    4;
  1,  2,   6,    8,    5;
  1,  2,  10,   20,   16,     6;
  1,  2,  18,   56,   70,    32,     7;
  1,  2,  34,  164,  346,   252,    64,    8;
  1,  2,  66,  488, 1810,  2252,   924,  128,   9;
  1,  2, 130, 1460, 9826, 21252, 15184, 3432, 256,  10;
		

References

  • R. P. Stanley, Enumerative Combinatorics Vol I, Second Edition, Cambridge, 2011, Example 3.18.3 d, page 366.

Crossrefs

Programs

  • Magma
    [(&+[Binomial(k,j)^(n-k): j in [0..k]]): k in [0..n], n in [0..12]]; // G. C. Greubel, Aug 26 2022
    
  • Mathematica
    nn = 8; Table[ek[x_] := Sum[x^n/n!^k, {n, 0, nn}];Range[0, nn]!^k CoefficientList[Series[ek[x]^2, {x, 0, nn}],x], {k, 0, nn}] // Transpose // Grid (* Geoffrey Critzer, Apr 17 2020 *)
  • PARI
    A(n, k) = sum(j=0, n, binomial(n, j)^k); \\ Seiichi Manyama, Jan 08 2022
    
  • SageMath
    flatten([[sum(binomial(k,j)^(n-k) for j in (0..k)) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Aug 26 2022

Formula

A(n, k) = Sum_{j=0..n} binomial(n,j)^k (array).
A(n, n+1) = A328812(n).
A(n, n) = A167010(n).
T(n, k) = A(k, n-k) (antidiagonals).
T(n, n) = A000027(n+1).
T(n, n-1) = A000079(n-1).
T(n, n-2) = A000984(n-2).
T(n, n-3) = A000172(n-3).
T(n, n-4) = A005260(n-4).
T(n, n-5) = A005261(n-5).
T(n, n-6) = A069865(n-6).
T(n, n-7) = A182421(n-7).
T(n, n-8) = A182422(n-8).
T(n, n-9) = A182446(n-9).
T(n, n-10) = A182447(n-10).
T(n, n-11) = A342294(n-11).
T(n, n-12) = A342295(n-12).
Sum_{n>=0} A(n,k) x^n/(n!^k) = (Sum_{n>=0} x^n/(n!^k))^2. - Geoffrey Critzer, Apr 17 2020

A205318 T(n,k)=Number of (n+1)X(k+1) 0..1 arrays with every 2X2 subblock having the same number of equal edges, and new values 0..1 introduced in row major order.

Original entry on oeis.org

8, 20, 20, 56, 84, 56, 164, 376, 376, 164, 488, 1708, 2606, 1708, 488, 1460, 7784, 18152, 18152, 7784, 1460, 4376, 35500, 126536, 193664, 126536, 35500, 4376, 13124, 161928, 882182, 2068148, 2068148, 882182, 161928, 13124, 39368, 738636, 6150512
Offset: 1

Views

Author

R. H. Hardin Jan 25 2012

Keywords

Comments

Table starts
.....8.....20.......56........164..........488..........1460............4376
....20.....84......376.......1708.........7784.........35500..........161928
....56....376.....2606......18152.......126536........882182.........6150512
...164...1708....18152.....193664......2068148......22091516.......235994088
...488...7784...126536....2068148.....33865634.....554916092......9094954742
..1460..35500...882182...22091516....554916092...13956665238....351210375464
..4376.161928..6150512..235994088...9094954742..351210375464..13574876544398
.13124.738636.42881096.2521075824.149077423220.8839958693704.524918733085720

Examples

			Some solutions for n=4 k=3
..0..1..1..0....0..0..1..0....0..0..1..0....0..0..1..0....0..1..0..0
..1..1..0..0....0..1..1..1....1..1..1..1....0..1..1..1....1..1..0..1
..0..0..0..1....1..1..0..1....0..1..0..1....0..0..0..0....1..0..0..1
..0..1..1..1....1..0..0..1....0..1..0..0....1..0..1..0....0..0..1..1
..0..1..0..0....1..1..0..1....0..1..1..0....0..0..0..0....0..1..1..0
		

Crossrefs

Column 1 is A115099.

Formula

Empirical for column k:
k=1: a(n) = 4*a(n-1) -3*a(n-2)
k=2: a(n) = 6*a(n-1) -7*a(n-2) +2*a(n-3)
k=3: a(n) = 10*a(n-1) -24*a(n-2) +21*a(n-3) -6*a(n-4)
k=4: a(n) = 17*a(n-1) -81*a(n-2) +157*a(n-3) -140*a(n-4) +56*a(n-5) -8*a(n-6)
k=5: a(n) = 31*a(n-1) -321*a(n-2) +1569*a(n-3) -4179*a(n-4) +6420*a(n-5) -5671*a(n-6) +2668*a(n-7) -516*a(n-8)
k=6: (order 14 recurrence)
k=7: (order 20 recurrence)

A208085 T(n,k)=Number of (n+1)X(k+1) 0..1 arrays with every 2X2 subblock having the same number of equal edges as its horizontal neighbors and a different number from its vertical neighbors, and new values 0..1 introduced in row major order.

Original entry on oeis.org

8, 20, 12, 56, 20, 24, 164, 32, 56, 36, 488, 52, 134, 60, 72, 1460, 84, 344, 96, 168, 108, 4376, 136, 888, 156, 402, 180, 216, 13124, 220, 2318, 252, 1032, 288, 504, 324, 39368, 356, 6056, 408, 2664, 468, 1206, 540, 648, 118100, 576, 15848, 660, 6954, 756, 3096
Offset: 1

Views

Author

R. H. Hardin Feb 23 2012

Keywords

Comments

Table starts
...8..20...56..164..488..1460..4376..13124..39368.118100..354296.1062884
..12..20...32...52...84...136...220....356....576....932....1508....2440
..24..56..134..344..888..2318..6056..15848..41478.108584..284264..744206
..36..60...96..156..252...408...660...1068...1728...2796....4524....7320
..72.168..402.1032.2664..6954.18168..47544.124434.325752..852792.2232618
.108.180..288..468..756..1224..1980...3204...5184...8388...13572...21960
.216.504.1206.3096.7992.20862.54504.142632.373302.977256.2558376.6697854
.324.540..864.1404.2268..3672..5940...9612..15552..25164...40716...65880

Examples

			Some solutions for n=4 k=3
..0..1..0..0....0..1..0..1....0..0..0..0....0..1..1..1....0..0..0..0
..0..1..0..1....0..0..0..0....1..1..1..1....0..1..0..1....1..0..1..0
..1..0..1..0....0..0..0..0....1..1..1..1....1..0..1..0....0..1..0..1
..1..0..1..0....1..0..1..0....1..0..1..0....1..0..1..0....0..0..0..0
..0..1..0..1....0..1..0..1....0..1..0..1....0..1..0..1....0..0..0..0
		

Crossrefs

Column 1 is A153339(n+2).
Row 1 is A115099.
Row 2 is A022087(n+3).
Row 4 is A022346(n+3).

Formula

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

A198635 Total number of round trips, each of length 2*n on the graph P_5 (o-o-o-o-o).

Original entry on oeis.org

5, 8, 20, 56, 164, 488, 1460, 4376, 13124, 39368, 118100, 354296, 1062884, 3188648, 9565940, 28697816, 86093444, 258280328, 774840980, 2324522936, 6973568804, 20920706408, 62762119220, 188286357656, 564859072964, 1694577218888, 5083731656660, 15251194969976
Offset: 0

Views

Author

Wolfdieter Lang, Nov 02 2011

Keywords

Comments

See the array and triangle A198632 for the general case for the graph P_N (there N is n and the length is l = 2*k).

Examples

			With the graph P_5 as 1-2-3-4-5:
n=0: 5, from the length 0 walks starting at 1,2,3,4 and 5.
n=1: 8, from the walks of length 2, namely 121, 212, 232, 323, 343, 434, 454 and 545.
		

Crossrefs

Essentially the same as A115099.

Programs

Formula

a(n) = w(5,2*n), n >= 0, with w(5,l) the total number of closed walks on the graph P_5 (the simple path with 5 points (vertices) and 4 lines (or edges)).
O.g.f. for w(5,l) (with zeros for odd l): y*(d/dy)S(5,y)/S(5,y) with y = 1/x and Chebyshev S-polynomials (coefficients A049310). See also A198632 for a rewritten form.
G.f.: (5-12*x+3*x^2)/(1-4*x+3*x^2). - Colin Barker, Jan 02 2012
a(n) = 3*a(n-1) - 4, n > 1. - Vincenzo Librandi, Jan 02 2012
a(n) = 2*3^n + 2 for n > 0. - Andrew Howroyd, Mar 18 2017
a(n) = 2*A034472(n) for n > 0. - Andrew Howroyd, Mar 18 2017

A079004 Least x>=3 such that F(x)==1 (mod 3^n) where F(x) denotes the x-th Fibonacci number (A000045).

Original entry on oeis.org

7, 10, 10, 34, 106, 322, 970, 2914, 8746, 26242, 78730, 236194, 708586, 2125762, 6377290, 19131874, 57395626, 172186882, 516560650, 1549681954, 4649045866, 13947137602, 41841412810, 125524238434, 376572715306, 1129718145922
Offset: 1

Views

Author

Benoit Cloitre, Feb 01 2003

Keywords

References

  • R. L. Graham, D. E. Knuth and O. Patashnick, "Concrete Mathematics", second edition, Addison Wesley, ex. 6.59.

Crossrefs

Programs

  • Maple
    7, 10, seq(4*3^(n-2)-2,n=3..50); # Robert Israel, Jan 15 2015
  • Mathematica
    a=2;lst={7,10};Do[a=a*3+4;AppendTo[lst,a],{n,0,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 25 2008 *)
    LinearRecurrence[{4,-3},{7,10,10,34},40] (* Harvey P. Dale, Aug 16 2024 *)
  • PARI
    a(n)=if(n<0,0,x=3; while((fibonacci(x)-1)%(3^n)>0,x++); x)

Formula

a(1)=7, a(2)=10, a(3)=10; for n>3, a(n) = 3*a(n-1) + 4.
a(n) = 4*3^(n-2)-2 for n >= 3.
G.f.: 8*x^2+(23/3)*x+14/9+2/(x-1)-4/(9*(3*x-1)). - Robert Israel, Jan 15 2015

Extensions

Formula corrected by Robert Israel, Jan 15 2015

A132753 a(n) = 2^(n+1) - n + 1.

Original entry on oeis.org

3, 4, 7, 14, 29, 60, 123, 250, 505, 1016, 2039, 4086, 8181, 16372, 32755, 65522, 131057, 262128, 524271, 1048558, 2097133, 4194284, 8388587, 16777194, 33554409, 67108840, 134217703, 268435430, 536870885, 1073741796, 2147483619
Offset: 0

Views

Author

Gary W. Adamson, Aug 28 2007

Keywords

Comments

Apart from a(0): Row sums of triangle A132752 (old name).
Apart from a(0): Binomial transform of [1, 3, 0, 4, 0, 4, 0, 4, ...].

Examples

			a(3) = 14 = sum of row 3 terms of triangle A132752: (3 + 5 + 5 + 1).
a(3) = 14 = (1, 3, 3, 1) dot (1, 3, 0, 4) = (1 + 9 + 0 + 4).
		

Crossrefs

Programs

  • Magma
    [2^(n+1) -n+1: n in [0..40]]; // G. C. Greubel, Feb 16 2021
  • Maple
    A132753:= n-> 2^(n+1) -n+1; seq(A132753(n), n=0..40) # G. C. Greubel, Feb 16 2021
  • Mathematica
    Table[2^(n+1) -n+1, {n, 0, 30}] (* Bruno Berselli, Aug 31 2013 *)
  • PARI
    a(n)=2^(n+1)-n+1
    
  • PARI
    Vec( (3-8*x+6*x^2)/((1-x)^2*(1-2*x)) + O(x^40)) \\ Colin Barker, Mar 14 2014
    
  • Sage
    [2^(n+1) -n+1 for n in (0..40)] # G. C. Greubel, Feb 16 2021
    

Formula

From Colin Barker, Mar 14 2014: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).
G.f.: (3 - 8*x + 6*x^2)/((1-x)^2 * (1-2*x)). (End)
E.g.f.: (1-x)*exp(x) + 2*exp(2*x). - G. C. Greubel, Feb 16 2021

Extensions

More terms Vladimir Joseph Stephan Orlovsky, Dec 25 2008
Changed first member, and better name from Ralf Stephan, Aug 31 2013
Showing 1-10 of 11 results. Next