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

A230871 Construct a triangle as in the Comments, read nodes from left to right starting at the root and proceeding downwards.

Original entry on oeis.org

0, 1, 1, 3, 2, 2, 4, 8, 3, 5, 3, 5, 7, 9, 11, 21, 5, 7, 7, 13, 5, 7, 7, 13, 11, 17, 13, 23, 19, 25, 29, 55, 8, 12, 10, 18, 12, 16, 18, 34, 8, 12, 10, 18, 12, 16, 18, 34, 18, 26, 24, 44, 22, 30, 32, 60, 30, 46, 36, 64, 50, 66, 76, 144, 13, 19, 17, 31, 17, 23
Offset: 0

Views

Author

Philippe Deléham, Nov 06 2013

Keywords

Comments

The rule for constructing the tree is the following:
.....x
.....|
.....y
..../ \
..y+x..3y-x
and the tree begins like this:
.........0......
.........|......
.........1......
......./ \....
......1.....3....
...../ \.../ \...
....2...2.4...8..
and so on.
Column 1 : 0, 1, 1, 2, 3, 5, 8, ... = A000045 (Fibonacci numbers).
Column 2 : 3, 2, 5, 7, 12, 19, 31, ... = A013655.
Column 3 : 4, 3, 7, 10, 17, 27, 44, ... = A022120.
Column 4 : 8, 5, 13, 18, 31, 49, 80, ... = A022138.
Column 5 : 7, 5, 12, 17, 29, 46, 75, ... = A022137.
Column 6 : 9, 7, 16, 23, 39, 62, 101, ... = A190995.
Column 7 : 11, 7, 18, 25, 43, 68, 111, ... = A206419.
Column 8 : 21, 13, 34, 47, 81, 128, 209, ... = ?
Column 9 : 11, 8, 19, 27, 46, 73, 119, ... = A206420.
The lengths of the rows are 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, ... = A011782 .
The final numbers in the rows are 0, 1, 3, 8, 21, 55, 144, ... = A001906.
The middle numbers in the rows are 1, 2, 5, 13, 34, 89, ... = A001519 .
Row sums for n>=1: 1, 4, 16, 64, 256, 1024, ... = 4^(n-1).

Examples

			The successive rows are:
  0
  1
  1, 3
  2, 2, 4, 8
  3, 5, 3, 5, 7, 9, 11, 21
  5, 7, 7, 13, 5, 7, 7, 13, 11, 17, 13, 23, 19, 25, 29, 55
  ...
		

Crossrefs

Programs

  • Haskell
    data Dtree = Dtree Dtree (Integer, Integer) Dtree
    a230871 n k = a230871_tabf !! n !! k
    a230871_row n = a230871_tabf !! n
    a230871_tabf = [0] : map (map snd) (rows $ deleham (0, 1)) where
       rows (Dtree left (x, y) right) =
            [(x, y)] : zipWith (++) (rows left) (rows right)
       deleham (x, y) = Dtree
               (deleham (y, y + x)) (x, y) (deleham (y, 3 * y - x))
    -- Reinhard Zumkeller, Nov 07 2013
  • Maple
    T:= proc(n, k) T(n, k):= `if`(k=1 and n<2, n, (d->(1+2*d)*
          T(n-1, r)+(1-2*d)*T(n-2, iquo(r+1, 2)))(irem(k+1, 2, 'r')))
        end:
    seq(seq(T(n, k), k=1..max(1, 2^(n-1))), n=0..7); # Alois P. Heinz, Nov 07 2013
  • Mathematica
    T[n_, k_] := T[n, k] = If[k==1 && n<2, n, Function[d, r = Quotient[k+1, 2]; (1+2d) T[n-1, r] + (1-2d) T[n-2, Quotient[r+1, 2]]][Mod[k+1, 2]]];
    Table[T[n, k], {n, 0, 7}, {k, 1, Max[1, 2^(n-1)]}] // Flatten (* Jean-François Alcover, Apr 11 2017, after Alois P. Heinz *)

Extensions

Incorrect formula removed by Michel Marcus, Sep 23 2023

