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.

Previous Showing 31-40 of 43 results. Next

A131411 Triangle read by rows: T(n,k) = Fibonacci(n) + Fibonacci(k) - 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 9, 8, 8, 9, 10, 12, 15, 13, 13, 14, 15, 17, 20, 25, 21, 21, 22, 23, 25, 28, 33, 41, 34, 34, 35, 36, 38, 41, 46, 54, 67, 55, 55, 56, 57, 59, 62, 67, 75, 88, 109, 89, 89, 90, 91, 93, 96, 101, 109, 122, 143, 177, 144, 144, 145, 146, 148, 151, 156, 164, 177, 198, 232, 287
Offset: 1

Views

Author

Gary W. Adamson, Jul 08 2007

Keywords

Comments

Left column = Fibonacci numbers. Right column = A001595: (1, 1, 3, 5, 9, 15, 25,...).
Row sums = A131412: (1, 2, 7, 15, 32, 62, 117, 214,...).

Examples

			First few rows of the triangle are:
   1;
   1,  1;
   2,  2,  3;
   3,  3,  4,  5;
   5,  5,  6,  7,  9;
   8,  8,  9, 10, 12, 15;
  13, 13, 14, 15, 17, 20, 25;
  21, 21, 22, 23, 25, 28, 33, 41;
  ...
		

Crossrefs

Programs

  • GAP
    F:=Fibonacci;; Flat(List([1..15], n-> List([1..n], k-> F(n) +F(k) -1 ))); # G. C. Greubel, Jul 13 2019
  • Magma
    F:=Fibonacci; [F(n)+F(k)-1: k in [1..n], n in [1..15]]; // G. C. Greubel, Jul 13 2019
    
  • Mathematica
    With[{F=Fibonacci}, Table[F[n]+F[k]-1, {n,15}, {k,n}]//Flatten] (* G. C. Greubel, Jul 13 2019 *)
  • PARI
    T(n,k) = if(k<=n, fibonacci(n) + fibonacci(k) - 1, 0); \\ Andrew Howroyd, Aug 10 2018
    
  • Sage
    f=fibonacci; [[f(n)+f(k)-1 for k in (1..n)] for n in (1..15)] # G. C. Greubel, Jul 13 2019
    

Formula

Equals A131410 + A104763 - A000012 as infinite lower triangular matrices.

Extensions

Name changed and terms a(56) and beyond from Andrew Howroyd, Aug 10 2018

A145912 Prime Leonardo numbers.

Original entry on oeis.org

3, 5, 41, 67, 109, 1973, 5167, 2692537, 11405773, 126491971, 331160281, 535828591, 279167724889, 145446920496281, 28944668049352441, 5760134388741632239, 63880869269980199809, 167242286979696845953, 597222253637954133837103
Offset: 1

Views

Author

Howard Berman (howard_berman(AT)hotmail.com), Oct 24 2008

Keywords

Crossrefs

Cf. A001595.

Programs

Formula

a(n) = A001595(A228145(n)-1). - Amiram Eldar, Sep 04 2017

Extensions

Extended by Klaus Brockhaus, Oct 26 2008

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

Original entry on oeis.org

1, -2, -3, 2, 3, 2, 3, 0, -1, 4, 5, 4, 5, 2, 1, 6, 7, 6, 7, 4, 3, 8, 9, 8, 9, 6, 5, 10, 11, 10, 11, 8, 7, 12, 13, 12, 13, 10, 9, 14, 15, 14, 15, 12, 11, 16, 17, 16, 17, 14, 13, 18, 19, 18, 19, 16, 15, 20, 21, 20, 21, 18, 17, 22, 23, 22, 23, 20, 19, 24, 25, 24, 25, 22, 21, 26, 27, 26, 27, 24, 23, 28, 29, 28, 29, 26, 25
Offset: 0

Views

Author

Creighton Dement, Apr 11 2006

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,-2,-3,2,3,2];; for n in [7..100] do a[n]:=2*a[n-1] -2*a[n-2] +2*a[n-3] -2*a[n-4] +2*a[n-5] -a[n-6]; od; a; # G. C. Greubel, Jul 13 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 100); Coefficients(R!( (1-3*x+x^2)*(1-x-x^2)/((1+x^2+x^4)*(1-x)^2) )); // G. C. Greubel, Jul 13 2019
    
  • Mathematica
    CoefficientList[Series[(1-3*x+x^2)*(1-x-x^2)/((1+x^2+x^4)*(1-x)^2), {x, 0, 100}], x] (* G. C. Greubel, Jul 13 2019 *)
  • PARI
    Vec((1-3*x+x^2)*(1-x-x^2)/((1-x)^2*(1+x^2+x^4)) + O(x^100)) \\ Colin Barker, May 18 2019
    
  • Sage
    ((1-3*x+x^2)*(1-x-x^2)/((1+x^2+x^4)*(1-x)^2)).series(x, 100).coefficients(x, sparse=False) # G. C. Greubel, Jul 13 2019
    

