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

A005581 a(n) = (n-1)*n*(n+4)/6.

Original entry on oeis.org

0, 0, 2, 7, 16, 30, 50, 77, 112, 156, 210, 275, 352, 442, 546, 665, 800, 952, 1122, 1311, 1520, 1750, 2002, 2277, 2576, 2900, 3250, 3627, 4032, 4466, 4930, 5425, 5952, 6512, 7106, 7735, 8400, 9102, 9842, 10621, 11440, 12300, 13202, 14147, 15136, 16170
Offset: 0

Views

Author

Keywords

Comments

A class of Boolean functions of n variables and rank 2.
Also, number of inscribable triangles within a (n+4)-gon sharing with them its vertices but not its sides. - Lekraj Beedassy, Nov 14 2003
a(n) = A111808(n,3) for n > 2. - Reinhard Zumkeller, Aug 17 2005
If X is an n-set and Y a fixed 2-subset of X then a(n-2) is equal to the number of (n-3)-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
The sequence starting with offset 2 = binomial transform of [2, 5, 4, 1, 0, 0, 0, ...]. - Gary W. Adamson, Mar 20 2009
Let I=I_n be the n X n identity matrix and P=P_n be the incidence matrix of the cycle (1,2,3,...,n). Then, for n >= 4, a(n-4) is the number of (0,1) n X n matrices A <= P^(-1) + I + P having exactly two 1's in every row and column with perA=8. - Vladimir Shevelev, Apr 12 2010
Also arises as the number of triples of edges which can be chosen as the cut-points in the "three-opt" heuristic for a traveling salesman problem on (n+4) nodes. - James McDermott, Jul 10 2015
a(n) = risefac(n, 3)/3! - n is for n >= 1 also the number of independent components of a symmetric traceless tensor of rank 3 and dimension n. Here risefac is the rising factorial. - Wolfdieter Lang, Dec 10 2015
For n >= 2, a(n) is the number of characters in a word Q formed by concatenating all 'directed' ( left to right or vice versa), unrearranged subwords, from length 1 to (n-1), of a length (n-1) word q- allowing for the appearance of repeated subwords- and simply inserting an extra character for all subwords thus concatenated. - Christopher Hohl, May 30 2019

Examples

			In hexagon ABCDEF, the "interior" triangles are ACE and BDF, and a(6-4)=a(2)=2. - _Toby Gottfried_, Nov 12 2011
G.f. = 2*x^2 + 7*x^3 + 16*x^4 + 30*x^5 + 50*x^6 + 77*x^7 + 112*x^8 + ...
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), Table 22.7, p. 797.
  • Joseph D. Konhauser, Dan Velleman and Stan Wagon,, Which Way Did the Bicycle Go?, MAA, 1996, p. 177.
  • V. S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, Vol. 3 (1992), pp. 15-19. - Vladimir Shevelev, Apr 12 2010
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. M. Yaglom and I. M. Yaglom, Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #51 (the case k=3) (First published: San Francisco: Holden-Day, Inc., 1964).

Crossrefs

Programs

Formula

