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

A269725 a(n) = row number of extended Wythoff array (see A035513) which contains the sequence n times the Fibonacci numbers 1,2,3,5,8,13,21,... .

Original entry on oeis.org

0, 2, 3, 4, 15, 18, 21, 24, 27, 30, 33, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 630, 651, 672, 693, 714, 735, 756, 777, 798, 819, 840, 861, 882, 903, 924, 945, 966, 987, 1008, 1029, 1050, 1071, 1092, 1113, 1134, 1155, 1176, 1197, 1218, 1239, 1260
Offset: 1

Views

Author

N. J. A. Sloane, Mar 07 2016

Keywords

Examples

			Take n=5: 5 times 1,2,3,5,8,13,... gives 5,10,15,25,40,65,.., which is row 15 of the extended Wythoff array (when extended to the left), so a(5) = 15.
		

References

  • J. H. Conway, Posting to Math Fun Mailing List, Nov 25 1996.

Crossrefs

Programs

  • Maple
    A269725 := proc(n)
        local f,sl,r,c,wrks ;
        f := [seq(n*combinat[fibonacci](i),i=2..30)] ;
        for sl from 0 do
            for r from 1 do
                if A035513(r,1) = op(1+sl,f) then
                    wrks := true;
                    for c from 2 to 5 do
                        if A035513(r,c) <> op(c+sl,f) then
                            wrks := false;
                        end if;
                    end do:
                    if wrks then
                        print(n,f,r) ;
                        return r-1 ;
                    end if;
                elif A035513(r,1) > op(1+sl,f) then
                    break ;
                end if;
            end do:
        end do:
    end proc: # R. J. Mathar, May 06 2017
  • Mathematica
    W[n_, k_] := Fibonacci[k+1] Floor[n*GoldenRatio] + (n-1) Fibonacci[k];
    a[n_] := Module[{f, sl, r, c, wrks}, f = Table[n*Fibonacci[i], {i, 2, 30}]; For[sl = 0, True, sl++, For[r = 1, True, r++, Which[W[r, 1] == f[[1 + sl]], wrks = True; For[c = 2, c <= 5, c++, If[W[r, c] != f[[c+sl]], wrks = False]]; If[wrks, Return[r-1]], W[r, 1] > f[[1+sl]], Break[]]]]];
    Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Sep 13 2022, after R. J. Mathar *)

Formula

a(n) = A173027(n)-1. - R. J. Mathar, May 06 2017

A022423 Kim-sums: "Kimberling sums" K_n + K_12.

Original entry on oeis.org

11, 31, 34, 36, 39, 42, 44, 47, 49, 52, 55, 57, 60, 63, 65, 68, 70, 73, 76, 78, 81, 83, 86, 89, 91, 94, 97, 99, 102, 104, 107, 110, 112, 115, 118, 120, 123, 125, 128, 131, 133, 136, 138, 141, 144, 146, 149, 152, 154, 157, 159, 162, 165, 167, 170, 172, 175, 178, 180
Offset: 0

Views

Author

Keywords

References

  • Posting to math-fun mailing list Jan 10 1997.

Crossrefs

The "Kim-sums" K_n + K_i for i = 2 through 12 are given in A022413, A022414, A022415, A022416, ..., A022423.

