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

A000682 Semi-meanders: number of ways a semi-infinite directed curve can cross a straight line n times.

Original entry on oeis.org

1, 1, 2, 4, 10, 24, 66, 174, 504, 1406, 4210, 12198, 37378, 111278, 346846, 1053874, 3328188, 10274466, 32786630, 102511418, 329903058, 1042277722, 3377919260, 10765024432, 35095839848, 112670468128, 369192702554, 1192724674590, 3925446804750
Offset: 1

Views

Author

Keywords

Comments

For n > 1, the number of permutations of n letters without overlaps [Sade, 1949]. - N. J. A. Sloane, Jul 05 2015
Number of ways to fold a strip of n labeled stamps with leaf 1 on top. [Clarified by Stéphane Legendre, Apr 09 2013]
From Roger Ford, Jul 04 2014: (Start)
The number of semi-meander solutions for n (a(n)) is equal to the number of n top arch solutions in the intersection of A001263 (with no intersecting top arches) and A244312 (arches forming a complete loop).
The top and bottom arches for semi-meanders pass through vertices 1-2n on a straight line with the arches below the line forming a rainbow pattern.
The number of total arches going from an odd vertex to a higher even vertex must be exactly 2 greater than the number of arches going from an even vertex to a higher odd vertex to form a single complete loop with no intersections.
The arch solutions in the intersection of A001263 (T(n,k)) and A244312 (F(n,k)) occur when the number of top arches going from an odd vertex to a higher even vertex (k) meets the condition that k = ceiling((n+1)/2).
Example: semi-meanders a(5)=10.
(A244312) F(5,3)=16 { 10 common solutions: [12,34,5 10,67,89] [16,23,45,78,9 10] [12,36,45,7 10,89] [14,23,58,67,9 10] [12,3 10,49,58,67] [18,27,36,45,9 10] [12,3 10,45,69,78] [18,25,34,67,9 10] [14,23,5 10,69,78] [16,25,34,7 10,89] } + [18,27,34,5 10,69] [16,25,3 10,49,78] [18,25,36,49,7 10] [14,27,3 10,58,69] [14,27,36,5 10,89] [16,23,49,58,7 10]
(A001263) T(5,3)=20 { 10 common solutions } + [12,38,45,67,9 10] [1 10,29,38,47,56] [1 10,25,34,69,78] [14,23,56,7 10,89] [12,3 10,47,56,89] [18,23,47,56,9 10] [1 10,29,36,45,78] [1 10,29,34,58,67] [1 10,27,34,56,89] [1 10,23,49,56,78].
(End)
From Roger Ford, Feb 23 2018: (Start)
For n>1, the number of semi-meanders with n top arches and k concentric starting arcs is a(n,k)= A000682(n-k).
/\ /\
Examples: a(5,1)=4 //\\ / \ /\
A000682(5-1)=4 ///\\\ / /\\ / \ /\ /\
/\////\\\\, /\//\//\\\, /\/\//\/\\, /\ //\\//\\
a(5,2)=2 /\ a(5,3)=1 /\
A000682(5-2)=2 /\ //\\ /\ /\ A000682(5-3)=1 //\\ /\
//\\///\\\, //\\//\\/\ ///\\\//\\
a(5,4)=1 /\
A000682(5-4)=1 //\\
///\\\
////\\\\/\. (End)
For n >= 4, 4*a(n-2) is the number of stamp foldings with leaf 1 on top, with leaf 2 in the second or n-th position, and with leaf n and leaf n-1 adjacent. Example for n = 5, 4*a(5-2) = 8: 12345, 12354, 12453, 12543, 13452, 13542, 14532, 15432. - Roger Ford, Aug 05 2019
From Martin Philp, Mar 25 2021: (Start)
The condition of having leaf n and leaf n-1 adjacent is the same as having one fewer leaf, and then counting each element twice. So the above comment is equivalent to saying:
For n >= 3, 2*a(n-1) is the number of stamp foldings with leaf 1 on top and leaf 2 in the second or n-th position. Example for n = 4, 2*a(4-1) = 4: 1234, 1243, 1342, 1432. Furthermore the number of stamp foldings with leaf 1 on top and leaf 2 in the n-th position is the same as the number of stamp foldings with leaf 1 on top and leaf 2 in the second position, as a cyclic rotation of 1 and mirroring the sequence maps one to the other. 1234, 1243 <-rot-> 2341, 2431 <-mirror-> 1432, 1342.
Hence, for n >= 2, a(n-1) is the number of stamp foldings having 1 and 2 (in this order) on top.
Not only is a(n) the number of stamp foldings with 1 on top, it is the number of stamp foldings with any particular leaf on top. This explains why A000136(n)= n*a(n).
(End)
The number of semi-meanders that in the first exterior top arch has exactly one arch of length one = Sum_{k=1..n-1} a(k). Example: for n = 5, Sum_{k=1..4} A000682(k) = 8, 10 = arch of length one, *start and end of first exterior top arch*; *10*11001100, *10*11110000, *10*11011000, *10*10110100, *1100*111000, *1100*110010, *111000*1100, *11110000*10. - Roger Ford, Jul 12 2020

