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

A024495 a(n) = C(n,2) + C(n,5) + ... + C(n, 3*floor(n/3)+2).

Original entry on oeis.org

0, 0, 1, 3, 6, 11, 21, 42, 85, 171, 342, 683, 1365, 2730, 5461, 10923, 21846, 43691, 87381, 174762, 349525, 699051, 1398102, 2796203, 5592405, 11184810, 22369621, 44739243, 89478486, 178956971, 357913941, 715827882, 1431655765, 2863311531, 5726623062
Offset: 0

Views

Author

Keywords

Comments

Trisections give A082365, A132804, A132805. - Paul Curtz, Nov 18 2007
If the offset is changed to 1, this is the maximal number of closed regions bounded by straight lines after n straight line cuts in a plane: a(n) = a(n-1) + n - 3, a(1)=0; a(2)=0; a(3)=1; and so on. - Srikanth K S, Jan 23 2008
M^n * [1,0,0] = [A024493(n), a(n), A024494(n)]; where M = a 3x3 matrix [1,1,0; 0,1,1; 1,0,1]. Sum of terms = 2^n. Example: M^5 * [1,0,0] = [11, 11, 10], sum = 2^5 = 32. - Gary W. Adamson, Mar 13 2009
For n>=1, a(n-1) is the number of generalized compositions of n when there are i^2/2 - 3*i/2 + 1 different types of i, (i=1,2,...). - Milan Janjic, Sep 24 2010
Let M be any endomorphism on any vector space, such that M^3 = 1 (identity). Then (1+M)^n = A024493(n) + A024494(n)*M + a(n)*M^2. - Stanislav Sykora, Jun 10 2012
{A024493, A131708, A024495} is the difference analog of the hyperbolic functions {h_1(x), h_2(x), h_3(x)} of order 3. For the definitions of {h_i(x)} and the difference analog {H_i(n)} see [Erdelyi] and the Shevelev link respectively. - Vladimir Shevelev, Aug 01 2017
This is the p-INVERT of (1,1,1,1,1,...) for p(S) = 1 - S^3; see A291000. - Clark Kimberling, Aug 24 2017

References

  • A. Erdelyi, Higher Transcendental Functions, McGraw-Hill, 1955, Vol. 3, Chapter XVIII.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, 2nd. ed., Problem 38, p. 70.

Crossrefs

Sequences of the form 1/((1-x)^m - x^m): A000079 (m=1,2), this sequence (m=3), A000749 (m=4), A049016 (m=5), A192080 (m=6), A049017 (m=7), A290995 (m=8), A306939 (m=9).

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 30); [0,0] cat Coefficients(R!( x^2/((1-x)^3-x^3) )); // G. C. Greubel, Apr 11 2023
    
  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, 2*a(n-1)+
          [-1, 0, 1, 1, 0, -1, -1][1+(n mod 6)])
        end:
    seq(a(n), n=0..33); # Paul Weisenhorn, May 17 2020
  • Mathematica
    LinearRecurrence[{3,-3,2},{0,0,1},40] (* Harvey P. Dale, Sep 20 2016 *)
  • PARI
    a(n) = sum(k=0,n\3,binomial(n,3*k+2)) /* Michael Somos, Feb 14 2006 */
    
  • PARI
    a(n)=if(n<0, 0, ([1,0,1;1,1,0;0,1,1]^n)[3,1]) /* Michael Somos, Feb 14 2006 */
    
  • SageMath
    def A024495(n): return (2^n - chebyshev_U(n, 1/2) - chebyshev_U(n-1, 1/2))/3
    [A024495(n) for n in range(41)] # G. C. Greubel, Apr 11 2023

Formula