Formula

a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - a(n-6) for n>5. - Colin Barker, May 18 2019

A131400 A046854 + A065941 - I (Identity matrix).

Original entry on oeis.org

1, 2, 1, 2, 2, 1, 2, 3, 3, 1, 2, 3, 6, 3, 1, 2, 4, 7, 7, 4, 1, 2, 4, 11, 8, 11, 4, 1, 2, 5, 12, 15, 15, 12, 5, 1, 2, 5, 17, 16, 30, 16, 17, 5, 1, 2, 6, 18, 27, 36, 36, 27, 18, 6, 1, 2, 6, 24, 28, 63, 42, 63, 28, 24, 6, 1, 2, 7, 25, 44, 71, 84, 84, 71, 44, 25, 7, 1
Offset: 0

Views

Author

Gary W. Adamson, Jul 06 2007

Keywords

Comments

Row sums = A001595: (1, 3, 5, 9, 15, 25, 41, 67,...).

Examples

			First few rows of the triangle are:
  1;
  2, 1;
  2, 2,  1;
  2, 3,  3, 1;
  2, 3,  6, 3,  1;
  2, 4,  7, 7,  4, 1;
  2, 4, 11, 8, 11, 4, 1; ...
		

Crossrefs

Programs

  • GAP
    B:=Binomial;;
    T:= function(n,k)
        if k=n then return 1;
        else return B(Int((n+k)/2), k) + B(n - Int((k+1)/2), Int(k/2));
        fi;
      end;
    Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Jul 13 2019
  • Magma
    B:=Binomial; [k eq n select 1 else B(Floor((n+k)/2), k) + B(n - Floor((k+1)/2), Floor(k/2)): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 13 2019
    
  • Mathematica
    With[{B = Binomial}, Table[If[k==n, 1, B[Floor[(n+k)/2], k] + B[n - Floor[(k+1)/2], Floor[k/2]]], {n,0,12}, {k,0,n}]]//Flatten (* G. C. Greubel, Jul 13 2019 *)
  • PARI
    b=binomial; T(n,k) = if(k==n, 1, b((n+k)\2, k) + b(n - (k+1)\2, k\2));
    for(n=0,12, for(k=0,n, print1(T(n,k), ", ", ))) \\ G. C. Greubel, Jul 13 2019
    
  • Sage
    def T(n, k):
        b=binomial;
        if (k==n): return 1
        else: return b(floor((n+k)/2), k) + b(n - floor((k+1)/2), floor(k/2))
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jul 13 2019
    

Extensions

More terms added by G. C. Greubel, Jul 13 2019

A175004 Interspersion related to the Wythoff Array.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 10, 9, 8, 12, 17, 15, 14, 11, 20, 28, 25, 23, 19, 13, 33, 46, 41, 38, 31, 22, 16, 54, 75, 67, 62, 51, 36, 27, 18, 88, 122, 109, 101, 83, 59, 44, 30, 21, 143, 198, 177, 164, 135, 96, 72, 49, 35, 24, 232, 321, 287, 266, 219, 156, 117, 80, 57, 40, 26, 376, 520, 465, 431, 355, 253, 190, 130, 93, 65, 43, 29
Offset: 1

Views

Author

Clark Kimberling, Apr 03 2010

Keywords

Comments

The rows satisfy the recurrence r(n)=r(n-1)+r(n-2)+1.
Every positive integer occurs exactly once, so that as a sequence, A175004 is a permutation of the natural numbers. As an array, it is an interspersion, hence also a dispersion. Specifically, it is the dispersion of the sequence floor(n*x+2/x), where x=(golden ratio). For a discussion of dispersions, see A191426.

Examples

			Corner of the array:
1....2....4....7....12...20... (cf. A000071)
3....6....10...17...28...46... (cf. A001610)
5....9....15...25...41...67... (cf. A001595)
8....14...23...38...62...101..
		

Crossrefs

Cf. A035513.

Programs

  • Mathematica
    (* program generates the dispersion array T of the complement of increasing sequence f[n] *)
    r = 40; r1 = 12; (* r=# rows of T, r1=# rows to show *)
    c = 40; c1 = 12; (* c= # cols of T, c1=# cols to show *)
    x = GoldenRatio; f[n_] := Floor[n*x + 2/x]
    (* f(n) is complement of column 1 *)
    mex[list_] :=  NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]]
    (* A175004 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* array as a sequence *)
    (* Program by Peter J. C. Moses, Jun 01 2011, added here Jun 03 2011 by Clark Kimberling *)

Formula

Let W'=W-1, where W is the Wythoff array, given by A035513.
Row 1 of W' is (0,1,2,4,7,12,...); replace this by (1,2,4,7,12,...).
The resulting array is A175004.

A258316 T(n,k)=Number of (n+1)X(k+1) 0..1 arrays with each 2X2 subblock having clockwise pattern 0000 or 0011.

Original entry on oeis.org

5, 7, 7, 10, 9, 10, 15, 12, 12, 15, 23, 17, 15, 17, 23, 36, 25, 20, 20, 25, 36, 57, 38, 28, 25, 28, 38, 57, 91, 59, 41, 33, 33, 41, 59, 91, 146, 93, 62, 46, 41, 46, 62, 93, 146, 235, 148, 96, 67, 54, 54, 67, 96, 148, 235, 379, 237, 151, 101, 75, 67, 75, 101, 151, 237, 379, 612
Offset: 1

Views

Author

R. H. Hardin, Jun 29 2015

Keywords

Comments

Table starts
...5...7..10..15..23..36..57..91.146.235.379.612..989.1599.2586.4183.6767.10948
...7...9..12..17..25..38..59..93.148.237.381.614..991.1601.2588.4185.6769.10950
..10..12..15..20..28..41..62..96.151.240.384.617..994.1604.2591.4188.6772.10953
..15..17..20..25..33..46..67.101.156.245.389.622..999.1609.2596.4193.6777.10958
..23..25..28..33..41..54..75.109.164.253.397.630.1007.1617.2604.4201.6785.10966
..36..38..41..46..54..67..88.122.177.266.410.643.1020.1630.2617.4214.6798.10979
..57..59..62..67..75..88.109.143.198.287.431.664.1041.1651.2638.4235.6819.11000
..91..93..96.101.109.122.143.177.232.321.465.698.1075.1685.2672.4269.6853.11034
.146.148.151.156.164.177.198.232.287.376.520.753.1130.1740.2727.4324.6908.11089
.235.237.240.245.253.266.287.321.376.465.609.842.1219.1829.2816.4413.6997.11178
Apparently: put 1s in some number of nonadjacent columns or put 1s in some number of nonadjacent rows

Examples

			Some solutions for n=4 k=4
..0..0..0..0..0....1..1..1..1..1....0..0..0..0..0....1..1..1..1..1
..0..0..0..0..0....0..0..0..0..0....0..0..0..0..0....0..0..0..0..0
..0..0..0..0..0....1..1..1..1..1....0..0..0..0..0....0..0..0..0..0
..0..0..0..0..0....0..0..0..0..0....1..1..1..1..1....0..0..0..0..0
..1..1..1..1..1....1..1..1..1..1....0..0..0..0..0....0..0..0..0..0
		

Crossrefs

Column 1 is A018910
Column 2 is A157727(n+3)
Column 3 is A187107(n+3)
Diagonal is A001595(n+2)
Superdiagonal 1 is A000071(n+5)
Superdiagonal 2 is A001610(n+3)
Superdiagonal 3 is A001595(n+4)
Superdiagonal 5 is A022308(n+5)
Superdiagonal 6 is A022319(n+5)
Superdiagonal 7 is A022407(n+5)
Superdiagonal 9 is A022323(n+7)

Formula

Empirical: T(n,k) = Fibonacci(n+3) +Fibonacci(k+3) -1
Empirical for rows, columns and nw-se diagonals: a(n) = 2*a(n-1) -a(n-3)

A355288 a(0)=1, a(1)=3, a(2)=7; thereafter a(n) = a(n-1) + a(n-2) + 1.

Original entry on oeis.org

1, 3, 7, 11, 19, 31, 51, 83, 135, 219, 355, 575, 931, 1507, 2439, 3947, 6387, 10335, 16723, 27059, 43783, 70843, 114627, 185471, 300099, 485571, 785671, 1271243, 2056915, 3328159, 5385075, 8713235, 14098311, 22811547, 36909859, 59721407, 96631267, 156352675, 252983943, 409336619, 662320563
Offset: 0

Views

Author

Sumukh Patel, Jun 27 2022

Keywords

Comments

a(n) is the minimum number of nodes required for a full binary tree of height n with every node height-balanced, and the root node has a balance factor of 0.
Full binary tree: A binary tree is called a full binary tree if each node has exactly two or no children.
Essentially the same as A022403. - R. J. Mathar, Sep 23 2022

Examples

			The diagrams below illustrate the terms a(3)=11 and a(4)=19.
           R                         R
          / \                       / \
         /   \                     /   \
        /     \                   /     \
       o       o                 /       \
      / \     / \               /         \
     o   N   N   o             /           \
    / \         / \           /             \
   N   N       N   N         o               o
                            / \             / \
                           /   \           /   \
                          /     \         /     \
                         o       o       o       o
                        / \     / \     / \     / \
                       o   N   N   N   N   o   N   N
                      / \                 / \
                     N   N               N   N
		

Crossrefs

Cf. A354902.

Programs

  • Magma
    [n eq 0 select 1 else 4*Fibonacci(n+1) - 1: n in [0..40]];
  • Mathematica
    Join[{1},Table[4*Fibonacci[n + 1] - 1, {n, 1, 40}]]

Formula

a(0)=1, a(1)=3, a(2)=7; thereafter a(n) = a(n-1) + a(n-2) + 1.
From Stefano Spezia, Jun 27 2022: (Start)
G.f.: (1 + x + x^2 - 2*x^3)/((1 - x)*(1 - x - x^2)).
a(n) = 2*a(n-1) - a(n-3) for n > 3.
a(n) = 2^(1-n)*((1 + sqrt(5))^(n+1) - (1 - sqrt(5))^(n+1))/sqrt(5) - 1 for n > 0.
E.g.f.: 4*exp(x/2)*(5*cosh(sqrt(5)*x/2) + sqrt(5)*sinh(sqrt(5)*x/2))/5 - exp(x) - 2. (End)
a(n) = 4*A000045(n+1) - 1, for n >= 1.
a(n) = 2*A001595(n) + 1, for n >= 1.

A362255 a(0) = a(1) = a(2) = 1, for n > 2, a(n) = a(n-1) + a(n-k) + k with k = 2.

Original entry on oeis.org

1, 1, 1, 4, 7, 10, 16, 25, 37, 55, 82, 121, 178, 262, 385, 565, 829, 1216, 1783, 2614, 3832, 5617, 8233, 12067, 17686, 25921, 37990, 55678, 81601, 119593, 175273, 256876, 376471, 551746, 808624, 1185097, 1736845, 2545471, 3730570, 5467417, 8012890, 11743462, 17210881
Offset: 0

Views

Author

Michael De Vlieger, Apr 13 2023

Keywords

Comments

Called Leonardo 2-numbers in the Tan-Leung paper.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, -1, 1, -1}, {1, 1, 1, 4}, 40] (* or *)
    With[{k = 2}, Nest[Append[#, #[[-1]] + #[[-k - 1]] + k] &, {1, 1, 1}, 40] ]

A362256 a(0) = a(1) = a(2) = 1, for n > 2, a(n) = a(n-1) + a(n-k) + k with k = 3.

Original entry on oeis.org

1, 1, 1, 5, 9, 13, 17, 25, 37, 53, 73, 101, 141, 197, 273, 377, 521, 721, 997, 1377, 1901, 2625, 3625, 5005, 6909, 9537, 13165, 18173, 25085, 34625, 47793, 65969, 91057, 125685, 173481, 239453, 330513, 456201, 629685, 869141, 1199657, 1655861, 2285549, 3154693
Offset: 0

Views

Author

Michael De Vlieger, Apr 13 2023

Keywords

Comments

Called Leonardo 3-numbers in the Tan-Leung paper.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, -1, 0, 1, -1}, {1, 1, 1, 5, 9}, 44] (* or *)
    With[{p = 3}, Nest[Append[#, #[[-1]] + #[[-p - 1]] + p] &, {1, 1, 1, 5}, 40] ]

A376108 Non-Leonardo numbers.

Original entry on oeis.org

2, 4, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74
Offset: 1

Views

Author

Chai Wah Wu, Sep 10 2024

Keywords

Comments

A299174 UNION A005408(A001690 - 1).

Crossrefs

Programs

  • Python
    def A376108(n):
        def f(x):
            a, b, c = 1, 1, n
            while True:
                if b > x: return c
                a, b = b, a+b+1
                c +=1
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m
Previous Showing 31-40 of 43 results. Next