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

A028393 Iterate the map in A006368 starting at 8.

Original entry on oeis.org

8, 12, 18, 27, 20, 30, 45, 34, 51, 38, 57, 43, 32, 48, 72, 108, 162, 243, 182, 273, 205, 154, 231, 173, 130, 195, 146, 219, 164, 246, 369, 277, 208, 312, 468, 702, 1053, 790, 1185, 889, 667, 500, 750, 1125, 844, 1266, 1899, 1424, 2136, 3204, 4806, 7209, 5407
Offset: 0

Views

Author

Keywords

Comments

It is conjectured that this trajectory never repeats, but no proof of this has been found. - N. J. A. Sloane, Jul 14 2009

References

  • J. H. Conway, Unpredictable iterations, in Proc. Number Theory Conf., Boulder, CO, 1972, pp. 49-52. - N. J. A. Sloane, Oct 04 2012
  • R. K. Guy, Unsolved Problems in Number Theory, E17. - N. J. A. Sloane, Oct 04 2012
  • J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010; see page 5. [From N. J. A. Sloane, Jan 21 2011]

Crossrefs

Programs

  • Haskell
    a028393 n = a028393_list !! n
    a028393_list = iterate a006368 8  -- Reinhard Zumkeller, Apr 18 2012
    
  • Maple
    F := proc(n) option remember; if n = 0 then 8 elif 3*F(n-1) mod 2 = 0 then 3*F(n-1)/2 else round(3*F(n-1)/4); fi; end; [ seq(F(i),i=0..80) ];
  • Mathematica
    f[n_?EvenQ] := 3*n/2; f[n_] := Round[3*n/4]; a[0] = 8; a[n_] := a[n] = f[a[n - 1]]; Table[a[n], {n, 0, 52}]  (* Jean-François Alcover, Jun 10 2013 *)
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def F(n):
        if n == 0: return 8
        elif 3*F(n-1)%2 == 0: return 3*F(n-1)//2
        else: return (3*F(n-1)+1)//4
    print([F(i) for i in range(81)]) # Michael S. Branicky, Aug 12 2021 after J. H. Conway

Formula

a(n+1) = A006368(a(n)).

A028395 Iterate the map in A006368 starting at 14.

Original entry on oeis.org

14, 21, 16, 24, 36, 54, 81, 61, 46, 69, 52, 78, 117, 88, 132, 198, 297, 223, 167, 125, 94, 141, 106, 159, 119, 89, 67, 50, 75, 56, 84, 126, 189, 142, 213, 160, 240, 360, 540, 810, 1215, 911, 683, 512, 768, 1152, 1728, 2592, 3888, 5832, 8748, 13122, 19683
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A028393.
Cf. A180853, A180864, A182205; A028398(5) = 14.

Programs

  • Haskell
    a028395 n = a028395_list !! n
    a028395_list = iterate a006368 14  -- Reinhard Zumkeller, Apr 18 2012
  • Mathematica
    SubstitutionSystem[{n_ :> If[EvenQ[n], 3n/2, Round[3n/4]]}, {14}, 60] // Flatten (* Jean-François Alcover, Mar 01 2019 *)

Formula

a(n+1) = A006368(a(n)).

A180853 Trajectory of 4 under map n->A006368(n).

Original entry on oeis.org

4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5, 4, 6, 9, 7, 5
Offset: 0

Views

Author

N. J. A. Sloane, Jan 22 2011

Keywords

Comments

The trajectory of 8 is a famous unsolved problem - see A028393.

References

  • D. Gale, Tracking the Automatic Ant and Other Mathematical Explorations, A Collection of Mathematical Entertainments Columns from The Mathematical Intelligencer, Springer, 1998; see p. 16.

Crossrefs

Programs

Formula