G.f.: (x^2)*(2-x)/(1-x)^4.
a(n) = binomial(n+1, n-2) + binomial(n, n-2).
a(n) = A027907(n, 3), n >= 0 (fourth column of trinomial coefficients). - N. J. A. Sloane, May 16 2003
Convolution of {1, 2, 3, ...} with {2, 3, 4, ...}. - Jon Perry, Jun 25 2003
a(n+2) = 2*te(n) - te(n-1), e.g., a(5) = 2*te(3) - te(2) = 2*20 - 10 = 30, where te(n) are the tetrahedral numbers A000292. - Jon Perry, Jul 23 2003
a(n) is the coefficient of x^3 in the expansion of (1+x+x^2)^n. For example, a(1)=0 since (1+x+x^2)^1=1+x+x^2. - Peter C. Heinig (algorithms(AT)gmx.de), Apr 09 2007
E.g.f.: (x^2 + x^3/6) * exp(x). - Michael Somos, Apr 13 2007
a(n) = - A005586(-4-n) for all n in Z. - Michael Somos, Apr 13 2007
a(n) = C(4+n,3)-(n+4)*(n+1), since C(4+n,3) = number of all triangles in (n+4)-gon, and (n+4)*(n+1)=number of triangles with at least one of the edges included. Example: n=0,in a square, all 4 possible triangles include some of the square's edges and C(4+n,3)-(n+4)*(n+1)=4-4*1=0 = number of other triangles = a(0). - Toby Gottfried, Nov 12 2011
a(n) = 2*binomial(n,2) + binomial(n,3). - Vladimir Shevelev and Peter J. C. Moses, Jun 22 2012
a(0)=0, a(1)=0, a(2)=2, a(3)=7, a(n)=4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). - Harvey P. Dale, Sep 22 2012
a(n) = A000292(n-1) + A000217(n-1) for all n in Z. - Michael Somos, Jul 29 2015
a(n+2) = -A127672(6+n, n), n >= 0, with A127672 giving the coefficients of Chebyshev's C polynomials. See the Abramowitz-Stegun reference. - Wolfdieter Lang, Dec 10 2015
a(n) = GegenbauerC(N, -n, -1/2) where N = 3 if 3Peter Luschny, May 10 2016
From Amiram Eldar, Jan 09 2022: (Start)
Sum_{n>=2} 1/a(n) = 163/200.
Sum_{n>=2} (-1)^n/a(n) = 12*log(2)/5 - 253/200. (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 01 2000

A005582 a(n) = n*(n+1)*(n+2)*(n+7)/24.

Original entry on oeis.org

0, 2, 9, 25, 55, 105, 182, 294, 450, 660, 935, 1287, 1729, 2275, 2940, 3740, 4692, 5814, 7125, 8645, 10395, 12397, 14674, 17250, 20150, 23400, 27027, 31059, 35525, 40455, 45880, 51832, 58344, 65450, 73185, 81585, 90687, 100529, 111150, 122590, 134890
Offset: 0

Views

Author

Keywords

Comments

a(n) = number of Dyck (n+2)-paths with exactly 2 rows of peaks. A row of peaks is a maximal sequence of peaks all at the same height and 2 units apart. For example, UDUDUD ( = /\/\/\ ) contains exactly one row of peaks, as does UUUDDD, but UDUUDDUD has three and a(1)=2 counts UDUUDD, UUDDUD. - David Callan, Mar 02 2005
If X is an n-set and Y a fixed 2-subset of X then a(n-4) is equal to the number of (n-4)-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
Let I=I_n be the n X n identity matrix and P=P_n be the incidence matrix of the cycle (1,2,3,...,n). Then, for n>=7, a(n-7) is the number of (0,1) n X n matrices A<=P^(-1)+I+P having exactly two 1's in every row and column with perA=16. - Vladimir Shevelev, Apr 12 2010
Row 2 of the convolution array A213550. - Clark Kimberling, Jun 20 2012
a(n-1) = risefac(n, 4)/4! - risefac(n, 2)/2! is for n >= 1 also the number of independent components of a symmetric traceless tensor of rank 4 and dimension n. Here risefac is the rising factorial. - Wolfdieter Lang, Dec 10 2015
Consider the array formed by the second polygonal numbers of increasing rank:
A000217(-1-n): 0, 1, 3, 6, 10, 15, ...
A000270(-1-n): 1, 4, 9, 16, 25, 36, ...
A000326(-1-n): 2, 7, 15, 26, 40, 57, ...
A000384(-1-n): 3, 10, 21, 36, 55, 78, ...
Then the antidiagonal sums yield this sequence. - Michael Somos, Nov 23 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), Table 22.7, p. 797.
  • Vladimir S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, 3(1992),15-19. [From Vladimir Shevelev, Apr 12 2010]
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. M. Yaglom and I. M. Yaglom: Challenging Mathematical Problems with Elementary Solutions. Vol. I. Combinatorial Analysis and Probability Theory. New York: Dover Publications, Inc., 1987, p. 13, #51 (the case k=4) (First published: San Francisco: Holden-Day, Inc., 1964)