a(n) = ( 2^n + 2*cos((n-4)*Pi/3) )/3 = (2^n - A057079(n))/3.
a(n) = 2*a(n-1) + A010892(n-2) = a(n-1) + A024494(n-1). With initial zero, binomial transform of A011655 which is effectively A010892 unsigned. - Henry Bottomley, Jun 04 2001
a(2) = 1, a(3) = 3, a(n+2) = a(n+1) - a(n) + 2^n. - Benoit Cloitre, Sep 04 2002
a(n) = Sum_{k=0..n} 2^k*2*sin(Pi*(n-k)/3 + Pi/3)/sqrt(3) (offset 0). - Paul Barry, May 18 2004
G.f.: x^2/((1-x)^3 - x^3) = x^2 / ( (1-2*x)*(1-x+x^2) ).
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3). - Paul Curtz, Nov 18 2007
a(n) + A024493(n-1) = A131577(n). - Paul Curtz, Jan 24 2008
From Paul Curtz, May 29 2011: (Start)
a(n) + a(n+3) = 3*2^n = A007283(n).
a(n+6) - a(n) = 21*2^n = A175805(n).
a(n) + a(n+9) = 171*2^n.
a(n+12) - a(n) = 1365*2^n. (End)
a(n) = A113405(n) + A113405(n+1). - Paul Curtz, Jun 05 2011
Start with x(0)=1, y(0)=0, z(0)=0 and set x(n+1) = x(n) + z(n), y(n+1) = y(n) + x(n), z(n+1) = z(n) + y(n). Then a(n) = z(n). - Stanislav Sykora, Jun 10 2012
G.f.: -x^2/( x^3 - 1 + 3*x/Q(0) ) where Q(k) = 1 + k*(x+1) + 3*x - x*(k+1)*(k+4)/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Mar 15 2013
a(n) = 1/18*(-4*(-1)^floor((n - 1)/3) - 6*(-1)^floor(n/3) - 3*(-1)^floor((n + 1)/3) + (-1)^(1 + floor((n + 2)/3)) + 3*2^(n + 1)). - John M. Campbell, Dec 23 2016
a(n) = (1/63)*(-40 + 21*2^n - 42*floor(n/6) + 32*floor((n+3)/6) + 16*floor((n+ 4)/6) - 24*floor((n+5)/6) - 22*floor((n+7)/6) + 21*floor((n+8)/6) + 10*floor((n+9)/6) + 5*floor((n+10)/6) + 3*floor((n+11)/6) + floor((n+ 13)/6)). - John M. Campbell, Dec 24 2016
a(n+m) = a(n)*A024493(m) + A131708(n)*A131708(m) + A024493(n)*a(m). - Vladimir Shevelev, Aug 01 2017
From Kevin Ryde, Sep 24 2020: (Start)
a(n) = (1/3)*2^n - (1/3)*cos((1/3)*Pi*n) - (1/sqrt(3))*sin((1/3)*Pi*n). [Cournot]
a(n) + A111927(n) + A131708(n) = 2^n - 1. [Cournot, page 96 last formula, but misprint should be 2^x - 1 rather than 2^p - 1] (End)
E.g.f.: (exp(2*x) - exp(x/2)*(cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)))/3. - Stefano Spezia, Feb 06 2025

A082311 A Jacobsthal sequence trisection.

Original entry on oeis.org

1, 5, 43, 341, 2731, 21845, 174763, 1398101, 11184811, 89478485, 715827883, 5726623061, 45812984491, 366503875925, 2932031007403, 23456248059221, 187649984473771, 1501199875790165, 12009599006321323, 96076792050570581, 768614336404564651, 6148914691236517205
Offset: 0

Views

Author

Paul Barry, Apr 09 2003

Keywords

Crossrefs

Programs

  • Magma
    [2*8^n/3+(-1)^n/3 : n in [0..30]]; // Vincenzo Librandi, Aug 13 2011
    
  • Mathematica
    f[n_] := (2*8^n + (-1)^n)/3; Array[f, 25, 0] (* Robert G. Wilson v, Aug 13 2011 *)
  • PARI
    x='x+O('x^30); Vec((1-2*x)/((1+x)*(1-8*x))) \\ G. C. Greubel, Sep 16 2018

Formula

a(n) = (2*8^n + (-1)^n)/3 = A001045(3*n+1).
From R. J. Mathar, Feb 23 2009: (Start)
a(n) = 7*a(n-1) + 8*a(n-2).
G.f.: (1-2*x)/((1+x)*(1-8*x)). (End)
a(n) = A024494(3*n+1). a(n) = 8*a(n-1) + 3*(-1)^n. Sum of digits = A070366. - Paul Curtz, Nov 20 2007
a(n)= A007613(n) + A132805(n) = A081374(1+3*n). - Paul Curtz, Jun 06 2011
E.g.f.: (cosh(x) + 2*cosh(8*x) - sinh(x) + 2*sinh(8*x))/3. - Stefano Spezia, Jul 15 2024