Periodic with period of length 5.
G.f.: ( -4-6*x-9*x^2-7*x^3-5*x^4 ) / ( (x-1)*(1+x+x^2+x^3+x^4) ). - R. J. Mathar, Mar 10 2011
a(n+1) = A006368(a(n)).
a(n) = a(n-5). - Wesley Ivan Hurt, Apr 26 2021

A182205 Iterate the map in A006368 starting at 40.

Original entry on oeis.org

40, 60, 90, 135, 101, 76, 114, 171, 128, 192, 288, 432, 648, 972, 1458, 2187, 1640, 2460, 3690, 5535, 4151, 3113, 2335, 1751, 1313, 985, 739, 554, 831, 623, 467, 350, 525, 394, 591, 443, 332, 498, 747, 560, 840, 1260, 1890, 2835, 2126, 3189, 2392, 3588, 5382
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 18 2012

Keywords

Comments

Like for iterations with starting points 8 or 14, it is conjectured that also this trajectory never repeats.

References

  • D. Gale, Tracking the Automatic Ant and Other Mathematical Explorations, A Collection of Mathematical Entertainments Columns from The Mathematical Intelligencer, Springer, 1998; see p. 16.

Crossrefs

Programs

  • Haskell
    a182205 n = a182205_list !! n
    a182205_list = iterate a006368 40
  • Mathematica
    SubstitutionSystem[{n_ :> If[EvenQ[n], 3 n/2, Round[3 n/4]]}, {40}, 60] // Flatten (* Jean-François Alcover, Mar 01 2019 *)

Formula

a(n+1) = A006368(a(n)), with a(0) = 40.

A180864 Trajectory of 13 under map n->A006368(n).

Original entry on oeis.org

13, 10, 15, 11, 8, 12, 18, 27, 20, 30, 45, 34, 51, 38, 57, 43, 32, 48, 72, 108, 162, 243, 182, 273, 205, 154, 231, 173, 130, 195, 146, 219, 164, 246, 369, 277, 208, 312, 468, 702, 1053, 790, 1185, 889, 667, 500, 750, 1125, 844, 1266, 1899, 1424, 2136, 3204, 4806, 7209, 5407, 4055, 3041, 2281, 1711, 1283, 962
Offset: 0

Views

Author

N. J. A. Sloane, Jan 22 2011

Keywords

Comments

Merges with the trajectory of 8 after four steps - see A028393.
It is a famous unsolved problem to show that this trajectory is unbounded.

References

  • D. Gale, Tracking the Automatic Ant and Other Mathematical Explorations, A Collection of Mathematical Entertainments Columns from The Mathematical Intelligencer, Springer, 1998; see p. 16.

Crossrefs

Programs

  • Haskell
    a180864 n = a180864_list !! n
    a180864_list = iterate a006368 13  -- Reinhard Zumkeller, Apr 18 2012
  • Mathematica
    b[n_] := If[EvenQ[n], 3n/2, Floor[(3n+2)/4]];
    a[0] = 13; a[n_] := a[n] = b[a[n-1]];
    Table[a[n], {n, 0, 62}] (* Jean-François Alcover, Aug 01 2018 *)
    SubstitutionSystem[{n_ :> If[EvenQ[n], 3n/2, Round[3n/4]]}, {13}, 62] // Flatten (* Jean-François Alcover, Mar 01 2019 *)

Formula

a(n+1) = A006368(a(n)).

A217218 Trajectory of 44 under the map k -> A006368(k).

Original entry on oeis.org

44, 66, 99, 74, 111, 83, 62, 93, 70, 105, 79, 59, 44, 66, 99, 74, 111, 83, 62, 93, 70, 105, 79, 59, 44, 66, 99, 74, 111, 83, 62, 93, 70, 105, 79, 59, 44, 66, 99, 74, 111, 83, 62, 93, 70, 105, 79, 59, 44, 66, 99, 74, 111, 83, 62, 93, 70, 105, 79, 59, 44, 66, 99, 74, 111, 83, 62, 93, 70, 105, 79, 59, 44, 66, 99, 74, 111, 83, 62, 93, 70, 105, 79, 59, 44, 66, 99, 74, 111, 83, 62, 93, 70, 105, 79, 59
Offset: 1

