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

A021823 Decimal expansion of 1/819.

Original entry on oeis.org

0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1
Offset: 0

Views

Author

Keywords

Comments

Partial sums of A010892. - Paul Barry, Jun 06 2003
Expansion in any base b >= 3 of 1/((b-1)*(b^2-b+1)) = 1/(b^3-2b^2+2b-1). E.g., 1/14 in base 3, 1/39 in base 4, 1/84 in base 5, etc. - Franklin T. Adams-Watters, Nov 07 2006
a(n) is the second least significant digit in the ternary representation of 2^n (cf. A004642). - Alexandre Herrera, Oct 09 2023

Examples

			0.0012210012210012210...
		

Crossrefs

Cf. A004642, A153130 (2^n mod 9).

Programs

  • Mathematica
    Join[{0,0},RealDigits[1/819,10,120][[1]]] (* or *) PadRight[{},120,{0,0,1,2,2,1}] (* or *) LinearRecurrence[{2,-2,1},{0,0,1},120] (* Harvey P. Dale, Aug 19 2012 *)
  • PARI
    a(n)=1/819. \\ Charles R Greathouse IV, Sep 24 2015

Formula

a(n) = a(n-1)-a(n-2)+1 = 2-a(n-3) = a(n-6). - Henry Bottomley, Apr 12 2000
a(n) = Sum_{k=1..floor(n/2)} (-1)^(k+1)*binomial(n-k, k) = 1-((-1)^floor(n/3)+(-1)^(floor((n+1)/3)))/2. - Vladeta Jovovic, Feb 10 2003
G.f.: x^2/(1-2x+2x^2-x^3)=x^2/((1-x)(x^2-x+1)). - Paul Barry, Jun 06 2003
a(n+2) = sum{k=0..n, binomial(n-2k, n-k)}. - Paul Barry, Jan 15 2005
a(0)=0, a(1)=0, a(2)=1, a(n)=2*a(n-1)-2*a(n-2)+a(n-3). - Harvey P. Dale, Aug 19 2012

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

Original entry on oeis.org

1, 4, 9, 14, 15, 8, -7, -22, -21, 12, 77, 142, 143, 16, -239, -494, -493, 20, 1045, 2070, 2071, 24, -4071, -8166, -8165, 28, 16413, 32798, 32799, 32, -65503, -131038, -131037, 36, 262181, 524326, 524327, 40, -1048535, -2097110, -2097109, 44, 4194349, 8388654, 8388655
Offset: 0

Views

Author

Philippe Deléham, Dec 08 2016

Keywords

Comments

Partial sums of A077860.

Crossrefs

Programs

  • PARI
    Vec(1 / ((1 - x)^2*(1 - 2*x + 2*x^2)) + O(x^50)) \\ Colin Barker, Aug 04 2017
    
  • PARI
    {a(n) = sum(k=0, n\2, (-1)^k*binomial(n+3, 2*k+3))} \\ Seiichi Manyama, Apr 07 2019

Formula

a(n) = 4*a(n-1) - 7*a(n-2) + 6*a(n-3) - 2*a(n-4) for n>3.
a(n) = 2*a(n-1) - 2*a(n-2) + n + 1, with a(-1) = a(-2) = 0.
a(n) = (3 - (1-i)^(1+n) - (1+i)^(1+n) + n) where i=sqrt(-1). - Colin Barker, Aug 04 2017
From Seiichi Manyama, Apr 07 2019: (Start)
a(n) = Sum_{k=0..floor(n/2)} (-1)^k*binomial(n+3,2*k+3).
a(n) = Sum_{i=0..n} Sum_{j=0..n-i} (-1)^j * binomial(i+1,j+1) * binomial(n-i+1,j+1). (End)

A279231 Expansion of g.f. 1/((1 - x)^2*(1 - 3*x + 3*x^2)).

Original entry on oeis.org

1, 5, 15, 34, 62, 90, 91, 11, -231, -716, -1444, -2172, -2171, 17, 6579, 19702, 39386, 59070, 59071, 23, -177123, -531416, -1062856, -1594296, -1594295, 29, 4782999, 14348938, 28697846, 43046754, 43046755, 35, -129140127, -387420452, -774840940, -1162261428
Offset: 0

Views

Author

Philippe Deléham, Dec 08 2016

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1/((1-x)^2(1-3x+3x^2)),{x,0,40}],x] (* or *) LinearRecurrence[{5,-10,9,-3},{1,5,15,34},40] (* Harvey P. Dale, Aug 03 2025 *)
  • PARI
    Vec(1/((1-x)^2*(1-3*x+3*x^2)) + O(x^30)) \\ Colin Barker, Dec 08 2016

Formula

a(n) = 5*a(n-1) - 10*a(n-2) + 9*a(n-3) - 3*a(n-4) for n > 3.
a(n) = 3*a(n-1) - 3*a(n-2) + n + 1, with a(-1) = a(-2) = 0.
a(n) = 4 + n + 3^(1+n/2)*(sqrt(3)*sin(n*Pi/6) - cos(n*Pi/6)). - Stefano Spezia, Feb 11 2023
a(n) = Sum_{k=0..floor(n/3)} (-1)^k*binomial(n+4,3*k+4). - Taras Goy, Jan 03 2025
E.g.f.: exp(x)*(4 + x - 3*exp(x/2)*(cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))). - Stefano Spezia, Jan 03 2025