Crossrefs

Partial sums of A005581.

Programs

  • Maple
    [seq(binomial(n,4)+2*binomial(n,3), n=2..43)]; # Zerinvary Lajos, Jul 26 2006
    seq((n+4)*binomial(n,4)/n, n=3..43); # Zerinvary Lajos, Feb 28 2007
    A005582:=(-2+z)/(z-1)**5; # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Table[n(n+1)(n+2)(n+7)/24,{n,0,40}] (* Harvey P. Dale, Jun 01 2012 *)
  • PARI
    concat(0, Vec(x*(2-x)/(1-x)^5 + O(x^100))) \\ Altug Alkan, Dec 10 2015

Formula

a(n) = binomial(n+3, n-1) + binomial(n+2, n-1).
a(n) = binomial(n,4) + 2*binomial(n,3), n>=2. - Zerinvary Lajos, Jul 26 2006
From Colin Barker, Jan 28 2012: (Start)
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: x*(2-x)/(1-x)^5. (End)
a(n) = Sum_{k=1..n} ( Sum_{i=1..k} i(n-k+2) ). - Wesley Ivan Hurt, Sep 26 2013
a(n+1) = A127672(8+n, n), n >= 0, with the Chebyshev C-polynomial coefficients A127672(n, k). See the Abramowitz-Stegun reference. - Wolfdieter Lang, Dec 10 2015
E.g.f.: (1/24)*x*(48 + 60*x + 16*x^2 + x^3)*exp(x). - G. C. Greubel, Jul 01 2017
Sum_{n>=1} 1/a(n) = 853/1225. - Amiram Eldar, Jan 02 2021
a(n) = A005587(-7-n) for all n in Z. - Michael Somos, Nov 23 2021

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 01 2000

A176222 a(n) = (n^2 - 3*n + 1 + (-1)^n)/2.

Original entry on oeis.org

0, 3, 5, 10, 14, 21, 27, 36, 44, 55, 65, 78, 90, 105, 119, 136, 152, 171, 189, 210, 230, 253, 275, 300, 324, 351, 377, 406, 434, 465, 495, 528, 560, 595, 629, 666, 702, 741, 779, 820, 860, 903, 945, 990, 1034, 1081, 1127, 1176, 1224, 1275, 1325, 1378, 1430
Offset: 3

Views

Author

Vladimir Shevelev, Apr 12 2010

Keywords

Comments

Let I = I_n be the n X n identity matrix and P = P_n be the incidence matrix of the cycle (1,2,3,...,n).
Let T = P^(-1)+I+P.
11000...01
11100....0
01110.....
00111.....
..........
00.....111
10.....011
Then a(n) is the number of (0,1) n X n matrices A <= T (i.e., an element of A can be 1 only if T has a 1 at this place) having exactly two 1's in every row and column with per(A) = 4.
a(n) is the maximum number m such that m white kings and m black kings can coexist on an n+1 X n+1 chessboard without attacking each other. - Aaron Khan, Jul 05 2022

Examples

			For n=5 the reference matrix is:
  11001
  11100
  01110
  00111
  10011
There are 2^(3*n) = 32768 0-1 matrices obtained from removing one or more 1's in it.
There are 305 such matrices with permanent 4 and there are 13 such matrices with exactly two 1's in every column and every row.
There are 5 matrices having both properties. One of them is:
  10001
  01100
  01100
  00011
  10010
From _Aaron Khan_, Jul 05 2022: (Start)
Examples of the sequence when used for kings on a chessboard:
.
A solution illustrating a(2)=3:
  +-------+
  | B B B |
  | . . . |
  | W W W |
  +-------+
.
A solution illustrating a(3)=5:
  +---------+
  | B B B B |
  | B . . . |
  | . . . W |
  | W W W W |
  +---------+
(End)
		

References

  • V. S. Shevelyov (Shevelev), Extension of the Moser class of four-line Latin rectangles, DAN Ukrainy, 3 (1992), 15-19.

Crossrefs