Views

Author

N. J. A. Sloane, Oct 04 2012

Keywords

Comments

Periodic with period length 12.
It is believed that this is the longest trajectory that cycles (the others are {1}, {2,3}, {4,6,9,7,5}).

References

  • See also references and links in A006368.

Crossrefs

Programs

  • Haskell
    a217218 n = a217218_list !! (n-1)
    a217218_list = iterate a006368 44  -- Reinhard Zumkeller, Apr 06 2013
    
  • Magma
    &cat[ [44,66,99,74,111,83,62,93,70,105,79,59]: n in [0..9] ]; // Vincenzo Librandi, Jun 28 2015
    
  • Mathematica
    t={44}; While[n=t[[-1]]; s=If[EvenQ[n], 3*n/2, Round[3*n/4]]; Length[t]<100&&!MemberQ[t, s], AppendTo[t, s]]; t (* Vincenzo Librandi, Jun 28 2015 *)
    PadRight[{},120,{44,66,99,74,111,83,62,93,70,105,79,59}] (* Harvey P. Dale, Jul 30 2025 *)
  • PARI
    Vec(x*(44 + 66*x + 99*x^2 + 74*x^3 + 111*x^4 + 83*x^5 + 62*x^6 + 93*x^7 + 70*x^8 + 105*x^9 + 79*x^10 + 59*x^11) / ((1 - x)*(1 + x)*(1 - x + x^2)*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)) + O(x^40)) \\ Colin Barker, Aug 16 2019

Formula

a(n+1) = A006368(a(n)).
From Colin Barker, Aug 16 2019: (Start)
G.f.: x*(44 + 66*x + 99*x^2 + 74*x^3 + 111*x^4 + 83*x^5 + 62*x^6 + 93*x^7 + 70*x^8 + 105*x^9 + 79*x^10 + 59*x^11) / ((1 - x)*(1 + x)*(1 - x + x^2)*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)).
a(n) = a(n-12) for n>12.
(End)

A223088 Trajectory of 82 under the map n-> A006368(n).

Original entry on oeis.org

82, 123, 92, 138, 207, 155, 116, 174, 261, 196, 294, 441, 331, 248, 372, 558, 837, 628, 942, 1413, 1060, 1590, 2385, 1789, 1342, 2013, 1510, 2265, 1699, 1274, 1911, 1433, 1075, 806, 1209, 907, 680, 1020, 1530, 2295, 1721, 1291, 968, 1452, 2178, 3267, 2450, 3675
Offset: 1

Views

Author

N. J. A. Sloane, Mar 22 2013

Keywords

Comments

It is conjectured that this trajectory does not close on itself.

Crossrefs

Programs

  • Maple
    f:=n-> if n mod 2 = 0 then 3*n/2 elif n mod 4 = 1 then (3*n+1)/4 else (3*n-1)/4; fi;
    t1:=[82];
    for n from 1 to 100 do t1:=[op(t1),f(t1[nops(t1)])]; od:
    t1;
  • Mathematica
    t = {82}; While[n = t[[-1]]; s = If[EvenQ[n], 3*n/2, Round[3*n/4]]; Length[t] < 100 && ! MemberQ[t, s], AppendTo[t, s]]; t (* T. D. Noe, Mar 22 2013 *)
    SubstitutionSystem[{n_ :> If[EvenQ[n], 3n/2, Round[3n/4]]}, {82}, 100] // Flatten (* Jean-François Alcover, Mar 01 2019 *)

A349376 Dirichlet convolution of A006368 with the Dirichlet inverse of A006369, where A006368 is the "amusical permutation", and A006369 is its inverse permutation.

Original entry on oeis.org