A127830 a(n) = Sum_{k=0..n} (binomial(floor(k/2),n-k) mod 2).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 3, 3, 3, 2, 2, 3, 2, 3, 5, 5, 4, 4, 5, 4, 3, 3, 3, 4, 4, 3, 4, 5, 3, 5, 8, 8, 7, 6, 7, 7, 5, 6, 8, 7, 6, 5, 5, 5, 4, 4, 5, 6, 5, 5, 7, 6, 4, 5, 6, 7, 7, 5, 6, 8, 5, 8, 13, 13, 11, 10, 12, 11, 8, 9, 11, 11, 10, 8, 9, 10, 7, 9, 13, 12
Offset: 0

Views

Author

Paul Barry, Feb 01 2007

Keywords

Comments

Row sums of number triangle A127829.
From Johannes W. Meijer, Jun 05 2011: (Start)
The Ze3 and Ze4 triangle sums, see A180662 for their definitions, of Sierpinski's triangle A047999 equal this sequence.
The sequences A127830(2^n-p), p>=0, are apparently all Fibonacci like sequences, i.e., the next term is the sum of the two nonzero terms that precede it; see the crossrefs. (End)

Crossrefs

Cf.: A000045 (p=0), A000204 (p=7), A001060 (p=13), A000285 (p=14), A022095 (p=16), A022120 (p=24), A022121 (p=25), A022113 (p=28), A022096 (p=30), A022097 (p=31), A022098 (p=32), A022130 (p=44), A022137 (p=48), A022138 (p=49), A022122 (p=52), A022114 (p=53), A022123 (p=56), A022115 (p=60), A022100 (p=62), A022101 (p=63), A022103 (p=64), A022136 (p=79), A022388 (p=80), A022389 (p=88). - Johannes W. Meijer, Jun 05 2011

Programs

  • Maple
    A127830 := proc(n) local k: option remember: add(binomial(floor(k/2), n-k) mod 2, k=0..n) end: seq(A127830(n), n=0..80); # Johannes W. Meijer, Jun 05 2011
  • Mathematica
    Table[Sum[Mod[Binomial[Floor[k/2],n-k],2],{k,0,n}],{n,0,80}] (* James C. McMahon, Jan 04 2025 *)
  • Python
    def A127830(n): return sum(not ~(k>>1)&n-k for k in range(n+1)) # Chai Wah Wu, Jul 29 2025

Formula

a(2^n) = F(n); a(2^(n+1)+1) = L(n).
a(n) mod 2 = A000931(n+5) mod 2 = A011656(n+4).

A271315 Array T(n,k) read by diagonals: T(n,k) = T(n,k-1) + T(n,k-2) where T(n,0) = F(n+1), T(n,1) = F(n); F(n) = Fibonacci(n) = A000045(n).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 1, 2, 1, 3, 2, 3, 3, 2, 5, 3, 5, 4, 5, 3, 8, 5, 8, 7, 7, 8, 5, 13, 8, 13, 11, 12, 11, 13, 8, 21, 13, 21, 18, 19, 19, 18, 21, 13, 34, 21, 34, 29, 31, 30, 31, 29, 34, 21, 55, 34, 55, 47, 50, 49, 49, 50, 47, 55, 34, 89
Offset: 0

Views

Author

Bob Selcoe, Apr 03 2016

Keywords

Comments