A132804 A trisection of A024495.

Original entry on oeis.org

0, 6, 42, 342, 2730, 21846, 174762, 1398102, 11184810, 89478486, 715827882, 5726623062, 45812984490, 366503875926, 2932031007402, 23456248059222, 187649984473770, 1501199875790166, 12009599006321322, 96076792050570582, 768614336404564650
Offset: 0

Views

Author

Paul Curtz, Nov 18 2007

Keywords

Crossrefs

Programs

Formula

G.f.: 6*x/(1-7*x-8*x^2). a(n+1) = 7*a(n)+8*a(n-1) for n>=1, a(0)=0, a(1)=6. - Philippe Deléham, Nov 19 2007
a(n) = 2*A132805(n). - R. J. Mathar, Jun 07 2011
From Oboifeng Dira, Jun 05 2020: (Start)
a(n) = A078008(3n+1). Second trisection of A078008.
a(n) = 6*A015565(n).
a(n) = Sum_{k=0..n} binomial(3*n+1,3*k+2). (End)

A242563 a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4), a(0)=a(1)=0, a(2)=2, a(3)=3.

Original entry on oeis.org

0, 0, 2, 3, 6, 10, 21, 42, 86, 171, 342, 682, 1365, 2730, 5462, 10923, 21846, 43690, 87381, 174762, 349526, 699051, 1398102, 2796202, 5592405, 11184810, 22369622, 44739243, 89478486, 178956970, 357913941, 715827882, 1431655766, 2863311531, 5726623062, 11453246122
Offset: 0

Views

Author

Paul Curtz, May 17 2014

Keywords

Comments

Generally, a(n) is an autosequence if its inverse binomial transform is (-1)^n*a(n). It is of the first kind if the main diagonal is 0's and the first two upper diagonals (just above the main one) are the same. It is of the second kind if the main diagonal is equal to the first upper diagonal multiplied by 2. If the first upper diagonal is an autosequence, the sequence is a super autosequence. Example: A113405. The first upper diagonal is A001045(n). Another super autosequence: 0, 0, 0 followed by A059633(n). The first upper diagonal is A000045(n).
Difference table of a(n):
0, 0, 2, 3, 6, 10, 21, 42, ...
0, 2, 1, 3, 4, 11, 21, 44, ...
2, -1, 2, 1, 7, 10, 23, 41, ...
-3, 3, -1, 6, 3, 13, 18, 45, ... .
This is an autosequence of the second kind. The main diagonal is 2*A001045(n) = A078008(n). More precisely it is a super autosequence, companion of A113405(n).
a(n+1) mod 10 = period 12: repeat 0, 2, 3, 6, 0, 1, 2, 6, 1, 2, 2, 5.
It is shifted A081374(n+1) mod 10 =
period 12: repeat 1, 2, 2, 5, 0, 2, 3, 6, 0, 1, 2, 6.
a(n) mod 9 = period 18:
repeat 0, 0, 2, 3, 6, 1, 3, 6, 5, 0, 0, 7, 6, 3, 8, 6, 3, 4 = c(n).
c(n) + c(n+9) = 0, 0, 9, 9, 9, 9, 9, 9, 9.

Examples

			G.f. = 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 21*x^6 + 42*x^7 + 86*x^8 + ...
		

Crossrefs

Cf. A000032, 1/(n+1), A164555/A027642 (all autosequences of 2nd kind). A007283, A175805.

Programs

  • Mathematica
    a[n_] := (m = Mod[n, 6]; 1/3*(2^n + (-1)^n + 1/120*(m-6)*(m+1)*(m^3-29*m+40))); Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 19 2014, a non-recursive formula, after Mathematica's RSolve *)
    LinearRecurrence[{2, 0, -1, 2}, {0, 0, 2, 3},50] (* G. C. Greubel, Feb 21 2017 *)
  • PARI
    concat([0,0], Vec(x^2*(x-2)/((x+1)*(2*x-1)*(x^2-x+1)) + O(x^100))) \\ Colin Barker, May 18 2014

Formula