Programs

  • Maple
    Ki := proc(n,i)
        option remember;
        local phi ;
        phi := (1+sqrt(5))/2 ;
        if i= 0 then
            n;
        elif i=1 then
            floor((n+1)*phi) ;
        else
            procname(n,i-1)+procname(n,i-2) ;
        end if;
    end proc:
    Kisum := proc(n,m)
        local ks,a,i;
        ks := [seq( Ki(n,i)+Ki(m,i),i=0..5)] ;
        for i from 0 to 2 do
            for a from 0 do
                if Ki(a,0) = ks[i+1] and Ki(a,1) = ks[i+2] then
                    return a;
                end if;
                if Ki(a,0) > ks[i+1] then
                    break;
                end if;
            end do:
        end do:
    end proc:
    A022423 := proc(n)
        if n = 0 then
            11;
        else
            Kisum(n-1,11) ;
        end if;
    end proc:
    seq(A022423(n),n=0..80) ; # R. J. Mathar, Sep 03 2016
  • Mathematica
    Ki[n_, i_] := Ki[n, i] = Module[{phi = (1 + Sqrt[5])/2}, If[i == 0, n, If[i == 1, Floor[(n+1)*phi], Ki[n, i-1] + Ki[n, i-2]]]];
    Kisum[n_, m_] := Module[{ks, a, i}, ks = Table[Ki[n, i] + Ki[m, i], {i, 0, 5}]; For[i = 0, i <= 2, i++, For[a = 0, True, a++, If[Ki[a, 0] == ks[[i+1]] && Ki[a, 1] == ks[[i+2]], Return[a]]; If[Ki[a, 0] > ks[[i+1]], Break[]]]]];
    a[n_] := If[n == 0, 11, Kisum[n-1, 11]];
    a /@ Range[0, 58] (* Jean-François Alcover, Mar 29 2020, after R. J. Mathar *)

A022414 Kim-sums: "Kimberling sums" K_n + K_3.

Original entry on oeis.org

2, 7, 10, 4, 15, 18, 20, 23, 9, 28, 31, 12, 36, 39, 41, 44, 17, 49, 52, 54, 57, 22, 62, 65, 25, 70, 73, 75, 78, 30, 83, 86, 33, 91, 94, 96, 99, 38, 104, 107, 109, 112, 43, 117, 120, 46, 125, 128, 130, 133, 51, 138, 141, 143, 146, 56, 151, 154, 59, 159, 162, 164, 167
Offset: 0

Views

Author

Keywords

Comments

Let W(i,j) denote the index of that row of the extended Wythoff array (see A035513) that contains the sequence formed by the sum of rows i and j. Then a(n) = W(2,n). - N. J. A. Sloane, Mar 07 2016

References

  • J. H. Conway, Posting to Math Fun Mailing List, Dec 02 1996.
  • M. LeBrun, Posting to Math Fun Mailing List Jan 10 1997.

Crossrefs

The "Kim-sums" K_n + K_i for i = 2 through 12 are given in A022413, A022414, A022415, A022416, ..., A022423.

Programs

  • Maple
    Ki := proc(n,i)
            option remember;
            local phi ;
            phi := (1+sqrt(5))/2 ;
            if i= 0 then
                    n;
            elif i=1 then
                    floor((n+1)*phi) ;
            else
                    procname(n,i-1)+procname(n,i-2) ;
            end if;
    end proc:
    Kisum := proc(n,m)
            local ks,a,i;
            ks := [seq( Ki(n,i)+Ki(m,i),i=0..5)] ;
            for i from 0 to 2 do
                    for a from 0 do
                            if Ki(a,0) = ks[i+1] and Ki(a,1) = ks[i+2] then
                                    return a;
                            end if;
                            if Ki(a,0) > ks[i+1] then
                                    break;
                            end if;
                    end do:
            end do:
    end proc:
    A022414 := proc(n)
        if n = 0 then
            2;
        else
                Kisum(n-1,2) ;
        end if;
    end proc:
    seq(A022414(i),i=0..80) ; # R. J. Mathar, Sep 03 2016
  • Mathematica
    Ki[n_, i_] := Ki[n, i] = Which[i == 0, n, i == 1, Floor[(n + 1)* GoldenRatio], True, Ki[n, i - 1] + Ki[n, i - 2]];
    Kisum [n_, m_] := Module[{ks, a, i}, ks = Table[Ki[n, i] + Ki[m, i], {i, 0, 5}]; For[i = 0, i <= 2, i++, For[a = 0, True, a++, If[Ki[a, 0] == ks[[i + 1]] && Ki[a, 1] == ks[[i + 2]], Return@a]; If[Ki[a, 0] > ks[[i + 1]], Break[]]]]];
    a[n_] := If[n == 0, 2, Kisum[n - 1, 2]];
    Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Oct 15 2023, after R. J. Mathar *)

A022415 Kim-sums: "Kimberling sums" K_n + K_4.

Original entry on oeis.org