The array is built by treating rows as Fibonacci-type sequences with seed values being two consecutive Fibonacci numbers (A000045(n) = F(n)) in reverse order: For row n, a(0) = F(n+1), a(1) = F(n). As a result, columns are Fibonacci-type sequences with seed values b(0) = F(k-1), b(1) = F(k+1); so starting with T(n,1), Row n == Column k=n+1.
Therefore, an alternative title is: Array T(n,k) read by diagonals: T(n,k) = T(n-1,k) + T(n-2,k) where T(0,k) = F(k-1) and T(1,k) = F(k+1), k>=1.
Patterns exist for certain generalized (a,b)-Pascal triangle transforms of row sequences. Definitions, explanation and examples: (Start)
Define (a,b)-Pascal triangles as having conditions T(0,0) = 1, a = left boundary and b = right boundary.
Let R_n be Row n, and R_n(k) be terms k in sequence R_n.
Let Tr_(k) be the (a,b)-Pascal triangle transform of R_n; define Tr_n(k) as when a = R_n(1) and b = R_n(0). Then Tr_n(k) = R_n(n+2k-2), k>=1. (Trivially, Tr_n(0) = R_n(0)).
For example, n=4: R_4 = {5, 3, 8, 11, 19, 30, 49, 79, 128, 207, 335, 542...}; a=3, b=5.
(3,5)-Pascal triangle is:
1
3 5
3 8 5
3 11 13 5
3 14 24 18 5
etc.
Transform Tr_4(k) is:
Tr_4(0) = 5*1 = 5 = R_4(0).
Tr_4(1) = 5*3 + 3*5 = 30 = R_4(5).
Tr_4(2) = 5*3 + 3*8 + 8*5 = 79 = R_4(7).
Tr_4(3) = 5*3 + 3*11 + 8*13 + 11*5 = 207 = R_4(9).
Tr_4(4) = 5*3 + 3*14 + 8*24 + 11*18 + 19*5 = 542 = R_4(11).
etc.
Examples of sequences where such transforms apply:
Tr_0 = A001906 starting A001906(0)=0.
Tr_1 = A001519 starting A001519(2)=2.
Tr_2 = A002878 starting A002878(1)=4.
Tr_4 = A167375 starting A167375(3)=30.
(End)

Examples

			Array Starts:
  n/k   0   1   2    3    4    5    6    7     8     9     10
  0     1   0   1    1    2    3    5    8     13    21    34
  1     1   1   2    3    5    8    13   21    34    55    89
  2     2   1   3    4    7    11   18   29    47    76    123
  3     3   2   5    7    12   19   31   50    81    131   212
  4     5   3   8    11   19   30   49   79    128   207   335
  5     8   5   13   18   31   49   80   129   209   338   547
  6     13  8   21   29   50   79   129  208   337   545   882
  7     21  13  34   47   81   128  209  337   546   883   1429
  8     34  21  55   76   131  207  338  545   883   1428  2311
  9     55  34  89   123  212  335  547  882   1429  2311  3740
  10    89  55  144  199  343  542  885  1427  2312  3739  6051
Row 7 starts {21,13} because A000045(8)=21 and A000045(7)=13.
T(9,2)=89 + T(9,3)=123 = T(9,4)=212; alternatively, T(7,4)=81 + T(8,4)=131 = T(9,4)=212.
		

Crossrefs

Cf. A000045 (Fibonacci numbers).
Cf. additional sequences related to rows and columns: A000032 (Lucas numbers), A013655, A022121, A022138, A206610.
Cf. sequences related to falling diagonals: A061646, A079472.
Cf. sequences related to (a,b)-Pascal triangle transforms of rows: A001906, A001519, A002878, A167375.

Programs

  • PARI
    {T(n, k) = fibonacci(n) * fibonacci(k) + fibonacci(n+1) * fibonacci(k-1)}; /* Michael Somos, Apr 03 2016 */

Formula

T(n,k) = T(n,k-1) + T(n,k-2) = T(n-1,k) + T(n-2,k).
T(n,n) = T(n-1,n+1) = A061646(n).
T(n,n+1) = A079472(n+1). Omitting T(n,0), the array is symmetric about this falling diagonal.
Treating rows and columns as individual sequences, let R_n be Row n and C_k be Column k; let R_n(k) and C_k(n) be terms k and n, respectively, in these sequences:
C_0(n) = A000045(n+1).
R_0(k) = A000045(k-1); C_1(n) = A000045(n).
R_1(k) = A000045(k+1); C_2(n) = A000045(n+2).
R_2(k) = A000032(k); C_3(n) = A000032(n+1) .
R_3(k) = A013655(k); C_4(n) = A013655(n+1).
R_4(k) = A022121(k-1); C_5(n) = A022121(n).
R_5(k) = A022138(k-1); C_6(n) = A022138(n).
R_6(k) = A206610(k+1); C_7(n) = A206610(n+2).
Showing 1-3 of 3 results.