Examples

			a(4) = 4: the four solutions with three crossings are the two solutions shown in A086441(3) together with their reflections about a North-South axis.
		

References

  • A. Sade, Sur les Chevauchements des Permutations, published by the author, Marseille, 1949.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000136, A001011, A001997, A000560 (nonisomorphic), A086441.
Row sums of A259689.

Programs

Formula

a(n) = 2*A000560(n-1) for n >= 3.
For n >= 2, a(n) = 2^(n-2) + Sum_{x=3..n-2} (2^(n-x-2)*A301620(x)). - Roger Ford, Apr 23 2018
a(n) = 2^(n-2) + Sum_{j=4..n-1} (Sum_{k=3..floor((j+2)/2)} (A259689(j,k)*(k-2)*2^(n-1-j))). - Roger Ford, Dec 12 2018
a(n) = A000136(n)/n. - Jean-François Alcover, Sep 06 2019, from formula in A000136.
a(n) = (n-1)! - Sum_{k=3..n-1} (A223094(k) * (n-1)! / k!). - Roger Ford, Aug 23 2024

Extensions

Sade gives the first 11 terms. Computed to n = 45 by Iwan Jensen.
Offset changed by Roger Ford, Feb 09 2018

A001998 Bending a piece of wire of length n+1; walks of length n+1 on a tetrahedron; also non-branched catafusenes with n+2 condensed hexagons.

Original entry on oeis.org

1, 2, 4, 10, 25, 70, 196, 574, 1681, 5002, 14884, 44530, 133225, 399310, 1196836, 3589414, 10764961, 32291602, 96864964, 290585050, 871725625, 2615147350, 7845353476, 23535971854, 70607649841, 211822683802, 635467254244, 1906400965570, 5719200505225, 17157599124190
Offset: 0

Views

Author

Keywords

Comments

The wire stays in the plane, there are n bends, each is R,L or O; turning the wire over does not count as a new figure.
Equivalently, walks of n+1 steps on a tetrahedron, visiting n+2 vertices, with n "corners"; the symmetry group is S4, reversing a walk does not count as different. Simply interpret R,L,O as instructions to turn R, turn L, or retrace the last step. Walks are not self-avoiding.
Also, it appears that a(n) gives the number of equivalence classes of n-tuples of 0, 1 and 2, where two n-tuples are equivalent if one can be obtained from the other by a sequence of operations R and C, where R denotes reversal and C denotes taking the 2's complement (C(x)=2-x). This has been verified up to a(19)=290585050. Example: for n=3 there are ten equivalence classes {000, 222}, {001, 100, 122, 221}, {002, 022, 200, 220}, {010, 212}, {011, 110, 112, 211}, {012, 210}, {020, 202}, {021, 102, 120, 201}, {101, 121}, {111}, so a(3)=10. - John W. Layman, Oct 13 2009
There exists a bijection between chains of n+2 hexagons and the above described equivalence classes of n-tuples of 0,1, and 2. Namely, for a given chain of n+2 hexagons we take the sequence of the numbers of vertices of degree 2 (0, 1, or 2) between the consecutive contact vertices on one side of the chain; switching to the other side we obtain the 2's complement of this sequence; reversing the order of the hexagons, we obtain the reverse sequence. The inverse mapping is straightforward. For example, to a linear chain of 7 hexagons there corresponds the 5-tuple 11111. - Emeric Deutsch, Apr 22 2013
If we treat two wire bends (or walks, or tuples) related by turning over (or reversing) as different in any of the above-given interpretations of this sequence, we get A007051 (or A124302). Also, a(n-1) is the sum of first 3 terms in n-th row of A284949, see crossrefs therein. - Andrey Zabolotskiy, Sep 29 2017
a(n-1) is the number of color patterns (set partitions) in an unoriented row of length n using 3 or fewer colors (subsets). - Robert A. Russell, Oct 28 2018
From Allan Bickle, Jun 02 2022: (Start)
a(n) is the number of (unlabeled) 3-paths with n+6 vertices. (A 3-path with order n at least 5 can be constructed from a 4-clique by iteratively adding a new 3-leaf (vertex of degree 3) adjacent to an existing 3-clique containing an existing 3-leaf.)
Recurrences appear in the papers by Bickle, Eckhoff, and Markenzon et al. (End)
a(n) is also the number of distinct planar embeddings of the (n+1)-alkane graph (up to at least n=9, and likely for all n). - Eric W. Weisstein, May 21 2024

