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

A085068 Number of steps >= 1 for iteration of map x -> (4/3)*ceiling(x) to reach an integer when started at n, or -1 if no such integer is ever reached.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Aug 11 2003

Keywords

Comments

It is conjectured that an integer is always reached.

Crossrefs

Programs

  • Maple
    f := x->(4/3)*ceil(x); g := proc(n) local t1,c; global f; t1 := f(n); c := 1; while not type(t1, 'integer') do c := c+1; t1 := f(t1); od; RETURN([c,t1]); end;
    # second Maple program:
    a:= proc(n) local i; n; for i do 4/3*ceil(%);
          if %::integer then return i fi od
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 01 2021
  • Mathematica
    f[n_] := Block[{c = 1, k = 4 n/3}, While[ ! IntegerQ@k, c++; k = 4 Ceiling@k/3]; c]; Table[f@n, {n, 0, 104}] (* Robert G. Wilson v *)
  • Python
    from fractions import Fraction
    def A085068(n):
        c, x, m = 1, Fraction(4*n,3), Fraction(4,3)
        while x.denominator > 1:
            x = m*x._ceil_()
            c += 1
        return c # Chai Wah Wu, Mar 01 2021

A085328 Record values in A085068.

Original entry on oeis.org

1, 3, 9, 15, 17, 18, 24, 27, 28, 30, 40, 41, 44, 47, 48, 50, 51, 52, 53, 56, 57, 60, 64, 67
Offset: 1

Views

Author

N. J. A. Sloane, Aug 13 2003

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 1, k = 4 n/3}, While[ ! IntegerQ@k, c++; k = 4 Ceiling@k/3]; c]; t = Table[0, {1000}]; Do[ a = f@n; If[a < 101 && t[[a]] == 0, t[[a]] = n; Print[{a, n}]], {n, 0, 21*10^8}] (* Robert G. Wilson v, May 28 2007 *)

Extensions

More terms from Jason Earls, Aug 14 2003
a(12)-a(16) from Robert G. Wilson v, May 28 2007
a(17)-a(24) from Lars Blomberg, Mar 03 2018

A085330 Where records occur in A085068.

Original entry on oeis.org

0, 1, 5, 161, 1772, 3097, 3473, 23084, 38752, 335165, 491729, 38248700, 49050536, 95305397, 1019659805, 1549919921, 2973640172, 4527000701, 6300121204, 10663850980, 30980417576, 40783699961, 57033894608, 409565230433
Offset: 1

Views

Author

N. J. A. Sloane, Aug 13 2003

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 1, k = 4 n/3}, While[ ! IntegerQ@k, c++; k = 4 Ceiling@k/3]; c]; t = Table[0, {1000}]; Do[ a = f@n; If[a < 101 && t[[a]] == 0, t[[a]] = n; Print[{a, n}]], {n, 0, 21*10^8}] (* Robert G. Wilson v, May 28 2007 *)
  • PARI
    f(n)=(4/3)*ceil(n); { a(n) = local(c, k); c=1; k=n; while(frac(f(k))!=0, k=f(k); c++); c } { rec=0; for(n=0,5*10^5,if(a(n)>rec,rec=a(n); print1(n":"a(n)","))) }

Extensions

More terms from Jason Earls, Aug 14 2003
a(12)-a(16) from Robert G. Wilson v, May 28 2007
a(17)-a(24) from Lars Blomberg, Mar 03 2018

A087675 Consider recurrence b(0) = (2n+1)/2, b(n) = b(0)*floor(b(n-1)); sequence gives first integer reached.

Original entry on oeis.org

5, 35, 18, 814, 39, 390, 68, 72827, 105, 1449, 150, 31887, 203, 3596, 264, 27852510, 333, 7215, 410, 208464, 495, 12690, 588, 10561998, 689, 20405, 798, 744049, 915, 30744, 1040, 46620858503, 1173, 44091, 1314, 1950450, 1463, 60830, 1620, 121575329, 1785
Offset: 2

Views

Author

N. J. A. Sloane, following a suggestion of Bela Bajnok (bbajnok(AT)gettysburg.edu), Sep 27 2003

Keywords

Crossrefs

A001511 gives number of steps to reach an integer.

Programs

  • Maple
    f:= proc(n)
      local b0, b;
      b0:= (2*n+1)/2;
      b:= b0;
      do
        b:= b0*floor(b);
        if b::integer then return b fi
      od
    end proc:
    map(f, [$2..100]); # Robert Israel, Nov 25 2019
  • Mathematica
    f[n_] := Module[{b0, b}, b0 = (2n+1)/2; b = b0; While[True, b = b0*Floor[b]; If[IntegerQ[b], Return[b]]]];
    Table[f[n], {n, 2, 100}] (* Jean-François Alcover, Oct 23 2023, after Robert Israel *)

Formula

The even-indexed terms are given by A007742.

Extensions

Offset corrected by Robert Israel, Nov 25 2019

A129377 First occurrence of n in A085068.

Original entry on oeis.org

3, 2, 1, 17, 19, 14, 10, 7, 5, 500, 404, 311, 233, 215, 161, 2363, 1772, 3097, 11474, 8605, 8234, 6175, 4631, 3473, 34196, 30779, 23084, 38752, 422549, 335165, 1500443, 1125332, 2039653, 2762863, 2072147, 1554110, 1165582, 874186, 655639, 491729
Offset: 1

Views

Author

Robert G. Wilson v, May 27 2007

Keywords

Comments

A085068: Number of steps for iteration of map x -> (4/3)*ceiling(x) to reach an integer > n when started at n, or -1 if no such integer is ever reached.
In the creation of this sequence I have tested all integers from 0 to 400000000 and they all reach an integer.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 1, k = 4 n/3}, While[ !IntegerQ@k, c++; k = 4 Ceiling@k/3]; c]; t = Table[0, {1000}]; Do[ a = f@n; If[a < 101 && t[[a]] == 0, t[[a]] = n; Print[{a, n}]], {n, 0, 2800000}]
Showing 1-5 of 5 results.