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

A078008 Expansion of (1 - x)/((1 + x)*(1 - 2*x)).

Original entry on oeis.org

1, 0, 2, 2, 6, 10, 22, 42, 86, 170, 342, 682, 1366, 2730, 5462, 10922, 21846, 43690, 87382, 174762, 349526, 699050, 1398102, 2796202, 5592406, 11184810, 22369622, 44739242, 89478486, 178956970, 357913942, 715827882, 1431655766, 2863311530, 5726623062
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Conjecture: a(n) = the number of fractions in the infinite Farey row of 2^n terms with even denominators. Compare the Salamin & Gosper item in the Beeler et al. link. - Gary W. Adamson, Oct 27 2003
Counts closed walks starting and ending at the same vertex of a triangle. 3*a(n) = P(C_n, 3) chromatic polynomial for 3 colors on cyclic graph C_n. A078008(n) + 2*A001045(n) = 2^n provides decomposition of Pascal's triangle. - Paul Barry, Nov 17 2003
Permutations with one fixed point avoiding 123 and 132.
General form: iterate k -> 2^n - k. See also A001045. - Vladimir Joseph Stephan Orlovsky, Dec 11 2008
The inverse g.f. generates sequence 1, 0, -2, -2, -2, -2, ...
a(n) gives the number of oriented (i.e., unreduced for symmetry) meanders on an (n+2) X 3 rectangular grid; see A201145. - Jon Wild, Nov 22 2011
Pisano period lengths: 1, 1, 6, 1, 4, 6, 6, 2, 18, 4, 10, 6, 12, 6, 12, 2, 8, 18, 18, 4, ... - R. J. Mathar, Aug 10 2012
a(n) is the number of length n binary words that end in an odd length run of 0's if we do not include the first letter of the word in our run length count. a(4) =6 because we have 0000, 0010, 0110, 1000, 1010, 1110. - Geoffrey Critzer, Dec 16 2013
a(n) is the top left entry of the n-th power of any of the six 3 X 3 matrices [0, 1, 1; 1, 1, 1; 1, 0, 0], [0, 1, 1; 1, 1, 0; 1, 1, 0], [0, 1, 1; 1, 0, 1; 1, 1, 0], [0, 1, 1; 1, 1, 0; 1, 0, 1], [0, 1, 1; 1, 0, 1; 1, 0, 1] or [0, 1, 1; 1, 0, 0; 1, 1, 1]. - R. J. Mathar, Feb 04 2014
a(n) is the number of compositions of n into parts of two kinds without part 1. - Gregory L. Simay, Jun 04 2018
a(n) is the number of words of length n over a binary alphabet whose position in the lexicographic order is a multiple of three. a(3) = 2: aba, bab. - Alois P. Heinz, Apr 13 2022
a(n) is the number of words of length n over a ternary alphabet starting with a fixed letter (say, 'a') and ending in a different letter, such that no two adjacent letters are the same. a(4) = 6: abab, abac, abcb, acab, acac, acbc. - Ignat Soroko, Jul 19 2023

Examples

			G.f. = 1 + 2*x^2 + 2*x^3 + 6*x^4 + 10*x^5 + 22*x^6 + ... - _Michael Somos_, Mar 18 2022
		

References

  • Kenneth Edwards and Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, John Wiley and Sons, N.Y., 1983, ex. 1.1.10a.

Crossrefs

First differences of A001045.
See A151575 for a signed version.
Bisections: A047849, A020988.

Programs

Formula

