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 11-14 of 14 results.

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

Original entry on oeis.org

11, 13, 17, 21, 26, 33, 41, 51, 64, 80, 100, 125, 156, 195, 244, 305, 381, 476, 595, 744, 930, 1163, 1453, 1817, 2271, 2839, 3548, 4435, 5544, 6930, 8663, 10828, 13535, 16919, 21149, 26436, 33045, 41306, 51633, 64541
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) >;
    A120168:= func< n | g(n, 11, 0) >;
    [A120168(n): n in [1..60]]; // G. C. Greubel, Sep 09 2023
    
  • Mathematica
    f[n_, p_, q_]:= f[n,p,q]= p +Quotient[q +Sum[f[k,p,q], {k,n-1}], 4];
    A120168[n_]:= f[n, 11, 0];
    Table[A120168[n], {n, 60}] (* G. C. Greubel, Sep 09 2023 *)
  • SageMath
    @CachedFunction
    def f(n, p, q): return p + (q +sum(f(k, p, q) for k in range(1, n)))//4
    def A120168(n): return f(n, 11, 0)
    [A120168(n) for n in range(1, 61)] # G. C. Greubel, Sep 09 2023

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

Original entry on oeis.org

7, 9, 11, 14, 17, 21, 27, 33, 42, 52, 65, 81, 102, 127, 159, 199, 248, 310, 388, 485, 606, 758, 947, 1184, 1480, 1850, 2312, 2890, 3613, 4516, 5645, 7056, 8820, 11025, 13782, 17227, 21534, 26917, 33647, 42058
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) >;
    A120165:= func< n | g(n, 7, 1) >;
    [A120165(n): n in [1..60]]; // G. C. Greubel, Sep 09 2023
    
  • Maple
    A[1]:= 7: S:= 7:
    for n from 2 to 100 do A[n]:= floor((29 + S)/4); S:= S + A[n] od:
    seq(A[i],i=1..100); # Robert Israel, Mar 20 2017
  • Mathematica
    a = {7}; Do[AppendTo[a, Floor[(29 + Total@ a)/4]], {i, 2, 40}]; a (* Michael De Vlieger, Mar 20 2017 *)
  • SageMath
    @CachedFunction
    def f(n, p, q): return p + (q +sum(f(k, p, q) for k in range(1, n)))//4
    def A120165(n): return f(n, 7, 1)
    [A120165(n) for n in range(1, 61)] # G. C. Greubel, Sep 09 2023

Formula

a(n) ~ c (5/4)^n with c approximately 5.5905081519. - Robert Israel, Mar 20 2017

A245357 Number of numbers whose base 5/4 expansion (see A024634) has n digits.

Original entry on oeis.org

5, 5, 5, 5, 5, 10, 10, 15, 15, 20, 25, 30, 40, 50, 60, 75, 95, 120, 150, 185, 235, 290, 365, 455, 570, 710, 890, 1110, 1390, 1735, 2170, 2715, 3390, 4240, 5300, 6625, 8280, 10350, 12940, 16175, 20215, 25270, 31590, 39485, 49355, 61695, 77120, 96400, 120500
Offset: 1

Views

Author

James Van Alstine, Jul 18 2014

Keywords

Examples

			The numbers 10..14 are represented by 430, 431, 432, 433, 434 respectively in base 5/4. These are the only numbers with three digits, and so a(3)=5.
		

Crossrefs

Programs

  • Sage
    A=[1]
    for i in [1..60]:
        A.append(ceil((5-4)/4*sum(A)))
    [5*x for x in A]

Formula

a(n) = 5*A120160(n).

A348533 Generalized Josephus problem: Let T(m,k), k>=2, m=1,2,3,.., be the number of people on a circle such that the survivor is one of the first k-1 people after every k-th person has been removed.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 8, 3, 2, 1, 16, 4, 3, 2, 1, 32, 6, 4, 3, 2, 1, 64, 9, 5, 4, 3, 2, 1, 128, 14, 7, 5, 4, 3, 2, 1, 256, 21, 9, 6, 5, 4, 3, 2, 1, 512, 31, 12, 8, 6, 5, 4, 3, 2, 1, 1024, 47, 16, 10, 7, 6, 5, 4, 3, 2, 1, 2048, 70, 22, 12, 8, 7, 6, 5, 4, 3, 2, 1
Offset: 1

Views

Author

Gerhard Kirchner, Oct 21 2021

Keywords

Comments

The table, see example, is read by ascending antidiagonals.
Trivial cases: T(m,k)=m for m
The recurrence in the formula section does not only yield T(m,k), but also the survivor's number S(m,k) so that the Josephus problem can be solved for any number N of people, especially for large N because T(m,k) grows exponentially, see link "Derivation of the recurrence", section II.
T(m,k) compared with other sequences ("->" means that the sequences can be made equal by removing repeated terms, see link "Derivation of the recurrence", section IV).
T(m,2) = A000079(m)=2^(m-1)
T(m,3) -> A073941
T(m,4) -> A072493
T(m+4,4)= A005427(m)
T(m,5) -> A120160
T(m,6) -> A120170
T(m,7) -> A120178
T(m,8) -> A120186
T(m,9) -> A120194
T(m,10)-> A120202

Examples

			k=4: 7 people, survivors number 2 <4.
k=4: 6 people, survivors number 5>=4, counterexample.
Table T(m,k) begins:
  m\k____2____3____4____5
   1:    1    1    1    1
   2:    2    2    2    2
   3:    4    3    3    3
   4:    8    4    4    4
   5:   16    6    5    5
   6:   32    9    7    6
   7:   64   14    9    8
   8:  128   21   12   10
   9:  256   31   16   12
  10:  512   47   22   15
		

Crossrefs

Programs

  • Maxima
    block(k:10, mmax:30, t:1, s:1, T:[1],
    /*Terms T(m,k), m=1 thru mmax */
    for m from 1 thru mmax-1 do(
        p:  mod(t, k-1),
        if s>p then e:-p else e:k-1-p,
        t: (k*t+e)/(k-1), s: 1+mod(s+e-1, t),
        T:append(T,[t])),
    return (T));

Formula

Recurrence for T(m,k) and S(m,k), the survivor's number.
Start: T(1,k)=S(1,k)=1.
T(m+1,k)=(k*T(m,k)+e)/(k-1),
S(m+1,k)=1 + (S(m,k)+e-1) mod T(m+1,k),
with e=-p if S(m,k)>p and e=k-1-p otherwise, p = T(m,k) mod (k-1).
Previous Showing 11-14 of 14 results.