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-10 of 79 results. Next

A120160 a(n) = ceiling(Sum_{i=1..n-1} a(i)/4) for n >= 2 starting with a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 8, 10, 12, 15, 19, 24, 30, 37, 47, 58, 73, 91, 114, 142, 178, 222, 278, 347, 434, 543, 678, 848, 1060, 1325, 1656, 2070, 2588, 3235, 4043, 5054, 6318, 7897, 9871, 12339, 15424, 19280, 24100, 30125, 37656, 47070, 58838, 73547
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Comments

From Petros Hadjicostas, Jul 21 2020: (Start)
Conjecture 1: a(n) equals the number of multiples of 4 whose representation in base 5/4 (see A024634) has n-1 digits. For example, a(8) = 3 because there are three multiples of 4 with n-1 = 7 digits in their representation in base 5/4: 36 = 4321031, 40 = 4321420, and 44 = 4321424.
Conjecture 2: a(n) equals 1/5 times the number of nonnegative integers with the property that their 5/4-expansion has n digits (assuming that the 5/4-expansion of 0 has 1 digit). For example, a(7)*5 = 10 because the following 10 numbers have 5/4 expansions with n = 7 digits: 35 = 4321030, 36 = 4321031, 37 = 4321032, 38 = 4321033, 39 = 4321034, 40 = 4321420, 41 = 4321421, 42 = 4321422, 43 = 4321423, and 44 = 4321424. (End)
From Petros Hadjicostas, Jul 23 2020: (Start)
Starting at a(11) = 5, we conjecture that this sequence gives all those numbers m for which when we place m persons on a circle, label them 1 through m, start counting at person number 1, and remove every 5th person, the last survivors have numbers in {1, 2, 3, 4}.
When m = 6, 12, 15, 37, 58, 142, 222, 347, ... the last survivor is person 1.
When m = 5, 19, 91, 434, 1656, 2070, 5054, ... the last survivor is person 2.
When m = 8, 10, 24, 30, 73, 114, 178, 278, ... the last survivor is person 3.
When m = 47, 543, 2588, 3235, 6318, 58838, ... the last survivor is person 4. (End)

Examples

			From _Petros Hadjicostas_, Jul 23 2020: (Start)
We explain why 6 and 8 belong to the sequence related to the Josephus problem (for the case k = 5) while 7 does not.
When we place m = 6 people on a circle, label them 1 through 6, start counting at person 1, and remove every 5th person, the list of people we remove is 5 -> 4 -> 6 -> 2 -> 3. Thus the last survivor is person 1, so 6 belongs to this sequence.
When we place m = 7 people on a circle, label them 1 through 7, start counting at person 1, and remove every 5th person, the list of people we remove is 5 -> 3 -> 2 -> 4 -> 7 -> 1. Thus the last survivor is person 6 (not in {1, 2, 3, 4}), so 7 does not belong to this sequence.
When we place m = 8 people on a circle, label them 1 through 8, start the counting at person 1, and remove every 5th person, the list of people we remove is 5 -> 2 -> 8 -> 7 -> 1 -> 4 -> 6. Thus the last survivor is 3, so 8 belongs to this sequence. (End)
		

Crossrefs