Extensions

Incorrect term corrected by Colin Barker, Dec 09 2016

A122434 Expansion of (1+x)^3/(1+x+x^2).

Original entry on oeis.org

1, 2, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0
Offset: 0

Views

Author

Paul Barry, Sep 04 2006

Keywords

Comments

Row sums of number triangle A122433. Binomial transform is A077859.

Programs

  • Mathematica
    CoefficientList[Series[(1+x)^3/(1+x+x^2),{x,0,70}],x] (* or *) PadRight[ {1,2,0},71,{-1,1,0}] (* Harvey P. Dale, Apr 25 2012 *)

Formula

a(n) = 2*sqrt(3)*cos(2*Pi*n/3+Pi/6)/3+C(1,n)+C(0,n).
a(n) = -A049347(n) if n>=2 . - R. J. Mathar, Feb 08 2008

A144083 Triangle read by rows: partial sums from the right of an A010892 subsequences decrescendo triangle.

Original entry on oeis.org

1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 1, 0, 0, 1, 2, 2, 1, 2, 1, 0, 0, 1, 2, 2, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1
Offset: 0

Views

Author

Gary W. Adamson, Sep 10 2008

Keywords

Comments

n-th row = (n+1) terms of an infinitely periodic cycle: (..., 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1), shifting to the right one place for the next row.
Construct an A010892 decrescendo triangle: (1; 1,1; 0,1,1; -1,0,1,1; ...) and take partial sums starting from the right.

Examples

			First few rows of the triangle:
  1;
  2, 1;
  2, 2, 1;
  1, 2, 2, 1;
  0, 1, 2, 2, 1;
  0, 0, 1, 2, 2, 1;
  1, 0, 0, 1, 2, 2, 1;
  2, 1, 0, 0, 1, 2, 2, 1;
  2, 2, 1, 0, 0, 1, 2, 2, 1;
  1, 2, 2, 1, 0, 0, 1, 2, 2, 1;
  0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 1;
  ...
Row 3 = (1, 2, 2, 1) = partial sums of (-1, 0, 1, 1).
		

Crossrefs

Cf. A010892, A077859 (row sums), A164965 (1st column).

Programs

  • Mathematica
    A010892[n_]:={1, 1, 0, -1, -1,0}[[Mod[n, 6]+1]]; T[n_,k_]:=1+A010892[n-k-1]; Table[T[n,k], {n,0, 11},{k,0,n}]//Flatten (* Stefano Spezia, Feb 11 2023 *)

Formula

T(n, k) = 1 + A010892(n-k-1), with 0 <= k <= n. - Stefano Spezia, Feb 11 2023

A359626 a(n) is equal to the number of filled unit triangles in a regular triangle whose coloring scheme is given in the comments.

Original entry on oeis.org

1, 4, 9, 15, 21, 27, 34, 43, 54, 66, 78, 90, 103, 118, 135, 153, 171, 189, 208, 229, 252, 276, 300, 324, 349, 376, 405, 435, 465, 495, 526, 559, 594, 630, 666, 702, 739, 778, 819, 861, 903, 945, 988, 1033, 1080, 1128, 1176, 1224, 1273, 1324, 1377, 1431, 1485, 1539, 1594, 1651, 1710, 1770, 1830, 1890, 1951, 2014, 2079
Offset: 1

Views

Author

Nicolay Avilov, Apr 20 2023

Keywords

Comments

A regular triangle with side n is divided by segments parallel to the sides of the triangle into n^2 unit triangles. In it, you can select triangular frames nested inside each other. Coloring them through one, starting from the outer one, we obtain a coloring of unit triangles corresponding to the given sequence. See link.

Examples

			a(7) = 7^2 - 4^2 + 1^2 = 34;
a(8) = 8^2 - 5^2 + 2^2 = 43;
a(9) = 9^2 - 6^2 + 3^2 = 54.
		

Crossrefs

Cf. A000096, A077859 (first differences).

Programs

  • Mathematica
    A359626list[nmax_]:=LinearRecurrence[{4,-7,7,-4,1},{1, 4, 9, 15, 21},nmax];A359626list[100] (* Paolo Xausa, Aug 05 2023 *)

Formula

Let r = n (mod 6), then we get
a(n) = n*(n+3)/2 - 1 if r = 1 or r = 2;
n*(n+3)/2 if r = 0 or r = 3;
n*(n+3)/2 + 1 if r = 4 or r = 5.
From Stefano Spezia, Apr 20 2023: (Start)
O.g.f.: x/((1 - x)^3*(1 - x + x^2)).
E.g.f.: exp(x)*x*(4 + x)/2 - 2*exp(x/2)*sin(sqrt(3)*x/2)/sqrt(3). (End)
a(n) - a(n-1) = A077859(n-1). - R. J. Mathar, Apr 20 2023
Showing 1-6 of 6 results.