Cf. A000211, A052928, A128209, A250000 (queens on a chessboard), A002620 (rooks on a chessboard), A355509 (knights on a chessboard).

Programs

  • Magma
    [(n^2-3*n+1+(-1)^n)/2: n in [3..100]]; // Vincenzo Librandi, Mar 24 2011
    
  • Maple
    A176222:=n->(n^2-3*n+1+(-1)^n)/2: seq(A176222(n), n=3..100); # Wesley Ivan Hurt, May 25 2015
  • Mathematica
    Table[(n^2 - 3*n + 1 + (-1)^n)/2, {n, 3, 100}] (* or *) CoefficientList[Series[x (x - 3)/((1 + x)*(x - 1)^3), {x, 0, 30}], x] (* Wesley Ivan Hurt, May 25 2015 *)
    LinearRecurrence[{2,0,-2,1},{0,3,5,10},90] (* Harvey P. Dale, Jan 14 2024 *)
  • PARI
    a(n)=(n^2-3*n+1+(-1)^n)/2 \\ Charles R Greathouse IV, Oct 16 2015
    
  • Sage
    [n*(n-3)/2 + ((n+1)%2) for n in (3..60)] # G. C. Greubel, Mar 22 2022

Formula

a(n) = (n - t(n))*(n - 3 + t(n))/2, where t(n) = 1-(n mod 2).
G.f.: x^4*(3-x)/( (1+x)*(1-x)^3 ). - R. J. Mathar, Mar 06 2011
From Bruno Berselli, Sep 13 2011: (Start)
a(n) + a(n+1) = A005563(n-2).
a(-n) = A084265(n). (End)
a(n) = 1 -2*n +floor(n/2) +floor(n^2/2). - Wesley Ivan Hurt, Jun 14 2013
From Wesley Ivan Hurt, May 25 2015: (Start)
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4), n>4.
a(n) = Sum_{i=(-1)^n..n-2} i. (End)
a(n) = A174239(n-2) * A174239(n-1). - Paul Curtz, Jul 17 2017
With offset 0, this is ceiling(n/2)*(2*floor(n/2)+3). - N. J. A. Sloane, Jan 16 2020
E.g.f.: (1/2)*((1-x)*exp(x/2) - exp(-x/2))^2. - G. C. Greubel, Mar 22 2022

Extensions

Matrix class definition checked, edited and illustrated by Olivier Gérard, Mar 26 2011

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

Original entry on oeis.org

2, 2, 4, 6, 12, 22, 44, 86, 172, 342, 684, 1366, 2732, 5462, 10924, 21846, 43692, 87382, 174764, 349526, 699052, 1398102, 2796204, 5592406, 11184812, 22369622, 44739244, 89478486, 178956972, 357913942, 715827884, 1431655766, 2863311532
Offset: 0

Views

Author

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

Keywords

Comments

a(n) = sum of absolute values of terms in the (n+1)-th row of the triangle in A108561; - Reinhard Zumkeller, Jun 10 2005
a(n) = A078008(n+1) + 2*(1 + n mod 2). - Reinhard Zumkeller, Jun 10 2005
Essentially the same as A128209. - R. J. Mathar, Jun 14 2008

Crossrefs

Apart from initial term, equals A026644(n+1) + 2.
Cf. A001045.

