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.

A187893 a(0)=1, a(1)=4, a(n) = a(n-1) + a(n-2) - 1.

Original entry on oeis.org

1, 4, 4, 7, 10, 16, 25, 40, 64, 103, 166, 268, 433, 700, 1132, 1831, 2962, 4792, 7753, 12544, 20296, 32839, 53134, 85972, 139105, 225076, 364180, 589255, 953434, 1542688, 2496121, 4038808, 6534928, 10573735, 17108662, 27682396, 44791057, 72473452, 117264508
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{a=1,b=4},Table[c=a+b-1;a=b;b=c,{n,100}]]
    LinearRecurrence[{2,0,-1},{1,4,4},40] (* Harvey P. Dale, Jun 06 2020 *)
  • PARI
    a(n)=3*fibonacci(n)+1 \\ Charles R Greathouse IV, Oct 29 2016

Formula

G.f.: -x*(-1-2*x+4*x^2) / ( (x-1)*(x^2+x-1) ). - R. J. Mathar, Mar 15 2011
a(n) = 1+3*|A039834(n)| = 1+3*A000045(n). - R. J. Mathar, Mar 15 2011

A374438 Triangle read by rows: T(n, k) = T(n - 1, k) + T(n - 2, k - 2), with initial values T(n, k) = k + 1 for k < 3.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 2, 3, 2, 1, 2, 3, 4, 3, 1, 2, 3, 6, 6, 2, 1, 2, 3, 8, 9, 6, 3, 1, 2, 3, 10, 12, 12, 9, 2, 1, 2, 3, 12, 15, 20, 18, 8, 3, 1, 2, 3, 14, 18, 30, 30, 20, 12, 2, 1, 2, 3, 16, 21, 42, 45, 40, 30, 10, 3, 1, 2, 3, 18, 24, 56, 63, 70, 60, 30, 15, 2
Offset: 0

Views

Author

Peter Luschny, Jul 22 2024

Keywords

Comments

See A374439 and the cross-references for comments about this family of triangles, where the recurrence is defined as in the name, but with an additional parameter m for the initial values: T(n, k) = k + 1 for k < m.
As m -> oo, the rows of the triangles become the initial segments of the integers.

Examples

			Triangle starts:
  [ 0] [1]
  [ 1] [1, 2]
  [ 2] [1, 2, 3]
  [ 3] [1, 2, 3,  2]
  [ 4] [1, 2, 3,  4,  3]
  [ 5] [1, 2, 3,  6,  6,  2]
  [ 6] [1, 2, 3,  8,  9,  6,  3]
  [ 7] [1, 2, 3, 10, 12, 12,  9,  2]
  [ 8] [1, 2, 3, 12, 15, 20, 18,  8,  3]
  [ 9] [1, 2, 3, 14, 18, 30, 30, 20, 12,  2]
  [10] [1, 2, 3, 16, 21, 42, 45, 40, 30, 10, 3]
		

Crossrefs

Family of triangles: A162515 (m=1, Fibonacci), A374439 (m=2, Lucas), this triangle (m=3).
Row sums: A187890 (apart from initial terms), also A001060 + 1 (with 1 prepended).
Cf. A006355 (odd sums), A187893 (even sums).
Cf. related to deltas: A065220, A210673.

Programs

  • Maple
    M := 3;  # family index
    T := proc(n, k) option remember; if k > n then 0 elif k < M then k + 1 else
    T(n - 1, k) + T(n - 2, k - 2) fi end:
    seq(seq(T(n, k), k = 0..n), n = 0..11);
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if k > n: return 0
        if k < 3: return k + 1
        return T(n - 1, k) + T(n - 2, k - 2)

A187891 a(0)=0, a(1)=5, a(n)=a(n-1)+a(n-2)-1.

Original entry on oeis.org

0, 5, 4, 8, 11, 18, 28, 45, 72, 116, 187, 302, 488, 789, 1276, 2064, 3339, 5402, 8740, 14141, 22880, 37020, 59899, 96918, 156816, 253733, 410548, 664280, 1074827, 1739106, 2813932, 4553037, 7366968, 11920004, 19286971, 31206974, 50493944, 81700917
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{a=0,b=5},Table[c=a+b-1;a=b;b=c,{n,100}]]
    nxt[{a_,b_}]:={b,a+b-1}; NestList[nxt,{0,5},40][[All,1]] (* Harvey P. Dale, Nov 03 2022 *)

Formula

a(n) = 1+A022120(n-2), n>2. - R. J. Mathar, Mar 15 2011
G.f.: -x^2*(-5+6*x) / ( (x-1)*(x^2+x-1) ). - R. J. Mathar, Mar 15 2011

A187892 a(0)=0, a(1)=6, a(n)=a(n-1)+a(n-2)-1.

Original entry on oeis.org

0, 6, 5, 10, 14, 23, 36, 58, 93, 150, 242, 391, 632, 1022, 1653, 2674, 4326, 6999, 11324, 18322, 29645, 47966, 77610, 125575, 203184, 328758, 531941, 860698, 1392638, 2253335, 3645972, 5899306, 9545277, 15444582, 24989858, 40434439, 65424296, 105858734
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{a=0,b=6},Table[c=a+b-1;a=b;b=c,{n,100}]]
    LinearRecurrence[{2,0,-1},{0,6,5},40] (* Harvey P. Dale, Aug 17 2019 *)

Formula

G.f.: -x^2*(-6+7*x) / ( (x-1)*(x^2+x-1) ). - R. J. Mathar, Mar 15 2011
a(n) = 1+A022130(n-3), n>2. - R. J. Mathar, Mar 15 2011
Showing 1-4 of 4 results.