Euler expands(1-x)/(1 - x - 2*x^2) into an infinite series and finds that the coefficient of the n-th term is (2^n + (-1)^n 2)/3. Section 226 shows that Euler could have easily found the recursion relation: a(n) = a(n-1) + 2a(n-2) with a(0) = 1 and a(1) = 0. - V. Frederick Rickey (fred-rickey(AT)usma.edu), Feb 10 2006. [Typos corrected by Jaume Oliver Lafont, Jun 01 2009]
a(n) = Sum_{k=0..floor(n/3)} binomial(n, f(n)+3*k) where f(n) = (0, 2, 1, 0, 2, 1, ...) = A080424(n). - Paul Barry, Feb 20 2003
E.g.f. (exp(2*x) + 2*exp(-x))/3. - Paul Barry, Apr 20 2003
a(n) = A001045(n) + (-1)^n = A000079(n) - 2*A001045(n). - Paul Barry, Feb 20 2003
a(n) = (2^n + 2*(-1)^n)/3. - Mario Catalani (mario.catalani(AT)unito.it), Aug 29 2003
a(n) = T(n, i/(2*sqrt(2)))*(-i*sqrt(2))^n - U(n-1, i/(2*sqrt(2)))*(-i*sqrt(2))^(n-1)/2. - Paul Barry, Nov 17 2003
From Paul Barry, Jul 30 2004: (Start)
a(n) = 2*a(n-1) + 2*(-1)^n for n > 0, with a(0)=1.
a(n) = Sum_{k=0..n} (-1)^k*(2^(n-k-1) + 0^(n-k)/2). (End)
a(n) = A014113(n-1) for n > 0; a(n) = A052953(n-1) - 2*(n mod 2) = sum of n-th row of the triangle in A108561. - Reinhard Zumkeller, Jun 10 2005
A137208(n+1) - 2*A137208(n) = a(n) signed. - Paul Curtz, Aug 03 2008
a(n) = A001045(n+1) - A001045(n) - Paul Curtz, Feb 09 2009
If p[1] =0, and 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)=det A. - Milan Janjic, Apr 29 2010
a(n) = 2*(a(n-2) + a(n-3) + a(n-4) ... + a(0)), that is, twice the sum of all the previous terms except the last; with a(0) = 1 and a(1) = 0. - Benoit Jubin, Nov 21 2011
a(n+1) = 2*A001045(n). - Benoit Jubin, Nov 22 2011
G.f.: 1 - x + x*Q(0), where Q(k) = 1 + 2*x^2 + (2*k+3)*x - x*(2*k+1 + 2*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 05 2013
G.f.: 1+ x^2*Q(0), where Q(k) = 1 + 1/(1 - x*(4*k+1+2*x)/(x*(4*k+3+2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 01 2014
a(n) = 3*a(n-2) + 2*a(n-3). - David Neil McGrath, Sep 10 2014
a(n) = (-1)^n * A151575(n). - G. C. Greubel, Jun 28 2019
a(n)+a(n+1) = 2^n. - R. J. Mathar, Feb 24 2021
a(n) = -a(2-n) * (-2)^(n-1) = (3/2)*(a(n-1) + a(n-2)) - a(n-3) for all n in Z. - Michael Somos, Mar 18 2022

A153006 Toothpick sequence starting at the outside corner of an infinite square from which protrudes a half toothpick.

Original entry on oeis.org

0, 1, 3, 6, 9, 13, 20, 28, 33, 37, 44, 53, 63, 78, 100, 120, 129, 133, 140, 149, 159, 174, 196, 217, 231, 246, 269, 297, 332, 384, 448, 496, 513, 517, 524, 533, 543, 558, 580, 601, 615, 630, 653, 681, 716, 768, 832, 881, 903, 918, 941
Offset: 0

Views

Author

Omar E. Pol, Dec 17 2008, Dec 19 2008, Apr 28 2009

Keywords

Comments

a(n) is the total number of integer toothpicks after n steps.
It appears that this sequence is related to triangular numbers, Mersenne primes and even perfect numbers. Conjecture: a(A000668(n))=A000217(A000668(n)). Conjecture: a(A000668(n))=A000396(n), assuming there are no odd perfect numbers.
The main entry for this sequence is A139250. See also A152980 (the first differences) and A147646.
The Mersenne prime conjectures are true, but aren't really about Mersenne primes. a(2^i-1) = 2^i (2^i-1)/2 for all i (whether or not i or 2^i-1 is prime). This follows from the formulas for A139250(2^i-1) and A139250(2^i). - David Applegate, May 11 2009
Then we can write a(A000225(k)) = A006516(k), for k > 0. - Omar E. Pol, May 23 2009
Equals A151550 convolved with [1, 2, 2, 2, ...]. (This is equivalent to the observation that the g.f. is x((1+x)/(1-x)) * Product_{n >= 1} (1 + x^(2^n-1) + 2*x^(2^n)).) Equivalently, equals A151555 convolved with A151575. - Gary W. Adamson, May 25 2009
It appears that a(n) is also 1/4 of the total path length of a toothpick structure as A139250 after n-th stage which is constructed following a special rule: toothpicks of the new generation have length 4 when are placed on the square grid (every toothpick has four components of length 1), but after every stage, one (or two) of the four components of every toothpick of the new generation is removed, if such component contains a endpoint of the toothpick and if such endpoint is touching the midpoint or the endpoint of another toothpick. The truncated endpoints of the toothpicks remain exposed forever. Note that there are three sizes of toothpicks in the structure: toothpicks of length 4, 3 and 2. a(n) is also 1/4 of the number of grid points that are covered after n-th stage, except the central point of the structure. A159795 gives the total path length and also the total number of components in the structure after n-th stage. - Omar E. Pol, Oct 24 2011

Crossrefs

Programs

  • Maple
    G:=x*((1 + x)/(1 - x)) * mul( (1 + x^(2^n-1) + 2*x^(2^n)), n=1..20); # N. J. A. Sloane, May 20 2009

Formula

G.f.: x*((1 + x)/(1 - x)) * Product_{n >= 1} (1 + x^(2^n-1) + 2*x^(2^n)). - N. J. A. Sloane, May 20 2009

Extensions

Edited by N. J. A. Sloane, Dec 19 2008

A151550 Expansion of g.f. Product_{n >= 1} (1 + x^(2^n-1) + 2*x^(2^n)).

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 4, 1, 3, 4, 5, 5, 10, 12, 8, 1, 3, 4, 5, 5, 10, 12, 9, 5, 10, 13, 15, 20, 32, 32, 16, 1, 3, 4, 5, 5, 10, 12, 9, 5, 10, 13, 15, 20, 32, 32, 17, 5, 10, 13, 15, 20, 32, 33, 23, 20, 33, 41, 50, 72, 96, 80, 32, 1, 3, 4, 5, 5, 10, 12, 9, 5, 10, 13, 15, 20, 32, 32, 17, 5, 10, 13
Offset: 0

Views

Author

N. J. A. Sloane, May 19 2009, Jun 17 2009

Keywords

Comments

When convolved with [1, 2, 2, 2, ...] gives the toothpick sequence A153006: (1, 3, 6, 9, ...). - Gary W. Adamson, May 25 2009
This sequence and the Adamson's comment both are mentioned in the Applegate-Pol-Sloane article, see chapter 8 "generating functions". - Omar E. Pol, Sep 20 2011

Examples

			From _Omar E. Pol_, Jun 09 2009, edited by _N. J. A. Sloane_, Jun 17 2009:
May be written as a triangle:
  0;
  1;
  1,2;
  1,3,4,4;
  1,3,4,5,5,10,12,8;
  1,3,4,5,5,10,12,9,5,10,13,15,20,32,32,16;
  1,3,4,5,5,10,12,9,5,10,13,15,20,32,32,17,5,10,13,15,20,32,33,23,20,33,41,...
The rows of the triangle converge to A151555.
		

References

  • D. Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, Congressus Numerantium, Vol. 206 (2010), 157-191

Crossrefs

For generating functions of the form Product_{k>=c} (1+a*x^(2^k-1)+b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.
Cf. A000079. - Omar E. Pol, Jun 09 2009

Programs

  • Mathematica
    terms = 100;
    CoefficientList[Product[(1+x^(2^n-1) + 2 x^(2^n)), {n, 1, Log[2, terms] // Ceiling}] + O[x]^terms, x] (* Jean-François Alcover, Aug 05 2018 *)

Formula

To get a nice recurrence, change the offset to 0 and multiply the g.f. by x as in the triangle in the example lines. Then we have: a(0)=0; a(2^i)=1; a(2^i-1)=2^(i-1) for i >= 1; otherwise write n = 2^i+j with 1 <= j <= 2^i-2, then a(n) = a(2^i+j) = 2*a(j) + a(j+1).

A151575 G.f.: (1+x)/(1+x-2*x^2).

Original entry on oeis.org

1, 0, 2, -2, 6, -10, 22, -42, 86, -170, 342, -682, 1366, -2730, 5462, -10922, 21846, -43690, 87382, -174762, 349526, -699050, 1398102, -2796202, 5592406, -11184810, 22369622, -44739242, 89478486, -178956970, 357913942, -715827882, 1431655766, -2863311530, 5726623062
Offset: 0

Views

Author

N. J. A. Sloane, May 25 2009, based on a suggestion from Gary W. Adamson

Keywords

Comments

Or, g.f. = (1+x)/((1-x)*(1-2*x)).
A signed version of A078008, which is the main entry.
[1, 0, 2, -2, 6, -10, 22, -42, 86, ...] = an operator for toothpick sequences. The sequence convolved with A151548 = toothpick sequence A139250. The sequence convolved with A151555 = toothpick sequence A153006. - Gary W. Adamson, May 25 2009

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+x)/(1+x-2x^2),{x,0,40}],x] (* or *) LinearRecurrence[{-1,2},{1,0},40] (* Harvey P. Dale, May 31 2023 *)

Formula

From R. J. Mathar, Jul 08 2009: (Start)
a(n) = (2 + (-2)^n)/3 = (-1)^n*A078008(n), n>=0.
a(n) = 2*A077925(n-2), n>1. (End)
a(n) = A084247(n+1)/2. - Philippe Deléham, Sep 21 2009
G.f.: 1 + x - x*Q(0), where Q(k) = 1 + 2*x^2 - (2*k+3)*x + x*(2*k+1 - 2*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 05 2013
Showing 1-4 of 4 results.