Examples

			There are 2 ways to bend a piece of wire of length 2 (bend it or not).
For n=4 and a(n-1)=10, the 6 achiral patterns are AAAA, AABB, ABAB, ABBA, ABCA, and ABBC.  The 4 chiral pairs are AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB. - _Robert A. Russell_, Oct 28 2018
		

References

  • A. T. Balaban, Enumeration of Cyclic Graphs, pp. 63-105 of A. T. Balaban, ed., Chemical Applications of Graph Theory, Ac. Press, 1976; see p. 75.
  • S. J. Cyvin, B. N. Cyvin, and J. Brunvoll, Enumeration of tree-like octagonal systems: catapolyoctagons, ACH Models in Chem. 134 (1997), 55-70.
  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2.]
  • R. C. Read, The Enumeration of Acyclic Chemical Compounds, pp. 25-61 of A. T. Balaban, ed., Chemical Applications of Graph Theory, Ac. Press, 1976. [I think this reference does not mention this sequence. - N. J. A. Sloane, Aug 10 2006]
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 3 of A320750, offset by one. Column k = 0 of A323942, offset by two.
Cf. A124302 (oriented), A107767 (chiral), A182522 (achiral), with varying offsets.
Column 3 of A320750.
The numbers of unlabeled k-paths for k = 2..7 are given in A005418, A001998, A056323, A056324, A056325, and A345207, respectively.
The sequences above converge to A103293(n+1).

Programs

  • GAP
    a:=[];; for n in [2..45] do if n mod 2 =0 then Add(a,((3^((n-2)/2)+1)/2)^2); else Add(a,  3^((n-3)/2)+(1/4)*(3^(n-2)+1)); fi; od; a; # Muniru A Asiru, Oct 28 2018
  • Maple
    A001998 := proc(n) if n = 0 then 1 elif n mod 2 = 1 then (1/4)*(3^n+4*3^((n-1)/2)+1) else (1/4)*(3^n+2*3^(n/2)+1); fi; end;
    A001998:=(-1+3*z+2*z**2-8*z**3+3*z**4)/(z-1)/(3*z-1)/(3*z**2-1); # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence with an extra leading 1
  • Mathematica
    a[n_?OddQ] := (1/4)*(3^n + 4*3^((n - 1)/2) + 1); a[n_?EvenQ] := (1/4)*(3^n + 2*3^(n/2) + 1); Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Jan 25 2013, from formula *)
    LinearRecurrence[{4,0,-12,9},{1,2,4,10},30] (* Harvey P. Dale, Apr 10 2013 *)
    Ach[n_, k_] := Ach[n, k] = If[n<2, Boole[n==k && n>=0], k Ach[n-2,k] + Ach[n-2,k-1] + Ach[n-2,k-2]] (* A304972 *)
    k=3; Table[Sum[StirlingS2[n,j]+Ach[n,j],{j,k}]/2,{n,40}] (* Robert A. Russell, Oct 28 2018 *)
  • PARI
    Vec((1-2*x-4*x^2+6*x^3)/((1-x)*(1-3*x)*(1-3*x^2)) + O(x^50)) \\ Colin Barker, May 15 2016
    