a(n+3) = 3*2^n - a(n), a(0)=a(1)=0, a(2)=2.
a(n) = 2*A113405(n+1) - A113405(n).
a(n+1) = 2*a(n) + period 6: repeat 0, 2, -1, 0, -2, 1. a(0)=0.
a(n) = 2^n - A081374(n+1).
a(n+3) = a(n+1) + A130755(n).
G.f.: x^2*(x-2) / ((x+1)*(2*x-1)*(x^2-x+1)). - Colin Barker, May 18 2014
a(n) = A024495(n) + A131531(n).
a(n+6) = a(n) + 21*2^n, a(0)=a(1)=0, a(2)=2, a(3)=3, a(4)=6, a(5)=10.
a(n) = A001045(n) - A092220(n).
a(n+12) = a(n) + 1365*2^n. First 12 values in the Data. (A024495(n+12) = A024495(n) + 1365*2^n).
a(3n) = A132805(n) = 3*A015565(n).
a(3n+1) = A132804(n) = 6*A015565(n).
a(3n+2) = A132397(n) = 2*A082311(n).
a(n) = 1/3*((-1)^n - 2*cos((n*Pi)/3) + 2^n). - Alexander R. Povolotsky, Jun 02 2014

Extensions

More terms from Colin Barker, May 18 2014

A132397 Second trisection of A024494.

Original entry on oeis.org

2, 10, 86, 682, 5462, 43690, 349526, 2796202, 22369622, 178956970, 1431655766, 11453246122, 91625968982, 733007751850, 5864062014806, 46912496118442, 375299968947542, 3002399751580330, 24019198012642646, 192153584101141162
Offset: 0

Views

Author

Paul Curtz, Nov 20 2007

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[2(2x-1)/((x+1)(8x-1)),{x,0,30}],x] (* or *) LinearRecurrence[{7,8},{2,10},30] (* Harvey P. Dale, Oct 14 2015 *)
  • PARI
    Vec(2*(1 - 2*x) / ((1 + x)*(1 - 8*x)) + O(x^20)) \\ Colin Barker, Jun 05 2020

Formula

O.g.f.: 2(2x-1)/((x+1)(8x-1)). a(n) = 2*A082311(n). - R. J. Mathar, Jan 13 2008
a(0)=2, a(1)=10, a(n) = 7*a(n-1)+8*a(n-2). - Harvey P. Dale, Oct 14 2015
From Oboifeng Dira, Jun 05 2020: (Start)
a(n) = A078008(3*n+2). Third trisection of A078008.
a(n) = Sum_{k=0..n} binomial(3*n+2,3*k+1).
(End)
a(n) = 2*((-1)^n + 2^(1+3*n)) / 3 for n>1. - Colin Barker, Jun 05 2020

Extensions

More terms from R. J. Mathar, Jan 13 2008

A141355 The Jacobsthal sequence, dropping each third term.

Original entry on oeis.org

1, 1, 5, 11, 43, 85, 341, 683, 2731, 5461, 21845, 43691, 174763, 349525, 1398101, 2796203, 11184811, 22369621, 89478485, 178956971, 715827883, 1431655765, 5726623061, 11453246123, 45812984491, 91625968981, 366503875925, 733007751851
Offset: 0

Views

Author

Paul Curtz, Aug 03 2008

Keywords

Comments

A001045 after removal of the subsequence A132805.

Programs

  • Python
    def A141355(n): return ((1<<(n+1<<1)-(n+1>>1)-1)|1)//3 # Chai Wah Wu, Apr 19 2025

Formula

a(2n+1)-a(2n) = 6*A015565(n).
a(4n+1)=2a(4n)-1. a(4n+2)=4a(4n+1)+1. a(4n+3)=2a(4n+2)+1. a(4n+4)=4a(4n+3)-1.
a(2n)= A082311(n). a(2n+1) = A082365(n). - R. J. Mathar, Feb 23 2009
a(n)=7*a(n-2)+8*a(n-4). G.f.: (1+x-2*x^2+4*x^3)/((1-8*x^2)*(1+x^2)). - R. J. Mathar, Feb 23 2009

Extensions

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

A352692 a(n) + a(n+1) = 2^n for n >= 0 with a(0) = 4.

Original entry on oeis.org

4, -3, 5, -1, 9, 7, 25, 39, 89, 167, 345, 679, 1369, 2727, 5465, 10919, 21849, 43687, 87385, 174759, 349529, 699047, 1398105, 2796199, 5592409, 11184807, 22369625, 44739239, 89478489, 178956967, 357913945, 715827879, 1431655769, 2863311527, 5726623065, 11453246119, 22906492249
Offset: 0

