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 19 results. Next

A094683 Juggler sequence: if n mod 2 = 0 then floor(sqrt(n)) else floor(n^(3/2)).

Original entry on oeis.org

0, 1, 1, 5, 2, 11, 2, 18, 2, 27, 3, 36, 3, 46, 3, 58, 4, 70, 4, 82, 4, 96, 4, 110, 4, 125, 5, 140, 5, 156, 5, 172, 5, 189, 5, 207, 6, 225, 6, 243, 6, 262, 6, 281, 6, 301, 6, 322, 6, 343, 7, 364, 7, 385, 7, 407, 7, 430, 7, 453, 7, 476, 7, 500, 8, 524, 8, 548, 8, 573, 8, 598, 8, 623, 8, 649
Offset: 0

Views

Author

N. J. A. Sloane, Jun 09 2004

Keywords

Comments

Interspersion of A000093 and A000196. - Michel Marcus, Nov 11 2013

References

  • C. Pickover, Computers and the Imagination, St. Martin's Press, NY, 1991, p. 233.

Crossrefs

Programs

  • Maple
    A094683 :=proc(n) if n mod 2 = 0 then RETURN(floor(sqrt(n))) else RETURN(floor(n^(3/2))); end if; end proc;
  • Mathematica
    Table[If[EvenQ[n], Floor[Sqrt[n]], Floor[n^(3/2)]], {n, 0, 100}] (* Indranil Ghosh, Apr 07 2017 *)
  • PARI
    a(n) = if(n%2,sqrtint(n^3), sqrtint(n)); \\ Indranil Ghosh, Apr 08 2017
    
  • Python
    import math
    from sympy import sqrt
    def a(n): return int(math.floor(sqrt(n))) if n%2 == 0 else int(math.floor(n**(3/2)))
    print([a(n) for n in range(51)]) # Indranil Ghosh, Apr 08 2017
    
  • Python
    from math import isqrt
    def A094683(n): return isqrt(n**3 if n % 2 else n) # Chai Wah Wu, Feb 18 2022

A007321 Number of steps needed for modified juggler sequence (A094685) started at n to reach 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

It is not known if every starting value eventually reaches 1.