Formula

a(n) = if n mod 2 = 0 then ((3^((n-2)/2)+1)/2)^2 else 3^((n-3)/2)+(1/4)*(3^(n-2)+1).
G.f.: (1-2*x-4*x^2+6*x^3) / ((1-x)*(1-3*x)*(1-3*x^2)). - Corrected by Colin Barker, May 15 2016
a(n) = 4*a(n-1)-12*a(n-3)+9*a(n-4), with a(0)=1, a(1)=2, a(2)=4, a(3)=10. - Harvey P. Dale, Apr 10 2013
a(n) = (1+3^n+3^(1/2*(-1+n))*(2-2*(-1)^n+sqrt(3)+(-1)^n*sqrt(3)))/4. - Colin Barker, May 15 2016
E.g.f.: (2*sqrt(3)*sinh(sqrt(3)*x) + 3*exp(2*x)*cosh(x) + 3*cosh(sqrt(3)*x))/6. - Ilya Gutkovskiy, May 15 2016
From Robert A. Russell, Oct 28 2018: (Start)
a(n-1) = (A124302(n) + A182522(n)) / 2 = A124302(n) - A107767(n-1) = A107767(n-1) + A182522(n).
a(n-1) = Sum_{j=1..k} (S2(n,j) + Ach(n,j)) / 2, where k=3 is the maximum number of colors, S2 is the Stirling subset number A008277, and Ach(n,k) = [n>=0 & n<2 & n==k] + [n>1]*(k*Ach(n-2,k) + Ach(n-2,k-1) + Ach(n-2,k-2)).
a(n-1) = A057427(n) + A056326(n) + A056327(n). (End)
a(2*n) = A007051(n)^2; a(2*n+1) = A007051(n)*A007051(n+1). - Todd Simpson, Mar 25 2024

Extensions

Offset and Maple code corrected by Colin Mallows, Nov 12 1999
Term added by Robert A. Russell, Oct 30 2018

A019988 Number of ways of embedding a connected graph with n edges in the square lattice.

Original entry on oeis.org

1, 2, 5, 16, 55, 222, 950, 4265, 19591, 91678, 434005, 2073783, 9979772, 48315186, 235088794, 1148891118, 5636168859, 27743309673
Offset: 1

Views

Author

Keywords

Comments

It is assumed that all edges have length one. - N. J. A. Sloane, Apr 17 2019
These are referred to as 'polysticks', 'polyedges' or 'polyforms'. - Jack W Grahl, Jul 24 2018
Number of connected subgraphs of the square lattice (or grid) containing n length-one line segments. Configurations differing only a rotation or reflection are not counted as different. The question may also be stated in terms of placing unit toothpicks in a connected arrangement on the square lattice. - N. J. A. Sloane, Apr 17 2019
The solution for n=5 features in the card game Digit. - Paweł Rafał Bieliński, Apr 17 2019

References

  • Brian R. Barwell, "Polysticks," Journal of Recreational Mathematics, 22 (1990), 165-175.

Crossrefs

If only translations (but not rotations) are factored, consider fixed polyedges (A096267).
If reflections are considered different, we obtain the one-sided polysticks, counted by (A151537). - Jack W Grahl, Jul 24 2018
Cf. A001997, A003792, A006372, A059103, A085632, A056841 (tree-like), A348095 (with cycles), A348096 (refined by symmetry), A181528.
See A336281 for another version.
6th row of A366766.

Formula

A348095(n) + A056841(n+1) = a(n). - R. J. Mathar, Sep 30 2021

Extensions

More terms from Brendan Owen (brendan_owen(AT)yahoo.com), Feb 20 2002
a(18) from John Mason, Jun 01 2023

A001444 Bending a piece of wire of length n+1 (configurations that can only be brought into coincidence by turning the figure over are counted as different).

Original entry on oeis.org

1, 2, 6, 15, 45, 126, 378, 1107, 3321, 9882, 29646, 88695, 266085, 797526, 2392578, 7175547, 21526641, 64573362, 193720086, 581140575, 1743421725, 5230206126, 15690618378, 47071677987, 141215033961, 423644570442, 1270933711326, 3812799539655, 11438398618965
Offset: 0

Views

Author

Keywords

Comments