3, 10, 13, 15, 18, 21, 23, 26, 28, 31, 34, 36, 39, 42, 44, 47, 49, 52, 55, 57, 60, 62, 65, 68, 70, 73, 76, 78, 81, 83, 86, 89, 91, 94, 97, 99, 102, 104, 107, 110, 112, 115, 117, 120, 123, 125, 128, 131, 133, 136, 138, 141, 144, 146, 149, 151, 154, 157, 159, 162, 165, 167, 170, 172, 175, 178
Offset: 0

Views

Author

Keywords

References

  • Posting to math-fun mailing list Jan 10 1997.

Crossrefs

The "Kim-sums" K_n + K_i for i = 2 through 12 are given in A022413, A022414, A022415, A022416, ..., A022423.

Programs

  • Maple
    Ki := proc(n,i)
        option remember;
        local phi ;
        phi := (1+sqrt(5))/2 ;
        if i= 0 then
            n;
        elif i=1 then
            floor((n+1)*phi) ;
        else
            procname(n,i-1)+procname(n,i-2) ;
        end if;
    end proc:
    Kisum := proc(n,m)
        local ks,a,i;
        ks := [seq( Ki(n,i)+Ki(m,i),i=0..5)] ;
        for i from 0 to 2 do
            for a from 0 do
                if Ki(a,0) = ks[i+1] and Ki(a,1) = ks[i+2] then
                    return a;
                end if;
                if Ki(a,0) > ks[i+1] then
                    break;
                end if;
            end do:
        end do:
    end proc:
    A022415 := proc(n)
        if n = 0 then
            3;
        else
            Kisum(n-1,3) ;
        end if;
    end proc:
    seq(A022415(n),n=0..80) ; # R. J. Mathar, Sep 03 2016
  • Mathematica
    Ki[n_, i_] := Ki[n, i] = Which[i == 0, n, i == 1, Floor[(n + 1)* GoldenRatio], True, Ki[n, i - 1] + Ki[n, i - 2]];
    Kisum[n_, m_] := Module[{ks, a, i}, ks = Table[Ki[n, i] + Ki[m, i], {i, 0, 5}]; For[i = 0, i <= 2, i++, For[a = 0, True, a++, If[Ki[a, 0] == ks[[i + 1]] && Ki[a, 1] == ks[[i + 2]], Return@a]; If[Ki[a, 0] > ks[[i + 1]], Break[]]]]];
    a[n_] := If[n == 0, 3, Kisum[n - 1, 3]];
    Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Oct 15 2023, after R. J. Mathar *)

A269729 a(n) = row number of extended Wythoff array (see A035513) which contains the sequence obtained by reading the n-th row backwards (and adjusting signs).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 10, 5, 8, 11, 6, 9, 12, 20, 28, 15, 23, 31, 18, 26, 13, 21, 29, 16, 24, 32, 19, 27, 14, 22, 30, 17, 25, 33, 54, 75, 41, 62, 83, 49, 70, 36, 57, 78, 44, 65, 86, 52, 73, 39, 60, 81, 47, 68, 34, 55, 76, 42, 63, 84, 50, 71, 37, 58, 79, 45, 66, 87, 53, 74, 40
Offset: 0

Views

Author

N. J. A. Sloane, Mar 08 2016

Keywords

Comments

Conjecture: sequence is its own inverse. - R. J. Mathar, May 08 2019

Examples

			Take n=5: reading row 5 of A035513 backwards gives ... 23, 14, 9, 5, 4, 1, 3, -2, 5, -7, 12, -19, ..., which after adjusting the signs is row 7, so a(5) = 7.
		

References

  • J. H. Conway, Postings to Math Fun Mailing List, Nov 25 1996 and Dec 02 1996.

Crossrefs

See A269733 for first differences.