References

  • C. Pickover, Computers and the Imagination, St. Martin's Press, NY, 1991, p. 233.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    f:=proc(n) if n mod 2 = 0 then RETURN(round(sqrt(n))) else RETURN(round(n^(3/2))); fi; end; # corrected by R. J. Mathar, Jul 28 2007
  • Mathematica
    mjs[n_] := If[EvenQ[n], Round[Sqrt[n]], Round[Sqrt[n^3]]]; f[n_] := Length[NestWhileList[mjs, n, # != 1 &]] - 1; Table[ f[n], {n, 90}]

Extensions

More terms from N. J. A. Sloane, Jun 09 2004

A094670 Smallest number which requires n iterations to reach 1 in the juggler sequence problem.

Original entry on oeis.org

1, 2, 4, 16, 7, 5, 3, 9, 33, 19, 81, 25, 353, 183, 39, 201, 103, 37, 205, 77, 681, 263, 3817, 429, 175, 1673, 539, 165, 671, 321, 5875, 477, 173, 2243, 265, 29017, 1011, 677, 9361, 659, 241, 3389, 1123, 163, 2057, 625, 15271, 4481
Offset: 0

Views

Author

Jason Earls, Jun 09 2004

Keywords

Comments

A juggler sequence is defined as follows: given a positive integer x, repeat: if x is even then x <- [x^(1/2)] else x <- [x^(3/2)] until x=1. The brackets indicate the floor function.
a(104) is unknown ( > 10000000). - Robert G. Wilson v, Jun 11 2014

Crossrefs

Programs

  • Mathematica
    js[n_] := If[ EvenQ[ n], Floor[ Sqrt[n]], Floor[ Sqrt[n^3]]]; f[n_] := Length[ NestWhileList[js, n, # != 1 &]] - 1; a = Table[0, {50}]; Do[ b = f[n]; If[b < 51 && a[[b]] == 0, a[[b]] = n; Print[n, " = ", b]], {n, 10^5}] (* Robert G. Wilson v *)

Extensions

More terms from Robert G. Wilson v, Jun 14 2004

A094679 n sets a new record for number of iterations to reach 1 in the juggler sequence problem.

Original entry on oeis.org

1, 2, 3, 9, 19, 25, 37, 77, 163, 193, 1119, 1155, 4065, 4229, 4649, 7847, 13325, 34175, 59739, 78901, 636731, 1122603, 1301535, 2263913, 5947165, 72511173, 78641579, 125121851, 198424189, 4488817391
Offset: 1

Views

Author

Jason Earls, Jun 09 2004

Keywords

Comments

Where records occur in A007320.
The Juggler sequence: begin with x and if x is even, [sqrt(x)] -> x and if x is odd, [sqrt(x^3)] -> x and repeat until x = 1, count the iterations. - Robert G. Wilson v, Jun 14 2004
78901 reaches a maximum of 4064983429...(skip the next 371727 digits)...2140697134 during its trip to 1. - Robert G. Wilson v, Jun 14 2004
I postulate that 2 is the only even number in this sequence. - Harry J. Smith, Aug 15 2008
a(30) > 1.6*10^9. - Giovanni Resta, Apr 08 2017

Examples

			78901 takes 258 iterations to reach 1; see A094698 for the others.
		

Crossrefs

Programs

  • Mathematica
    $MaxPrecision = 250000000; js[n_] := If[ EvenQ[ n], Floor[ Sqrt[n]], Floor[ Sqrt[n^3]]]; f[n_] := Block[{c = 1, k = n}, While[k = js[k]; k != 1, c++ ]; c]; a = {0}; Do[ b = f[n]; If[b > a[[ -1]], AppendTo[a, b]], {n, 3053595}]; a (* Robert G. Wilson v *)

Extensions

More terms from Robert G. Wilson v, Jun 14 2004
a(25) = 5947165 from Eric W. Weisstein, Jan 25 2006
a(26)-a(27) from Robert G. Wilson v, Jun 15 2014
a(28)-a(29) from Giovanni Resta, Apr 08 2017
a(30) from Ethan Slota, Apr 15 2025

A094685 Modified juggler sequence: if n mod 2 = 0 then round(sqrt(n)) else round(n^(3/2)).

Original entry on oeis.org

0, 1, 1, 5, 2, 11, 2, 19, 3, 27, 3, 36, 3, 47, 4, 58, 4, 70, 4, 83, 4, 96, 5, 110, 5, 125, 5, 140, 5, 156, 5, 173, 6, 190, 6, 207, 6, 225, 6, 244, 6, 263, 6, 282, 7, 302, 7, 322, 7, 343, 7, 364, 7, 386, 7, 408, 7, 430, 8, 453, 8, 476, 8, 500, 8, 524, 8, 548, 8, 573, 8, 598, 8, 624, 9, 650
Offset: 0

Views

Author

N. J. A. Sloane, Jun 09 2004

Keywords

References

  • C. Pickover, Computers and the Imagination, St. Martin's Press, NY, 1991, p. 233.

Crossrefs

Programs

  • Maple
    f:=proc(n) if n mod 2 = 0 then RETURN(round(sqrt(n))) else RETURN(round(n^(3/2))); fi; end;
  • Mathematica
    A094685[n_]:=If[Mod[n,2]==0,Round[Sqrt[n]],Round[n^(3/2)]];Array[A094685,76,0] (* James C. McMahon, Apr 15 2025 *)
  • Python
    from gmpy2 import isqrt_rem
    def A094685(n):
        i, j = isqrt_rem(n**3 if n % 2 else n)
        return int(i+ int(4*(j-i) >= 1)) # Chai Wah Wu, Aug 17 2016

A094698 Number of steps where the Juggler sequence reaches a new record.

Original entry on oeis.org

0, 1, 6, 7, 9, 11, 17, 19, 43, 73, 75, 80, 88, 96, 107, 131, 166, 193, 201, 258, 263, 268, 271, 298, 335, 340, 443, 479, 484, 527
Offset: 1

Views

Author

N. J. A. Sloane, Jun 09 2004

Keywords

Comments

Records in A007320.
The Juggler sequence: begin with x; if x is even, floor(sqrt(x)) -> x; if x is odd, floor(sqrt(x^3)) -> x; repeat until x = 1, count the iterations.

Crossrefs

Programs

  • Mathematica
    $MaxPrecision = 250000000; js[n_] := If[ EvenQ[ n], Floor[ Sqrt[n]], Floor[ Sqrt[n^3]]]; f[n_] := Block[{c = 1, k = n}, While[k = js[k]; k != 1, c++ ]; c]; a = {0}; Do[ b = f[n]; If[b > a[[ -1]], AppendTo[a, b]; Print[n]], {n, 3053595}] (* Robert G. Wilson v, Jun 14 2004 *)

Extensions

More terms from Robert G. Wilson v, Jun 14 2004
a(25) = 335 from Eric W. Weisstein, Jan 25 2006
Edited by N. J. A. Sloane, Sep 16 2008 at the suggestion of Tim Nikkel
a(26)-a(29) from Giovanni Resta, Apr 08 2017
a(30) from Ethan Slota, Apr 15 2025

A095396 Modified juggler map: for even numbers: a(n) = floor(n^(2/3)) and for odd n: a(n) = floor(n^(3/2)) = floor(sqrt(n^3)).

Original entry on oeis.org

1, 1, 5, 2, 11, 3, 18, 4, 27, 4, 36, 5, 46, 5, 58, 6, 70, 6, 82, 7, 96, 7, 110, 8, 125, 8, 140, 9, 156, 9, 172, 10, 189, 10, 207, 10, 225, 11, 243, 11, 262, 12, 281, 12, 301, 12, 322, 13, 343, 13, 364, 13, 385, 14, 407, 14, 430, 14, 453, 15, 476, 15, 500, 16, 524, 16, 548, 16
Offset: 1

Views

Author

Labos Elemer, Jun 18 2004

Keywords

Comments

Parallel to A094683: values for odd arguments are same, for even not necessarily so.

Crossrefs

Programs

  • Mathematica
    d[x_]:=d[x]=(1-Mod[x, 2])*Floor[N[x^(2/3), 50]] +Mod[x, 2]*Floor[N[x^(3/2), 50]];d[1]=1; Table[d[w], {w, 1, 150}]
    Table[If[EvenQ[n],Floor[n^(2/3)],Floor[n^(3/2)]],{n,70}] (* Harvey P. Dale, Dec 28 2018 *)
  • Scheme
    (define (A095396 n) (if (even? n) (A048766 (* n n)) (A000196 (* n n n)))) ;; Antti Karttunen, May 28 2017

Formula

For even n: a(n) = A048766(n^2), for odd n: a(n) = A000196(n^3). - Antti Karttunen, May 28 2017

Extensions

Name simplified by Antti Karttunen, May 28 2017

A094819 Number of steps needed for juggler sequence (A094683) started at 10^n to reach 1.

Original entry on oeis.org

0, 7, 8, 7, 9, 6, 8, 7, 10, 7, 7, 20, 9, 25, 8, 11, 11, 13, 8, 10, 8, 16, 21, 24, 10, 18, 26, 15, 9, 45, 12, 31, 12, 20, 14, 22, 9, 20, 11, 25, 9, 33, 17, 33, 22, 30, 25, 11, 11, 30, 19, 13, 27, 21, 16, 10, 10, 16, 46, 70, 13, 13, 32, 21, 13, 21, 21, 48, 15, 29, 23, 29, 10, 18, 21
Offset: 0

Views

Author

Jason Earls, Jun 12 2004

Keywords

Crossrefs

Programs

  • Mathematica
    fj[n_]:=If[EvenQ[n], Floor[Sqrt[n]], Floor[n^(3/2)]];a094819[n_]:=Length[ NestWhileList[fj,10^n, # != 1 &]] - 1;Array[a094819,75,0] (* James C. McMahon, Apr 18 2025 *)

Formula

a(n) = A007320(A011557(n)). - Michel Marcus, Apr 19 2025

A095397 Modified juggler map: see A095396. Largest value in trajectory of started n under the juggler map of A095396.

Original entry on oeis.org

1, 2, 36, 4, 36, 36, 36, 8, 140, 10, 36, 36, 46, 36, 58, 36, 70, 36, 82, 36, 96, 36, 110, 24, 52214, 26, 140, 140, 156, 140, 172, 32, 2598, 34, 2978, 36, 86818724, 38, 233046, 40, 262, 42, 4710, 44, 5222, 46, 322, 48, 6352, 50, 364, 52, 7554, 54, 8210, 56, 430, 58
Offset: 1

Views

Author

Labos Elemer, Jun 18 2004

Keywords

Comments

Parallel to A094716.

Examples

			n=37: the trajectory is {37, 225, 3375, 196069, 86818724, 196068, 3374, 224, 36, 10, 4, 2, 1}, the peak is a[37]=86818724
		

Crossrefs

Programs

  • Mathematica
    d[x_]:=d[x]=(1-Mod[x, 2])*Floor[N[x^(2/3), 50]] +Mod[x, 2]*Floor[N[x^(3/2), 50]];d[1]=1; fd[x_]:=Delete[FixedPointList[d, x], -1] Table[Max[fd[w]], {w, 1, m}]

A095398 Number of steps required to reach 1 for iterated modified juggler map of A095396.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jun 18 2004

Keywords

Comments

Parallel to A007320.

Examples

			n=37: the trajectory is {37, 225, 3375, 196069, 86818724, 196068, 3374, 224, 36, 10, 4, 2, 1}, number of required steps is a[37]=13-1=12.
		

Crossrefs

Programs

  • Mathematica
    d[x_]:=d[x]=(1-Mod[x, 2])*Floor[N[x^(2/3), 50]] +Mod[x, 2]*Floor[N[x^(3/2), 50]];d[1]=1; fd[x_]:=Delete[FixedPointList[d, x], -1] Table[Max[fd[w]], {w, 1, m}]
    Table[Length[NestWhileList[If[EvenQ[#],Floor[#^(2/3)],Floor[#^(3/2)]]&, n, #!=1&]]-1,{n,90}] (* Harvey P. Dale, Dec 28 2018 *)
Showing 1-10 of 19 results. Next