Programs

  • Magma
    function f(n, a, b)
      t:=0;
        for k in [1..n-1] do
          t+:= a+Ceiling((b+t)/4);
        end for;
      return t;
    end function;
    g:= func< n, a, b | f(n+1, a, b)-f(n, a, b) >;
    A120160:= func< n | n le 4 select 1 else g(n-4, 1, 0) >;
    [A120160(n): n in [1..60]]; // G. C. Greubel, Sep 01 2023
    
  • Mathematica
    f[s_]:= Append[s, Ceiling[Plus @@ s/4]]; Nest[f,1,53] (* Robert G. Wilson v *)
    (* Second program *)
    f[n_]:= f[n]= 1 + Quotient[Sum[f[k], {k,n-1}], 4];
    A120160[n_]:= If[n==1, 1, f[n-1]];
    Table[A120160[n], {n, 60}] (* G. C. Greubel, Sep 01 2023 *)
  • PARI
    /* PARI program for the general case of Josephus problem. We use the Burde-Thériault algorithm. Here k = 5. To get the corresponding last survivors, modify the program to get the vector j. */
    lista(nn, k) = {my(j=vector(nn)); my(f=vector(nn)); my(N=vector(nn));
    j[1]=1; f[1]=0; N[1] = 1;
    for(n=1, nn-1, f[n+1] = ((j[n]-N[n]-1) % (k-1)) + 1 - j[n];
    j[n+1] = j[n] + f[n+1]; N[n+1] = (k*N[n] + f[n+1])/(k-1); );
    for(n=1, nn, if(N[n] > k-1, print1(N[n], ", "))); } \\ Petros Hadjicostas, Jul 23 2020
    
  • SageMath
    @CachedFunction
    def A120160(n): return 1 + ceil( sum(A120160(k) for k in range(1,n))//4 )
    [A120160(n) for n in range(1,61)] # G. C. Greubel, Sep 01 2023

Extensions

Edited and extended by Robert G. Wilson v, Jul 07 2006
Appended the first missing term. - Tom Edgar, Jul 18 2014

A120134 a(n) = 4 + floor(Sum_{k=1..n-1} a(k) / 2).

Original entry on oeis.org

4, 6, 9, 13, 20, 30, 45, 67, 101, 151, 227, 340, 510, 765, 1148, 1722, 2583, 3874, 5811, 8717, 13075, 19613, 29419, 44129, 66193, 99290, 148935, 223402, 335103, 502655, 753982, 1130973, 1696460, 2544690, 3817035, 5725552, 8588328, 12882492
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Crossrefs

Programs

  • Maple
    a := proc(n) option remember; 4 + iquo(add(a(k), k = 1..n-1), 2) end:
    seq(a(n), n = 1..37); # Peter Luschny, May 07 2023
  • Mathematica
    f[s_]:= Append[s, 4+Floor[Plus @@ s/2]]; Nest[f, {4}, 37] (* Robert G. Wilson v, Jun 10 2006 *)
  • SageMath
    @CachedFunction
    def A120134(n): return 4 + sum(A120134(k) for k in range(1,n))//2
    print([A120134(n) for n in range(1,41)])  # G. C. Greubel, May 07 2023

Formula

a(n) ~ c * (3/2)^n, where c = 3.9320886310283094862025842648411406926537121258867950257873967568454133192... - Vaclav Kotesovec, May 07 2023

Extensions

Name edited by Peter Luschny, May 07 2023

A120209 a(1)=8; a(n)=floor((79+sum(a(1) to a(n-1)))/9).

Original entry on oeis.org

8, 9, 10, 11, 13, 14, 16, 17, 19, 21, 24, 26, 29, 32, 36, 40, 44, 49, 55, 61, 68, 75, 84, 93, 103, 115, 127, 142, 157, 175, 194, 216, 240, 266, 296, 329, 365, 406, 451, 501, 557, 619, 688, 764, 849, 943, 1048, 1164, 1294, 1438, 1597, 1775, 1972, 2191, 2435, 2705, 3006, 3340, 3711
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Crossrefs

Programs

  • Mathematica
    nxt[{t_,a_}]:=Module[{c=Floor[(79+t)/9]},{t+c,c}]; NestList[nxt,{8,8},60][[;;,2]] (* Harvey P. Dale, May 03 2024 *)

Extensions

More terms from Alonso del Arte, Dec 25 2013

A120170 a(n) = ceiling( Sum_{i=1..n-1} a(i)/5 ), a(1)=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 6, 7, 8, 10, 12, 14, 17, 21, 25, 30, 36, 43, 52, 62, 74, 89, 107, 128, 154, 185, 222, 266, 319, 383, 460, 552, 662, 795, 954, 1144, 1373, 1648, 1977, 2373, 2847, 3417, 4100, 4920, 5904, 7085, 8502, 10202, 12243, 14691, 17630
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Crossrefs

Programs

  • Magma
    function f(n, a, b)
      t:=0;
        for k in [1..n-1] do
          t+:= a+Ceiling ((b+t)/5);
        end for;
      return t;
    end function;
    g:= func< n, a, b | f(n+1, a, b)-f(n, a, b) >;
    A120170:= func< n | n eq 1 select 1 else g(n-1, 1, -4) >;
    [A120170(n): n in [1..60]]; // G. C. Greubel, Dec 25 2023
  • Mathematica
    f[s_] := Append[s, Ceiling[Plus @@ s/5]]; Nest[f, {1}, 57] (* Robert G. Wilson v, Jul 07 2006 *)
  • SageMath
    @CachedFunction
    def a(n):
        if (n==1): return 1
        else: return ceil(sum(a(k)/5 for k in (1..n-1)))
    [a(n) for n in (1..60)] # G. C. Greubel, Aug 19 2019
    

Extensions

Edited and extended by Robert G. Wilson v, Jul 07 2006

A120186 a(n) = ceiling( Sum_{i=1..n-1} a(i)/7 ), a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 23, 27, 30, 35, 40, 45, 52, 59, 68, 77, 88, 101, 115, 132, 151, 172, 197, 225, 257, 294, 336, 384, 439, 501, 573, 655, 748, 855, 977, 1117, 1277, 1459, 1667, 1906, 2178, 2489, 2845
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Crossrefs

Programs

  • Mathematica
    f[s_] := Append[s, Ceiling[Plus @@ s/7]]; Nest[f, {1}, 64] (* Robert G. Wilson v, Jul 07 2006 *)

Extensions

Edited and extended by Robert G. Wilson v, Jul 07 2006

A120194 a(n) = ceiling( Sum_{i=1..n-1} a(i)/8 ), a(1)=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 25, 28, 32, 36, 40, 45, 51, 57, 64, 72, 81, 91, 103, 116, 130, 146, 165, 185, 208, 234, 264, 297, 334, 376, 423, 475, 535, 602, 677, 762, 857, 964, 1084, 1220, 1372, 1544
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Crossrefs

Programs

  • Mathematica
    f[s_] := Append[s, Ceiling[Plus @@ s/8]]; Nest[f, {1}, 67] (* Robert G. Wilson v *)

Extensions

Edited and extended by Robert G. Wilson v, Jul 07 2006

A120202 a(n) = ceiling( Sum_{i=1..n-1} a(i)/9), a(1)=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, 20, 22, 25, 28, 31, 34, 38, 42, 47, 52, 58, 64, 71, 79, 88, 98, 109, 121, 134, 149, 166, 184, 205, 227, 253, 281, 312, 347, 385, 428, 476, 528, 587, 652, 725, 805, 895
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1) to a(N)
    S:= 0: A[1]:= 1:
    for n from 2 to N do
      S:= S + A[n-1];
      A[n]:= ceil(S/9);
    od:
    seq(A[n],n=1..N); # Robert Israel, Jul 14 2014
  • Mathematica
    a[s_] := Append[s, Ceiling[Plus @@ s/9]]; Nest[a, {1}, 70] (* Robert G. Wilson v, Jul 07 2006 *)