The wire stays in the plane, there are n bends, each is R,L or O.

Examples

			There are 2 ways to bend a piece of wire of length 2 (bend it or not).
G.f. = 1 + 2*x + 6*x^2 + 15*x^3 + 45*x^4 + 126*x^5 + 378*x^6 + ...
		

References

  • Todd Andrew Simpson, "Combinatorial Proofs and Generalizations of Weyl's Denominator Formula", Ph. D. Dissertation, Penn State University, 1994.

Crossrefs

Programs

  • Haskell
    a001444 n = div (3 ^ n + 3 ^ (div n 2)) 2
    -- Reinhard Zumkeller, Jun 30 2013
  • Maple
    f := n->(3^floor(n/2)+3^n)/2;
  • Mathematica
    CoefficientList[Series[(1-x-3*x^2)/((1-3*x)*(1-3*x^2)),{x,0,30}],x] (* Vincenzo Librandi, Apr 15 2012 *)
    LinearRecurrence[{3,3,-9},{1,2,6},40] (* Harvey P. Dale, Dec 30 2012 *)

Formula

a(n) = (3^n + 3^floor(n/2))/2.
G.f.: G(0) where G(k) = 1 + x*(3*3^k + 1)*(1 + 3*x*G(k+1))/(1 + 3^k). - Sergei N. Gladkovskii, Dec 13 2011 [Edited by Michael Somos, Sep 09 2013]
E.g.f. E(x) = (exp(3*x)+cosh(x*sqrt(3))+sinh(x*sqrt(3))/sqrt(3))/2 = G(0); G(k) = 1 + x*(3*3^k+1)/((2*k+1)*(1+3^k) - 3*x*(2*k+1)*(1+3^k)/(3*x + (2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 13 2011
From Colin Barker, Apr 02 2012: (Start)
a(n) = 3*a(n-1) + 3*a(n-2) - 9*a(n-3).
G.f.: x*(1-x-3*x^2)/((1-3*x)*(1-3*x^2)). (End)

Extensions

Interpretation in terms of bending wire from Colin Mallows.

A006817 Trails of length n on square lattice.

Original entry on oeis.org

1, 4, 12, 36, 108, 316, 916, 2628, 7500, 21268, 60092, 169092, 474924, 1329188, 3715244, 10359636, 28856252, 80220244, 222847804, 618083972, 1713283628, 4742946484, 13123882524, 36274940740, 100226653420, 276669062116, 763482430316, 2105208491748, 5803285527724
Offset: 0

Views

Author

Keywords

Comments

A trail is a path which may cross itself but does not reuse an edge. This sequence counts directed paths on the square lattice.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Undirected trails-rotation and reflection are counted by A001997.

Extensions

More terms from David W. Wilson, Jul 20 2001
More terms from Bert Dobbelaere, Jan 19 2019

A066372 Number of different shapes formed by bending a piece of wire of length n in the plane.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 15, 23, 43, 71, 128, 209, 379, 650, 1145, 1928, 3422, 5908, 10295, 17530, 30738, 53088, 91971, 157194, 273621, 471865, 814557, 1393822, 2414895, 4157492, 7160018, 12253782, 21163410, 36381025, 62549316, 107029982, 184430758
Offset: 1

Views

Author

Richard D. Plotz (Dick(AT)Plotz.com), Dec 22 2001

Keywords

Comments

Wire is marked into n equal segments by n-1 marks, is bent at right angles at each of these points, making each segment parallel to one of two rectangular axes. (Stays in plane, bends are of +-90 degs.) May cross itself but is not self-coincident over a finite length. Two configurations which differ only in a rotation or turning over are not counted as different.
In addition to not allowing straight segments, there are two further subtle differences between the counting here and the counting in A001997. In this sequence, if the wire effectively forms a closed loop, then that shape is counted only once, whereas in A001997 the position of the ends of the wire matters. Similarly, the same consideration applies to places where the wire is self-coincident. In this sequence, we assume our eyes are not good enough to distinguish which of two (or more) ways of bending the wire achieve the same shape. These distinctions first matter for n=8 where in this sequence all three arrangements which look like a slanted 8 are equivalent. - Sean A. Irvine, Oct 10 2023

Examples

			Let LRUD denote left, right, up, down. Then for n = 1..4 the solutions are R, RD, RDL, RDR, RDLU, RDLD, RDRD.
For n=5 the 5 shapes are:
  __.__.  __.  .__  |__.    .__.     __.
    |__|    |__|       |__| |  |__|    |__.
                                          |__
		

References

  • Deborah Freedman, dlf(AT)alumni.princeton.edu, personal communication.

Crossrefs

See A001997 for another version.
Cf. A046661, A122224 for self-avoiding paths.

Extensions

a(10)-a(23) from Nathaniel Johnston, Jan 04 2011
a(24)-a(37) from Bert Dobbelaere, Jan 12 2020

A178778 Partial sums of walks of length n+1 on a tetrahedron A001998.

Original entry on oeis.org

1, 3, 7, 17, 42, 112, 308, 882, 2563, 7565, 22449, 66979, 200204, 599514, 1796350, 5385764, 16150725, 48442327, 145307291, 435892341, 1307617966, 3922765316, 11768118792, 35304090646, 105911740487, 317734424289, 953201678533, 2859602644103, 8578803149328
Offset: 0

Views

Author

Jonathan Vos Post, Dec 26 2010

Keywords

Comments

The subsequence of primes begins 3, 7, 17, no more through a(27).

Examples

			a(5) = 1 + 2 + 4 + 10 + 25 + 70 = 112.
		

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (6*x^3-4*x^2-2*x+1)/((x-1)^2*(3*x-1)*(3*x^2-1)) )); // G. C. Greubel, Jan 24 2019
    
  • Mathematica
    CoefficientList[Series[(6*x^3-4*x^2-2*x+1)/((x-1)^2*(3*x-1)*(3*x^2-1)), {x,0,30}], x] (* G. C. Greubel, Jan 24 2019 *)
  • PARI
    Vec((1-2*x-4*x^2+6*x^3)/((1-x)^2*(1-3*x)*(1-3*x^2)) + O(x^50)) \\ Colin Barker, May 17 2016
    
  • Sage
    ((6*x^3-4*x^2-2*x+1)/((x-1)^2*(3*x-1)*(3*x^2-1))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 24 2019

Formula

a(n) = Sum_{i=0..n} (if i mod 2 = 0 then ((3^((i-2)/2)+1)/2)^2 else 3^((i-3)/2)+(1/4)*(3^(i-2)+1)).
G.f.: (6*x^3-4*x^2-2*x+1) / ((x-1)^2*(3*x-1)*(3*x^2-1)). - Colin Barker, Apr 20 2013
From Colin Barker, May 17 2016: (Start)
a(n) = (-7+3^(1+n)+3^(1/2*(-1+n))*(9-9*(-1)^n+5*sqrt(3)+5*(-1)^n*sqrt(3))+2*(1+n))/8.
a(n) = (2*n + 10*3^(n/2) + 3^(n+1) - 5)/8 for n even.
a(n) = (2*n + 3^(n+1) + 2*3^((n+3)/2) - 5)/8 for n odd.
a(n) = 5*a(n-1) - 4*a(n-2) - 12*a(n-3) + 21*a(n-4) - 9*a(n-5) for n>4.
(End)

A178937 Partial sums of number of different shapes formed by bending a piece of wire of length n in the plane A066372.

Original entry on oeis.org

1, 2, 4, 7, 12, 20, 35, 58, 101, 172, 300, 509, 888, 1538, 2683, 4611, 8033, 13941, 24236, 41766, 72504, 125592, 217563, 374757, 648378, 1120243, 1934800, 3328622, 5743517, 9901009, 17061027, 29314809, 50478219, 86859244, 149408560, 256438542, 440869300
Offset: 1

Views

Author

Jonathan Vos Post, Dec 30 2010

Keywords

Comments

Number of different shapes formed by bending (+ or - 90 degrees at each bend) a piece of wire of length <= n in the plane.

Examples

			a(9) = 1 + 1 + 2 + 3 + 5 + 8 + 15 + 23 + 43 = 101 is prime. The next prime is a(15) = 2683.
		

Crossrefs

Programs

Extensions

More terms from Nathaniel Johnston, Jan 04 2011
More terms from A066372 by Jean-François Alcover, Feb 22 2020
Showing 1-8 of 8 results.