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.

A055186 Cumulative counting sequence: method A (adjective-before-noun)-pairs with first term 0.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Apr 27 2000

Keywords

Comments

Start with 0; at n-th step, write down what is in the sequence so far.
"Look and Say" how many times each integer (in increasing order), <= max {existing terms} appears in the sequence. Then concatenate. Sequence's graph looks roughly like that of A080096.
For the original version, where "increasing order..." is "order of 1st appearance", see A217760. The conjecture formerly placed here applies to A217760. - Clark Kimberling, Mar 24 2013

Examples

			Write 0, thus having 1 0, thus having 2 0's and 1 1, thus having 3 0's and 3 1's and 1 2, etc. 0; 1,0; 2,0,1,1; 3,0,3,1,1,2; ...
		

Crossrefs

Cf. A005150. For other versions see A051120, A079668, A079686.
Cf. A055168-A055185 (method B) and A055187-A055191 (method A).
Cf. A217760.

Programs

  • Mathematica
    s={0};Do[ta=Table[{Count[s, # ], # }&/@Range[0,Max[s]]]; s=Flatten[{s,ta}],{22}];s (* Zak Seidov, Oct 23 2009 *)

Formula

Conjectures: a(n) < 2*sqrt(n); limit as n goes to infinity Max( a(k) : 1<=k<=n)/sqrt(n) exist = 2. - Benoit Cloitre, Jan 28 2003

Extensions

Edited by N. J. A. Sloane, Jan 17 2009 at the suggestion of R. J. Mathar
Removed a conjecture. - Clark Kimberling, Oct 24 2009
Entries changed to match b-file. - N. J. A. Sloane, Oct 04 2010

A077623 a(1)=1, a(2)=2, a(3)=4, a(n) = abs(a(n-1) - a(n-2) - a(n-3)).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Dec 02 2002

Keywords

Crossrefs

Programs

  • Haskell
    a077623 n = a077623_list !! (n-1)
    a077623_list = 1 : 2 : 4 : zipWith3 (\u v w -> abs (w - v - u))
                   a077623_list (tail a077623_list) (drop 2 a077623_list)
    -- Reinhard Zumkeller, Oct 11 2014
    
  • Magma
    m:=120;
    A077623:=[n le 3 select 2^(n-1) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
    [A077623[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
    
  • Mathematica
    a[n_]:= a[n]= If[n<4, 2^(n-1), Abs[a[n-1] -a[n-2] -a[n-3]]];
    Table[a[n], {n,120}] (* G. C. Greubel, Sep 11 2024 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A077623
        if n<4: return 2^(n-1)
        else: return abs(a(n-1)-a(n-2)-a(n-3))
    [a(n) for n in range(1,121)] # G. C. Greubel, Sep 11 2024

Formula

a(n)/sqrt(n) is bounded. More precisely, let M(n) = Max ( a(k) : 1<=k<=n ); then M(n) = floor(sqrt(n+29)) for n>=4

A077653 a(1)=1, a(2)=2, a(3)=2, a(n) = abs(a(n-1) - a(n-2) - a(n-3)).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Dec 02 2002

Keywords

Comments

Conjecture : let z(1)=x; z(2)=y; z(3)= z; z(n)=abs(z(n-1)-z(n-2)-z(n-3)) if z(n) is unbounded (i.e. x,y,z are such that z(n) doesn't reach a cycle of length 2), then there are 2 integers n(x,y,z) and w(x,y,z) such that M(n) = floor(sqrt(n+w(x,y,z))) for n>n(,x,y,z) where M(n) = Max ( a(k) : 1<=k<=n ). As example : w(1,2,2)=9 n(1,2,2)=4; w(1,2,4)=29 n(1,2,4)=4; w(1,2,8)=157 n(1,2,8)=9

Crossrefs

Programs

  • Haskell
    a077653 n = a077653_list !! (n-1)
    a077653_list = 1 : 2 : 2 : zipWith3 (\u v w -> abs (w - v - u))
                   a077653_list (tail a077653_list) (drop 2 a077653_list)
    -- Reinhard Zumkeller, Oct 11 2014
    
  • Magma
    m:=120;
    A077653:=[n le 3 select Floor((n+2)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
    [A077653[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
    
  • Mathematica
    nxt[{a_,b_,c_}]:={b,c,Abs[c-b-a]}; NestList[nxt,{1,2,2},110][[All,1]] (* Harvey P. Dale, Sep 01 2020 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A077653
        if n<4: return int((n+2)//2)
        else: return abs(a(n-1)-a(n-2)-a(n-3))
    [a(n) for n in range(1,101)] # G. C. Greubel, Sep 11 2024

Formula

a(n)/sqrt(n) is bounded. More precisely, let M(n) = Max ( a(k) : 1<=k<=n ); then M(n)= floor(sqrt(n+9)) for n>4

A079623 a(1) = a(2) = 1, a(3)=4, a(n) = abs(a(n-1) - a(n-2) - a(n-3)).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Jan 30 2003

Keywords

Crossrefs

Programs

  • Haskell
    a079623 n = a079623_list !! (n-1)
    a079623_list = 1 : 1 : 4 : zipWith3 (\u v w -> abs (w - v - u))
                   a079623_list (tail a079623_list) (drop 2 a079623_list)
    -- Reinhard Zumkeller, Oct 11 2014
    
  • Magma
    m:=120;
    A079623:=[n le 3 select 4^Floor((n-1)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
    [A079623[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
    
  • Mathematica
    nxt[{a_,b_,c_}]:={b,c,Abs[c-b-a]}; NestList[nxt,{1,1,4},110][[All,1]] (* Harvey P. Dale, Aug 12 2020 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A079623
        if n<4: return 4^((n-1)//2)
        else: return abs(a(n-1)-a(n-2)-a(n-3))
    [a(n) for n in range(1,101)] # G. C. Greubel, Sep 11 2024

Formula

a(n*(n-10)) = 0.
Max( a(k) : 1<=k<=n) = floor(sqrt(n+24)).

A079624 a(1) = a(2) = 1, a(3) = 6, a(n) = abs(a(n-1) - a(n-2) - a(n-3)).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Jan 30 2003

Keywords

Crossrefs

Programs

  • Haskell
    a079624 n = a079624_list !! (n-1)
    a079624_list = 1 : 1 : 6 : zipWith3 (\u v w -> abs (w - v - u))
                   a079624_list (tail a079624_list) (drop 2 a079624_list)
    -- Reinhard Zumkeller, Oct 11 2014
    
  • Magma
    m:=120;
    A079624:=[n le 3 select 6^Floor((n-1)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
    [A079624[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
    
  • Mathematica
    a[n_]:= a[n]= If[n<4, 6^Floor[(n-1)/2], Abs[a[n-1] -a[n-2] -a[n-3]]];
    Table[a[n], {n,100}] (* G. C. Greubel, Sep 11 2024 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A079624
        if n<4: return 6^((n-1)//2)
        else: return abs(a(n-1)-a(n-2)-a(n-3))
    [a(n) for n in range(1,101)] # G. C. Greubel, Sep 11 2024

Formula

For n >= 5, a(n^2 + 24*n - 13) = 0.
For n >= 38, Max( a(k) : 1<=k<=n) = floor(sqrt(n+156)).

A088226 a(1)=0, a(2)=0, a(3)=1; for n>3, a(n) = abs(a(n-1) - a(n-2) - a(n-3)).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Nov 04 2003

Keywords

Comments

Conjecture: a(n) = m/2 where m is the smallest even distance from n to a square. - Ralf Stephan, Sep 23 2013

Crossrefs

Programs

  • Haskell
    a088226 n = a088226_list !! (n-1)
    a088226_list = 0 : 0 : 1 : zipWith3 (\u v w -> abs (w - v - u))
                   a088226_list (tail a088226_list) (drop 2 a088226_list)
    -- Reinhard Zumkeller, Oct 11 2014
    
  • Magma
    m:=120;
    A088226:=[n le 3 select Floor((n-1)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
    [A088226[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
    
  • Mathematica
    RecurrenceTable[{a[1]==a[2]==0,a[3]==1,a[n]==Abs[a[n-1]-a[n-2]-a[n-3]]},a,{n,110}] (* Harvey P. Dale, Apr 13 2012 *)
  • PARI
    a(n)=t=sqrtint(n);if((n-t*t)%2==0,(n-t*t)/2,((t+1)^2-n)/2) \\ Ralf Stephan, Sep 23 2013
    
  • SageMath
    @CachedFunction
    def a(n): # a = A088226
        if n<4: return int((n-1)//2)
        else: return abs(a(n-1)-a(n-2)-a(n-3))
    [a(n) for n in range(1,101)] # G. C. Greubel, Sep 11 2024

Formula

a(k^2 + 2*m + 2) = k-m and a(k^2 + 2*m + 1) = m, for k >= 0 and 0 <= m <= k.
Showing 1-6 of 6 results.