Extensions

Edited and extended by Robert G. Wilson v, Jul 07 2006
Typo in name corrected by Tom Edgar, Jul 14 2014

A120178 a(n)=ceiling( sum_{i=1..n-1} a(i)/6), a(1)=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 20, 23, 27, 32, 37, 43, 50, 59, 69, 80, 93, 109, 127, 148, 173, 202, 235, 275, 320, 374, 436, 509, 594, 693, 808, 943, 1100, 1283, 1497, 1747, 2038, 2377, 2774, 3236, 3775, 4404, 5138, 5995, 6994
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Crossrefs

Programs

  • Mathematica
    f[s_] := Append[s, Ceiling[Plus @@ s/5]]; Nest[f, {1}, 61] (* Robert G. Wilson v *)

Extensions

Edited and extended by Robert G. Wilson v, Jul 07 2006

A120169 a(n) = 12 + floor((1 + Sum_{j=1..n-1} a(j))/4).

Original entry on oeis.org

12, 15, 19, 23, 29, 36, 45, 57, 71, 89, 111, 139, 173, 217, 271, 339, 423, 529, 661, 827, 1033, 1292, 1615, 2018, 2523, 3154, 3942, 4928, 6160, 7700, 9625, 12031, 15039, 18798, 23498, 29372, 36715, 45894, 57368, 71710
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Crossrefs

Programs

  • Magma
    function f(n, a, b)
      t:=0;
        for k in [1..n-1] do
          t+:= a+Floor((b+t)/4);
        end for;
      return t;
    end function;
    g:= func< n, a, b | f(n+1, a, b)-f(n, a, b) >;
    A120169:= func< n | g(n, 12, 1) >;
    [A120169(n): n in [1..60]]; // G. C. Greubel, Sep 09 2023
    
  • Mathematica
    nxt[{t_,a_}]:=Module[{c=Floor[(t+49)/4]},{t+c,c}]; NestList[nxt,{12,12},40][[All,2]] (* Harvey P. Dale, Jun 21 2017 *)
  • SageMath
    @CachedFunction
    def f(n, p, q): return p + (q +sum(f(k, p, q) for k in range(1, n)))//4
    def A120169(n): return f(n, 12, 1)
    [A120169(n) for n in range(1, 61)] # G. C. Greubel, Sep 09 2023

A120135 a(n) = 5 + floor((1 + Sum_{j=1..n-1} a(j)) / 2).

Original entry on oeis.org

5, 8, 12, 18, 27, 40, 60, 90, 135, 203, 304, 456, 684, 1026, 1539, 2309, 3463, 5195, 7792, 11688, 17532, 26298, 39447, 59171, 88756, 133134, 199701, 299552, 449328, 673992, 1010988, 1516482, 2274723, 3412084, 5118126, 7677189, 11515784
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:= a[n]= 5 +Floor[(1+Sum[a[k], {k,n-1}])/2];
    Table[a[n], {n,60}] (* G. C. Greubel, May 07 2023 *)
  • SageMath
    @CachedFunction
    def A120135(n): return 5 + (1 + sum(A120135(k) for k in range(1,n)))//2
    [A120135(n) for n in range(1,61)] # G. C. Greubel, May 07 2023

Formula

a(n) ~ c * (3/2)^n, where c = 3.514931952760438754899508881646642282344325354834703833076259269449577... - Vaclav Kotesovec, May 07 2023
Showing 1-10 of 79 results. Next