Views

Author

Paul Curtz, Mar 29 2022

Keywords

Comments

Difference table D(n,k) = D(n-1,k+1) - D(n-1,k), D(0,k) = a(k):
4, -3, 5, -1, 9, 7, 25, ...
-7, 8, -6, 10, -2, 18, 14, 50, ...
15, -14, 16, -12, 20, -4, 36, 28, 100, ...
-29, 30, -28, 32, -24, 40, -8, 72, 56, 200, ...
59, -58, 60, -56, 64, -48, 80, -16, 144, 112, 400, ...
...
The diagonals are given by D(n,n+k) = a(k)*2^n.
D(n,1) = -(-1)^n* A340627(n).
a(n) - a(n) = 0, 0, 0, 0, 0, ... (trivially)
a(n+1) + a(n) = 1, 2, 4, 8, 16, ... = 2^n (by definition)
a(n+2) - a(n) = 1, 2, 4, 8, 16, ... = 2^n
a(n+3) + a(n) = 3, 6, 12, 24, 48, ... = 2^n*3
a(n+4) - a(n) = 5, 10, 20, 40, 80, ... = 2^n*5
a(n+5) + a(n) = 11, 22, 44, 88, 176, ... = 2^n*11
(...)
This table is given by T(r,n) = A001045(r)*2^n with r, n >= 0.
Sums of antidiagonals are A045883(n).
Main diagonal: A192382(n).
First upper diagonal: A054881(n+1).
First subdiagonal: A003683(n+1).
Second subdiagonal: A246036(n).
Now consider the array from c(n) = (-1)^n*a(n) with its difference table:
4, 3, 5, 1, 9, -7, 25, -39, ... = c(n)
-1, 2, -4, 8, -16, 32, -64, 128, ... = -A122803(n)
3, -6, 12, -24, 48, -96, 192, -384, ... =
-9, 18, -36, 72, -144, 288, -576, 1152, ...
27, -54, 108, -216, 432, -864, 1728, -3456, ...
...
The first subdiagonal is -A000400(n). The second is A169604(n).

Crossrefs

If a(0) = k then A001045 (k=0), A078008 (k=1), A140966 (k=2), A154879 (k=3), this sequence (k=4).
Essentially the same as A115335.

Programs

  • Maple
    a := proc(n) option remember; ifelse(n = 0, 4, 2^(n-1) - a(n-1)) end: # Peter Luschny, Mar 29 2022
    A352691 := proc(n)
        (11*(-1)^n + 2^n)/3
    end proc: # R. J. Mathar, Apr 26 2022
  • Mathematica
    LinearRecurrence[{1, 2}, {4, -3}, 40] (* Amiram Eldar, Mar 29 2022 *)
  • PARI
    a(n) = (11*(-1)^n + 2^n)/3; \\ Thomas Scheuerle, Mar 29 2022

Formula

abs(a(n)) = A115335(n-1) for n >= 1.
a(3*n) - (-1)^n*4 = A132805(n).
a(3*n+1) + (-1)^n*4 = A082311(n).
a(3*n+2) - (-1)^n*4 = A082365(n).
From Thomas Scheuerle, Mar 29 2022: (Start)
G.f.: (-4 + 7*x)/(-1 + x + 2*x^2).
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(m + 2*n-k) = a(m)*2^n.
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(1 + n-k) = -(-1)^n*A340627(n).
a(n) = (11*(-1)^n + 2^n)/3.
a(n + 2*m) = a(n) + A002450(m)*2^n.
a(2*n) = A192382(n+1) + (-1)^n*a(n).
a(n) = ( A045883(n) - Sum_{k=0..n-1}(-1)^k*a(k) )/n, for n > 0. (End)
a(n) = A001045(n) + 4*(-1)^n.
a(n+1) = 2*a(n) -11*(-1)^n.
a(n+2) = a(n) + 2^n.
a(n+4) = a(n) + A020714(n).
a(n+6) = a(n) + A175805(n).
a(2*n) = A163868(n).
a(2*n+1) = (2^(2*n+1) - 11)/3.

Extensions

Warning: The DATA is correct, but there may be errors in the COMMENTS, which should be rechecked. - Editors of OEIS, Apr 26 2022
Edited by M. F. Hasler, Apr 26 2022.
Showing 1-7 of 7 results.