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

A142584 a(n) = A014217(n+1) - A115360(n+2).

Original entry on oeis.org

2, 4, 6, 10, 18, 28, 46, 76, 122, 198, 322, 520, 842, 1364, 2206, 3570, 5778, 9348, 15126, 24476, 39602, 64078, 103682, 167760, 271442, 439204, 710646, 1149850, 1860498, 3010348, 4870846, 7881196, 12752042, 20633238, 33385282, 54018520, 87403802, 141422324, 228826126
Offset: 1

Views

Author

Paul Curtz, Sep 21 2008

Keywords

Crossrefs

Programs

  • Magma
    [Lucas(n+1) - (1/2)*(1 + (-1)^((n+2) mod 3)): n in [1..45]]; // G. C. Greubel, Apr 14 2021
    
  • Mathematica
    Table[LucasL[n+1] - (1/2)*(1+(-1)^Mod[n+2, 3]), {n, 45}] (* G. C. Greubel, Apr 14 2021 *)
  • Sage
    [lucas_number2(n+1,1,-1) - (1/2)*(1 + (-1)^((n+2)%3)) for n in (1..45)] # G. C. Greubel, Apr 14 2021

Formula

a(n) = Lucas(n+1) - (1/2)*(1 + (-1)^((n+2) mod 3)). - G. C. Greubel, Apr 14 2021

Extensions

Edited by Omar E. Pol and N. J. A. Sloane, Jan 06 2009
More terms from Daniel Suteu, Nov 24 2019

A115359 Matrix (1,x)-(x,x^2) in Riordan array notation.

Original entry on oeis.org

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

Views

Author

Paul Barry, Jan 21 2006

Keywords

Examples

			Triangle begins:
n\k|  0   1   2   3   4   5   6   7   8   9
---+-----------------------------------------
0  |  1;
1  | -1,  1;
2  |  0,  0,  1;
3  |  0, -1,  0,  1;
4  |  0,  0,  0,  0,  1;
5  |  0,  0, -1,  0,  0,  1;
6  |  0,  0,  0,  0,  0,  0,  1;
7  |  0,  0,  0, -1,  0,  0,  0,  1;
8  |  0,  0,  0,  0,  0,  0,  0,  0,  1;
9  |  0,  0,  0,  0, -1,  0,  0,  0,  0,  1;
etc. Row and column numbering added by _Antti Karttunen_, Jan 19 2025
		

Crossrefs

Row sums are 1,0,1,0,1,0... (A059841), Diagonal sums are A115360. Inverse is A115361.
Cf. also A115356.

Programs

  • PARI
    tabl(nn) = {T = matrix(nn, nn, n, k, n--; k--; if ((n==k), 1, if (n==2*k+1, -1, 0))); for (n=1, nn, for (k=1, n, print1(T[n, k], ", ");); print(););} \\ Michel Marcus, Mar 28 2015
    
  • PARI
    A115359off1(n) = (ispolygonal(n,3)-(!(n%2) && issquare(n/2))); \\ (This is one-based)
    A115359(n) = A115359off1(1+n); \\ (zero-based) - Antti Karttunen, Jan 19 2025

Formula

Number triangle T(n, k)=if(n=k, 1, 0) OR if(n=2k+1, -1, 0).
a(n) = A010054(n) - A379480(n). [As a flat sequence with starting offset 1] - Antti Karttunen, Jan 19 2025
Showing 1-2 of 2 results.