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.

A244473 3rd-largest term in n-th row of Stern's diatomic triangle A002487.

Original entry on oeis.org

1, 3, 5, 11, 18, 30, 49, 80, 129, 209, 338, 547, 885, 1432, 2317, 3749, 6066, 9815, 15881, 25696, 41577, 67273, 108850, 176123, 284973, 461096, 746069, 1207165, 1953234, 3160399, 5113633, 8274032, 13387665, 21661697, 35049362, 56711059, 91760421
Offset: 2

Views

Author

N. J. A. Sloane, Jul 01 2014

Keywords

Crossrefs

Programs

  • Maple
    A244473 := proc(n)
        if n < 8 then
            op(n,[-1,1,3,5,11,18,30]) ;
        else
            combinat[fibonacci](n+1)+5*combinat[fibonacci](n-4) ;
        end if;
    end proc:
    seq(A244473(n),n=2..50) ; # R. J. Mathar, Jul 05 2014
  • Mathematica
    Join[{1,3,5,11,18,30},LinearRecurrence[{1,1},{49,80},40]] (* Harvey P. Dale, Jan 13 2015 *)
  • PARI
    Vec(-x^2*(x^7+x^6+x^5+2*x^4+3*x^3+x^2+2*x+1)/(x^2+x-1) + O(x^100)) \\ Colin Barker, Jul 10 2015

Formula

a(n) = a(n-1)+a(n-2) for n>9. - Colin Barker, Jul 10 2015
G.f.: -x^2*(x^7+x^6+x^5+2*x^4+3*x^3+x^2+2*x+1) / (x^2+x-1). - Colin Barker, Jul 10 2015

A244476 6th-largest term in n-th row of Stern's diatomic triangle A002487.

Original entry on oeis.org

2, 8, 15, 26, 45, 75, 121, 199, 322, 542, 877, 1427, 2309, 3739, 6050, 9790, 15841, 25632, 41473, 67105, 108578, 175683, 284261, 459944, 744205, 1204149, 1948354, 3152503, 5100857, 8253360
Offset: 4

Views

Author

N. J. A. Sloane, Jul 01 2014

Keywords

Crossrefs

Programs

  • Python
    from functools import reduce
    from itertools import product
    def A244476(n): return sorted(set(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if y else (x[0]+x[1],x[1]),k,(1,0))) for k in product((False,True),repeat=n)),reverse=True)[5] # Chai Wah Wu, Jun 19 2022

Extensions

a(24)-a(33) from Chai Wah Wu, Jun 19 2022

A244474 4th-largest term in n-th row of Stern's diatomic triangle A002487.

Original entry on oeis.org

2, 4, 10, 17, 29, 47, 79, 128, 208, 337, 546, 883, 1429, 2312, 3741, 6053, 9794, 15847, 25641, 41488, 67129, 108617
Offset: 3

Views

Author

N. J. A. Sloane, Jul 01 2014

Keywords

Crossrefs

Programs

  • Maple
    A002487 := proc(n,k)
        option remember;
        if k =0 then
            1;
        elif k = 2^n-1 then
            n+1 ;
        elif type(k,'even') then
            procname(n-1,k/2) ;
        else
            procname(n-1,(k-1)/2)+procname(n-1,(k+1)/2) ;
        end if;
    end proc:
    A244474 := proc(n)
        {seq(A002487(n,k),k=0..2^n-1)} ;
        sort(%) ;
        op(-4,%) ;
    end proc:
    for n from 3 do
        print(A244474(n)) ;
    od: # R. J. Mathar, Oct 25 2014
  • Mathematica
    s[n_] := s[n] = Switch[n, 0, 0, 1, 1, _, If[EvenQ[n], s[n/2], s[(n - 1)/2] + s[(n - 1)/2 + 1]]];
    T = Table[s[n], {n, 0, 2^25}] // Flatten // SplitBy[#, If[# == 1, 1, 0]&]& // DeleteCases[#, {1}]&;
    Union[#][[-4]]& /@ T[[5 ;;]] (* Jean-François Alcover, Mar 12 2023 *)
  • Python
    from itertools import product
    from functools import reduce
    def A244474(n): return sorted(set(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if y else (x[0]+x[1],x[1]),k,(1,0))) for k in product((False,True),repeat=n)),reverse=True)[3] # Chai Wah Wu, Jun 20 2022

Formula

G.f.: (-2-2*x-4*x^2-3*x^3-2*x^4-x^5-3*x^6-2*x^7-x^8-x^9-x^10)/(-1+x+x^2) (conjectured) - Jean-François Alcover, Mar 12 2023

Extensions

a(24) from Jean-François Alcover, Mar 12 2023

A244475 5th-largest term in the n-th row of Stern's diatomic triangle A002487.

Original entry on oeis.org

1, 3, 9, 16, 27, 46, 76, 123, 207, 335, 545, 882, 1428, 2311, 3740, 6051, 9791, 15842, 25633, 41475, 67108, 108583, 175691, 284274, 459965, 744239, 1204204, 1948443, 3152647, 5101090, 8253737
Offset: 3

Views

Author

N. J. A. Sloane, Jul 01 2014

Keywords

Crossrefs

Programs

  • Maple
    A002487 := proc(n,k)
        option remember;
        if k =0 then
            1;
        elif k = 2^n-1 then
            n+1 ;
        elif type(k,'even') then
            procname(n-1,k/2) ;
        else
            procname(n-1,(k-1)/2)+procname(n-1,(k+1)/2) ;
        end if;
    end proc:
    A244475 := proc(n)
        {seq(A002487(n,k),k=0..2^n-1)} ;
        sort(%) ;
        op(-5,%) ;
    end proc:
    for n from 3 do
        print(A244475(n)) ;
    od: # R. J. Mathar, Oct 25 2014
  • Mathematica
    s[n_, k_] := s[n, k] = Which[k == 0, 1, k == 2^n-1, n+1, EvenQ[k], s[n-1, k/2], True, s[n-1, (k-1)/2] + s[n-1, (k+1)/2]];
    row[n_] := Table[s[n, k], {k, 0, 2^n-1}];
    a[n_] := If[n == 3, 1, Union[row[n]][[-5]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 3, 23}] (* Jean-François Alcover, Mar 13 2023, after R. J. Mathar *)
  • Python
    from itertools import product
    from functools import reduce
    def A244475(n): return sorted(set(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if y else (x[0]+x[1],x[1]),k,(1,0))) for k in product((False,True),repeat=n)),reverse=True)[4] # Chai Wah Wu, Jun 19 2022

Formula

Conjectured g.f.: -x^3*(x^14+ x^13+ x^12+ 2*x^11 +3*x^10 +5*x^9 +8*x^8 +x^7 +3*x^6 +3*x^5 +2*x^4 +4*x^3 +5*x^2 +2*x +1) / (x^2+x-1). - Alois P. Heinz, Jun 20 2022

Extensions

a(24)-a(25) from Alois P. Heinz, Jun 19 2022
a(26)-a(33) from Chai Wah Wu, Jun 20 2022
Showing 1-4 of 4 results.