Programs

  • Maple
    A035513 := proc(r::integer, c::integer)
        option remember;
        if c = 1 then
            A003622(r) ;
        elif c > 1 then
            A022342(1+procname(r, c-1)) ;
        elif c < 1 then
            procname(r,c+2)-procname(r,c+1) ;
        end if;
    end proc:
    # search in A035513 for row with consecutive w1,w2
    A035513inv := proc(w1::integer,w2::integer)
        local r,c,W1,W2 ;
        for r from 1 do
            if A035513(r,1) > w2 then
                return -1 ;
            end if;
            for c from 1 do
                W1 := A035513(r,c) ;
                W2 := A035513(r,c+1) ;
                if W1=w1 and W2=w2 then
                    return r-1 ;
                elif W2 > w2 then
                    break;
                end if;
            end do:
        end do:
    end proc:
    A269729 := proc(n)
        option remember;
        local c,W1,W2,r,n35513;
        n35513 := n+1 ;
        for c from 1 by -1 do
            W1 := A035513(n35513,c) ;
            W2 := A035513(n35513,c-1) ;
            if W1 < 0 and abs(W2) > abs(W1) then
                r :=  A035513inv(abs(W1),abs(W2)) ;
                if r >= 0 then
                    return r;
                end if;
            end if;
        end do:
    end proc:
    seq(A269729(n),n=0..120) ; # R. J. Mathar, May 08 2019
  • Mathematica
    W[n_, k_] := W[n, k] = Fibonacci[k+1] Floor[n*GoldenRatio] + (n-1)* Fibonacci[k];
    Winv[w1_, w2_] := Winv[w1, w2] = Module[{r, c, W1, W2}, For[r = 1, True, r++, If[W[r, 1] > w2, Return[-1]]; For[c = 1, True, c++, W1 = W[r, c]; W2 = W[r, c+1]; If[W1 == w1 && W2 == w2, Return[r-1], If[W2 > w2, Break[]]]]]];
    a[n_] := a[n] = Module[{c, W1, W2, r, nw}, nw = n+1; For[c = 1, True, c--, W1 = W[nw, c]; W2 = W[nw, c-1]; If[W1 < 0 && Abs[W2] > Abs[W1], r = Winv[Abs[W1], Abs[W2]]; If[r >= 0, Return[r]]]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 120}] (* Jean-François Alcover, Aug 09 2023, after R. J. Mathar *)

Extensions

Terms from a(18) on by R. J. Mathar, May 08 2019

A383671 The limiting word that starts with 0, as a sequence, generated by s(0) = 0, s(1) = 12, s(n) = concatenation of s(n - 2) and s(n - 1).

Original entry on oeis.org

0, 1, 2, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 1, 2, 0, 1, 2, 0, 1, 2, 1, 2
Offset: 0

Views

Author

Clark Kimberling, May 15 2025

Keywords

Comments

There are two distinct limiting words generated by s(0) = 0, s(1) = 12, s(n) = s(n - 2)s(n - 1). This one is given by s(2n) for n>=0; the other, given by s(2n-1) for n>=0, is 1201201212012... In both limiting words, the length of the n-th initial subword is A000045(n+1), for n>=1.

Examples

			Initial subwords: s(0)=0, s(1)=12, s(2)=012, s(3)=12012, s(4)= 01212012, of lengths 1, 2, 3, 5, 8 (Fibonacci numbers).
		

Crossrefs

Cf. A000045, A003849, A047924 (positions of 0), A026356 (positions of 1), A022413 (positions of 2), A383670.

Programs

  • Mathematica
    s[0] = "0"; s[1] = "12"; s[n_] := StringJoin[s[n - 2], s[n - 1]];
    Join[{0}, IntegerDigits[FromDigits[s[10]]]]
  • Python
    from math import isqrt
    def A047924(n): return ((m:=(n+isqrt(5*n**2)>>1)+1)+isqrt(5*m**2)>>1)+m+1
    def A026356(n): return (n+1+isqrt(5*(n-1)**2)>>1)+n
    def A383671(n):
        def bsearch(f, n):
            kmin, kmax = 0, 1
            while f(kmax) <= n:
                kmax <<= 1
            kmin = kmax>>1
            while True:
                kmid = kmax+kmin>>1
                if f(kmid) > n:
                    kmax = kmid
                else:
                    kmin = kmid
                if kmax-kmin <= 1:
                    break
            return kmin
        if n<3: return n
        for i, f in enumerate((A047924, A026356)):
            if f(bsearch(f,n+1))==n+1: return i
        return 2 # Chai Wah Wu, May 21 2025
Showing 1-6 of 6 results.