Programs

  • GAP
    List([0..40], n-> (2^(n+1) +3 +(-1)^n)/3); # G. C. Greubel, Oct 21 2019
  • Magma
    [(2^(n+1) +3 +(-1)^n)/3: n in [0..40]]; // G. C. Greubel, Oct 21 2019
    
  • Maple
    spec:= [S,{S=Union(Sequence(Union(Prod(Union(Z,Z),Z),Z)),Sequence(Z))}, unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    seq((2^(n+1) +3 +(-1)^n)/3, n=0..40); # G. C. Greubel, Oct 21 2019
  • Mathematica
    LinearRecurrence[{2,1,-2}, {2,2,4}, 40] (* G. C. Greubel, Oct 22 2019 *)
    CoefficientList[Series[2(1-x-x^2)/((1-x)(1+x)(1-2x)),{x,0,40}],x] (* Harvey P. Dale, Aug 03 2025 *)
  • PARI
    vector(41, n, (2^n +3 -(-1)^n)/3 ) \\ G. C. Greubel, Oct 21 2019
    
  • Sage
    [(2^(n+1) +3 +(-1)^n)/3 for n in (0..40)] # G. C. Greubel, Oct 21 2019
    

Formula

G.f.: 2*(1-x-x^2)/((1-x^2)*(1-2*x)).
a(n) = a(n-1) + 2*a(n-2) - 2.
a(n) = 1 + Sum_{alpha=RootOf(-1+z+2*z^2)} (1 + 4*alpha)*alpha^(-1-n)/9.
a(2n) = 2*a(n-1)-2, a(2n+1) = 2*a(2n). - Lee Hae-hwang, Oct 11 2002
From Paul Barry, May 24 2004: (Start)
a(n) = A001045(n+1) + 1.
a(n) = (2^(n+1) - (-1)^(n+1))/3 + 1. (End)
E.g.f.: (2*exp(2*x) + 3*exp(x) + exp(-x))/3. - G. C. Greubel, Oct 21 2019

Extensions

More terms from James Sellers, Jun 05 2000

A153643 Jacobsthal numbers A001045 incremented by 2.

Original entry on oeis.org

2, 3, 3, 5, 7, 13, 23, 45, 87, 173, 343, 685, 1367, 2733, 5463, 10925, 21847, 43693, 87383, 174765, 349527, 699053, 1398103, 2796205, 5592407, 11184813, 22369623, 44739245, 89478487, 178956973, 357913943, 715827885, 1431655767, 2863311533, 5726623063
Offset: 0

Views

Author

Paul Curtz, Dec 30 2008

Keywords

Crossrefs

Programs

  • GAP
    a:=[2,3,3];; for n in [4..40] do a[n]:=2*a[n-1]+a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, Apr 02 2019
    
  • Magma
    I:=[2,3,3]; [n le 3 select I[n] else 2*Self(n-1) +Self(n-2) -2*Self(n-3): n in [1..40]]; // G. C. Greubel, Apr 02 2019
    
  • Mathematica
    LinearRecurrence[{1,2},{0,1}, 40] + 2 (* Harvey P. Dale, May 26 2014 *)
    LinearRecurrence[{2,1,-2},{2,3,3}, 40] (* Georg Fischer, Apr 02 2019 *)
  • PARI
    my(x='x+O('x^40)); Vec( (2-x-5*x^2)/((1-x^2)*(1-2*x)) ) \\ G. C. Greubel, Apr 02 2019
    
  • Python
    def A153643(n): return ((1<Chai Wah Wu, Apr 18 2025
  • Sage
    ((2-x-5*x^2)/((1-x^2)*(1-2*x))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 02 2019
    

Formula

a(n) = 2 + A001045(n) = A001045(n) + A007395(n) = 1 + A128209(n).
a(n) - A010684(n) = A078008(n), first differences of A001045. - Paul Curtz, Jan 17 2009
G.f.: (2 - x - 5*x^2)/((1+x)*(1-x)*(1-2*x)). - R. J. Mathar, Jan 23 2009
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n >= 3. - Andrew Howroyd, Feb 26 2018

Extensions

Edited and extended by R. J. Mathar, Jan 23 2009

A153772 a(n) = (2^n + 2*(-1)^n - 6)/3.

Original entry on oeis.org

-1, -2, 0, 0, 4, 8, 20, 40, 84, 168, 340, 680, 1364, 2728, 5460, 10920, 21844, 43688, 87380, 174760, 349524, 699048, 1398100, 2796200, 5592404, 11184808, 22369620, 44739240, 89478484, 178956968, 357913940, 715827880
Offset: 0

Views

Author

Paul Curtz, Jan 01 2009

Keywords

Comments

The array of T(n,k) with T(0,k) = A141325(k) and successive differences T(n,k) = T(n-1,k+1) - T(n-1,k) in further rows is
1, 1, 1, 1, 3, 5, 9, 13, 21, 33, 55,..
0, 0, 0, 2, 2, 4, 4, 8, 12, 22,..
0, 0, 2, 0, 2, 0, 4, 4, 10,...
0, 2, -2, 2, -2, 4, 0, 6,..
2, -4, 4, -4, 6, -4, 6,..
-6, 8, -8, 10, -10, 10,...
with T(n,n) = A078008(n), T(n,n+1) = -A167030(n), T(n,n+2) = A128209(n), T(n,n+3) = -a(n). All these sequences along the diagonals obey the recurrences a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) and a(n) = 5*a(n-2) - 4*a(n-4).
Conjecture: For n >= 6, a(n) is the third largest natural number whose Collatz orbit has length n+2. - Markus Sigg, Sep 14 2020

Crossrefs

Programs

  • Magma
    [2^n/3 +2*(-1)^n/3-2: n in [0..40]]; // Vincenzo Librandi, Aug 07 2011
    
  • Mathematica
    Table[(2^n + 2*(-1)^n - 6)/3, {n,0,25}] (* or *) LinearRecurrence[{2, 1, -2}, {-1, -2, 0}, 25] (* G. C. Greubel, Aug 27 2016 *)
  • PARI
    a(n)=(2^n+2*(-1)^n-6)/3 \\ Charles R Greathouse IV, Aug 28 2016

Formula

a(n) = A078008(n) - 2.
a(n) = +2*a(n-1) +a(n-2) -2*a(n-3).
a(n) = a(n-1) + 2*a(n-2) + 4.
G.f.: (1 - 5*x^2) / ( (1-x)*(2*x-1)*(1+x) ).
E.g.f.: (1/3)*(2*exp(-x) - 6*exp(x) + exp(2*x)). - G. C. Greubel, Aug 27 2016
a(n) = 4*A000975(n-3) for n >= 3. - Markus Sigg, Sep 14 2020

A128208 Inverse of number triangle A128210.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 0, 3, 1, 0, 0, 0, 5, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, 1
Offset: 0

Views

Author

Paul Barry, Feb 19 2007

Keywords

Comments

Subdiagonal is A001045(n+1). Row sums are A128209.

Examples

			Triangle begins:
  1;
  1, 1;
  0, 1, 1;
  0, 0, 3, 1;
  0, 0, 0, 5,  1;
  0, 0, 0, 0, 11,  1;
  0, 0, 0, 0,  0, 21,  1;
  0, 0, 0, 0,  0,  0, 43,  1;
  0, 0, 0, 0,  0,  0,  0, 85,   1;
  0, 0, 0, 0,  0,  0,  0,  0, 171,   1;
  0, 0, 0, 0,  0,  0,  0,  0,   0, 341, 1;
  ...
		

A154890 Jacobsthal numbers A001045 alternatingly incremented by 3 and 5.

Original entry on oeis.org

3, 6, 4, 8, 8, 16, 24, 48, 88, 176, 344, 688, 1368, 2736, 5464, 10928, 21848, 43696, 87384, 174768, 349528, 699056, 1398104, 2796208, 5592408, 11184816, 22369624, 44739248, 89478488, 178956976, 357913944, 715827888, 1431655768, 2863311536, 5726623064
Offset: 0

Views

Author

Paul Curtz, Jan 17 2009

Keywords

Formula

a(2n+1) = 2*a(2n).
a(n) = A153643(n)+A010684(n).
a(n+2) = 4*A128209(n).
a(n) = 2*a(n-1)+a(n-2)-2*a(n-3). G.f.: (3-11x^2)/((1-x)(1+x)(1-2x)). [R. J. Mathar, Jan 23 2009]

Extensions

Edited and extended by R. J. Mathar, Jan 23 2009

A167167 A001045 with a(0) replaced by -1.

Original entry on oeis.org

-1, 1, 1, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, 5461, 10923, 21845, 43691, 87381, 174763, 349525, 699051, 1398101, 2796203, 5592405, 11184811, 22369621, 44739243, 89478485, 178956971, 357913941, 715827883, 1431655765, 2863311531
Offset: 0

Views

Author

Paul Curtz, Oct 29 2009

Keywords

Comments

Essentially the same as A001045, and perhaps also A152046.
Also the binomial transform of the sequence with terms (-1)^(n+1)*A128209(n).

Programs

  • GAP
    Concatenation([-1], List([1..35], n-> (2^n -(-1)^n)/3) ); # G. C. Greubel, Dec 01 2019
  • Magma
    [-1] cat [(2^n -(-1)^n)/3 : n in [1..35]]; // G. C. Greubel, Dec 01 2019
    
  • Maple
    seq( `if`(n=0, -1, (2^n -(-1)^n)/3), n=0..35); # G. C. Greubel, Dec 01 2019
  • Mathematica
    CoefficientList[Series[(2*x-1+2*x^2)/((1+x)*(1-2*x)), {x, 0, 35}], x] (* G. C. Greubel, Jun 04 2016 *)
    Table[If[n==0, -1, (2^n -(-1)^n)/3], {n,0,35}] (* G. C. Greubel, Dec 01 2019 *)
    LinearRecurrence[{1,2},{-1,1,1},40] (* Harvey P. Dale, Jul 23 2025 *)
  • PARI
    vector(36, n, if(n==1, -1, (2^(n-1) +(-1)^n)/3 ) ) \\ G. C. Greubel, Dec 01 2019
    
  • Sage
    [-1]+[lucas_number1(n, 1, -2) for n in (1..35)] # G. C. Greubel, Dec 01 2019
    

Formula

a(n) = A001045(n), n>0.
a(n) + a(n+1) = 2*A001782(n) = 2*A131577(n) = A155559(n) = A090129(n+2), n>0.
G.f.: (2*x^2 + 2*x - 1)/((1+x)*(1-2*x)).
E.g.f.: (exp(2*x) - exp(-x) - 3)/3. - G. C. Greubel, Dec 01 2019

Extensions

Edited and extended by R. J. Mathar, Nov 01 2009

A364214 Numbers whose canonical representation as a sum of distinct Jacobsthal numbers (A280049) is palindromic.

Original entry on oeis.org

1, 2, 4, 5, 6, 10, 12, 15, 18, 21, 22, 30, 34, 42, 44, 49, 58, 63, 66, 71, 80, 85, 86, 102, 110, 126, 130, 146, 154, 170, 172, 183, 198, 209, 218, 229, 244, 255, 258, 269, 284, 295, 304, 315, 330, 341, 342, 374, 390, 422, 430, 462, 478, 510, 514, 546, 562, 594
Offset: 1

Views

Author

Amiram Eldar, Jul 14 2023

Keywords

Comments

The even-indexed Jacobsthal numbers A001045(2*n) = A002450(n) = (4^n-1)/3, for n >= 1, are terms since their representation is 2*n-1 1's.
A001045(2*n+1) - 1 = A020988(n) = (2/3)*(4^n-1) is a term for n >= 1, since its representation is 2*n 1's.
A001045(n) + 1 = A128209(n) is a term for n >= 0, since its representation for n = 0 is 1 and its representation for n >= 1 is n-1 0's between 2 1's.
A160156(n) is a term for n >= 0 since its representation is n 0's interleaved with n+1 1's.

Examples

			The first 10 terms are:
   n  a(n)  A280049(a(n))
  --  ----  -------------
   1     1              1
   2     2             11
   3     4            101
   4     5            111
   5     6           1001
   6    10           1111
   7    12          10001
   8    15          10101
   9    18          11011
  10    21          11111
		

Crossrefs

Programs

  • Mathematica
    Position[Select[Range[1000], EvenQ[IntegerExponent[#, 2]] &], _?(PalindromeQ[IntegerDigits[#, 2]] &)] // Flatten
  • PARI
    s(n) = if(n < 2, n > 0, n = s(n-1); until(valuation(n, 2)%2 == 0, n++); n); \\ A003159
    is(n) = {my(d = binary(s(n))); d == Vecrev(d);}
Showing 1-10 of 14 results. Next