1, 0, 0, 1, -3, 5, -4, -2, 1, 11, -7, -7, -7, 14, 7, 4, -10, 2, -11, -22, 10, 25, -14, 16, 7, 25, 0, -26, -17, -41, -18, -8, 17, 36, 34, 7, -21, 39, 17, 52, -24, -52, -25, -48, 1, 50, -28, -36, 8, -51, 24, -48, -31, 7, 62, 60, 27, 61, -35, 136, -35, 64, 0, 16, 62, -93, -39, -70, 34, -178, -42, -26, -42, 75, -27, -74
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Comments

Obviously, convolving this sequence with A006369 gives its inverse A006368 from n >= 1 onward.

Crossrefs

Cf. A006368, A006369, A349368, A349377 (Dirichlet inverse), A349378 (sum with it).
Cf. also pairs A349613, A349614 and A349397, A349398 for similar constructions.

Programs

Formula

a(n) = Sum_{d|n} A006368(d) * A349368(n/d).

A349377 Dirichlet convolution of A006369 with the Dirichlet inverse of A006368, where A006368 is the "amusical permutation", and A006369 is its inverse permutation.

Original entry on oeis.org

1, 0, 0, -1, 3, -5, 4, 2, -1, -11, 7, 7, 7, -14, -7, -3, 10, -2, 11, 16, -10, -25, 14, -6, 2, -25, 0, 18, 17, 11, 18, 4, -17, -36, -10, 20, 21, -39, -17, -18, 24, 12, 25, 34, -7, -50, 28, 2, 8, -15, -24, 34, 31, 3, -20, -16, -27, -61, 35, 30, 35, -64, -8, -5, -20, 23, 39, 50, -34, 6, 42, -44, 42, -75, -15, 52, -22, 23
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Comments

Obviously, convolving this sequence with A006368 gives its inverse A006369 from n >= 1 onward.

Crossrefs

Cf. A006368, A006369, A349351, A349376 (Dirichlet inverse), A349378 (sum with it).
Cf. also pairs A349613, A349614 and A349397, A349398 for similar constructions.

Programs

Formula

a(n) = Sum_{d|n} A006369(d) * A349351(n/d).
a(n) = A349378(n) - A349376(n).

A028397 Start at n and iterate the map in A006368; a(n) is the smallest number in the trajectory.

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 4, 4, 8, 4, 8, 8, 12, 8, 14, 8, 16, 8, 18, 14, 20, 16, 14, 8, 24, 14, 14, 20, 14, 14, 30, 8, 32, 14, 32, 14, 36, 14, 32, 14, 40, 8, 14, 32, 44, 32, 46, 14, 48, 14, 50, 32, 50, 40, 46, 8, 56, 32, 14, 44, 60, 46, 44, 14, 64, 14, 44, 50, 8, 50, 44, 40, 72, 8, 44, 56
Offset: 0

Views

Author

Keywords

Examples

			Sample iteration: 7->5->4->6->9->7 so a(7)=4.
Sample iteration: 12->18->27->20->30->45->34->51->... so a(12)=12.
		

Crossrefs

Programs

  • Mathematica
    Table[Min[NestList[If[EvenQ[#],(3#)/2,Floor[(3#+2)/4]]&,n,100]],{n,0,80}] (* Harvey P. Dale, May 02 2012 *)
  • PARI
    a(n)=local(m); if(n<=0,0,m=n; while((m!=n=(3*n+n%2)\(2+n%2*2))&n<10^99,m=min(m,n)); m)
  • Perl
    $|=1; for($n=1;; ++$n){ $m=$n; $d{$m}=$n, $m=f($m) while !$d{$m};
    
  • Perl
    if ($m<$n){ ($c,$m)=($d{$m},$n); $d{$m}=$c, $m=f($m) while $m >= $n }
    
  • Perl
    print"$d{$n}," } sub f { $[0]%2 ? int((3*$[0]+1)/4) : 3*$_[0]/2 }
    

Extensions

More terms from Hugo van der Sanden
Showing 1-10 of 43 results. Next