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

A223083 Trajectory of 64 under the map n-> A006369(n).

Original entry on oeis.org

64, 85, 113, 151, 201, 134, 179, 239, 319, 425, 567, 378, 252, 168, 112, 149, 199, 265, 353, 471, 314, 419, 559, 745, 993, 662, 883, 1177, 1569, 1046, 1395, 930, 620, 827, 1103, 1471, 1961, 2615, 3487, 4649, 6199, 8265, 5510, 7347, 4898, 6531, 4354, 5805
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:=proc(N) if N mod 3 = 0 then 2*(N/3); elif N mod 3 = 2 then 4*((N+1)/3)-1; else 4*((N+2)/3)-3; fi; end;
    t1:=[64];
    for n from 1 to 100 do t1:=[op(t1),f(t1[nops(t1)])]; od:
    t1;
  • Mathematica
    t = {64}; While[n = t[[-1]]; s = Switch[Mod[n, 3], 0, 2*n/3, 1, (4*n - 1)/3, 2, (4*n + 1)/3]; Length[t] < 100 && ! MemberQ[t, s], AppendTo[t, s]]; t (* T. D. Noe, Mar 22 2013 *)
    SubstitutionSystem[{n_ :> Switch[Mod[n, 3], 0, 2n/3, 1, (4n - 1)/3, , (4n + 1)/3]}, {64}, 60] // Flatten (* _Jean-François Alcover, Mar 01 2019 *)

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 *)

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

A028398 When map in A006368 is iterated, all numbers fall into cycles; order cycles by smallest entry; a(n) is smallest entry in n-th cycle (some cycles are infinite).

Original entry on oeis.org

0, 1, 2, 4, 8, 14, 40, 44, 64, 80, 82, 104, 136, 172, 184, 188, 242, 256, 274, 280, 296, 352, 368, 382, 386, 424, 472, 496, 526, 530, 608, 622, 638, 640, 652, 670, 688, 692, 712, 716, 752, 760, 782, 784, 800, 814, 824, 832, 860, 878, 904, 910, 932, 964, 980, 1022
Offset: 0

Views

Author

Keywords

Comments

Iterations of A006368 starting with a(3)=4, a(4)=8, a(5)=14 and a(6)=40 give trajectories A180853, A028393, A028395, A182205 respectively. [Reinhard Zumkeller, Apr 18 2012]

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.

A368179 Square array read by ascending antidiagonals: row n is the trajectory of n under the A006368 map.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 3, 1, 0, 4, 2, 2, 1, 0, 5, 6, 3, 3, 1, 0, 6, 4, 9, 2, 2, 1, 0, 7, 9, 6, 7, 3, 3, 1, 0, 8, 5, 7, 9, 5, 2, 2, 1, 0, 9, 12, 4, 5, 7, 4, 3, 3, 1, 0, 10, 7, 18, 6, 4, 5, 6, 2, 2, 1, 0, 11, 15, 5, 27, 9, 6, 4, 9, 3, 3, 1, 0, 12, 8, 11, 4, 20, 7, 9, 6, 7, 2, 2, 1, 0
Offset: 0

Views

Author

Paolo Xausa, Dec 15 2023

Keywords

Examples

			Array begins:
  [ 0]   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, ... = A000004
  [ 1]   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ... = A000012
  [ 2]   2,  3,  2,  3,  2,  3,  2,  3,  2,  3,  2, ... = A010693
  [ 3]   3,  2,  3,  2,  3,  2,  3,  2,  3,  2,  3, ... = A176059
  [ 4]   4,  6,  9,  7,  5,  4,  6,  9,  7,  5,  4, ... = A180853
  [ 5]   5,  4,  6,  9,  7,  5,  4,  6,  9,  7,  5, ... = A180853 (shifted)
  [ 6]   6,  9,  7,  5,  4,  6,  9,  7,  5,  4,  6, ... = A180853 (shifted)
  [ 7]   7,  5,  4,  6,  9,  7,  5,  4,  6,  9,  7, ... = A180853 (shifted)
  [ 8]   8, 12, 18, 27, 20, 30, 45, 34, 51, 38, 57, ... = A028393
  [ 9]   9,  7,  5,  4,  6,  9,  7,  5,  4,  6,  9, ... = A180853 (shifted)
  [10]  10, 15, 11,  8, 12, 18, 27, 20, 30, 45, 34, ... = A180864 (shifted)
  ...    |   |   |
      A001477|A168221
             |
          A006368
		

Crossrefs

Programs

  • Mathematica
    A006368[n_]:=If[OddQ[n],Floor[(3n+2)/4],3n/2];
    A368179list[dmax_]:=With[{a=Reverse[Table[NestList[A006368,n-1,dmax-n],{n,dmax}]]},Array[Diagonal[a,#]&,dmax,1-dmax]];
    A368179list[15] (* Generates 15 antidiagonals *)

A223084 Trajectory of 80 under the map n-> A006369(n).

Original entry on oeis.org

80, 107, 143, 191, 255, 170, 227, 303, 202, 269, 359, 479, 639, 426, 284, 379, 505, 673, 897, 598, 797, 1063, 1417, 1889, 2519, 3359, 4479, 2986, 3981, 2654, 3539, 4719, 3146, 4195, 5593, 7457, 9943, 13257, 8838, 5892, 3928, 5237, 6983, 9311, 12415, 16553, 22071
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:=proc(N) if N mod 3 = 0 then 2*(N/3); elif N mod 3 = 2 then 4*((N+1)/3)-1; else 4*((N+2)/3)-3; fi; end;
    t1:=[80];
    for n from 1 to 100 do t1:=[op(t1),f(t1[nops(t1)])]; od:
    t1;
  • Mathematica
    t = {80}; While[n = t[[-1]]; s = Switch[Mod[n, 3], 0, 2*n/3, 1, (4*n - 1)/3, 2, (4*n + 1)/3]; Length[t] < 100 && ! MemberQ[t, s], AppendTo[t, s]]; t (* T. D. Noe, Mar 22 2013 *)
    SubstitutionSystem[{n_ :> Switch[Mod[n, 3], 0, 2n/3, 1, (4n - 1)/3, , (4n + 1)/3]}, {80}, 60] // Flatten (* _Jean-François Alcover, Mar 01 2019 *)

A223085 Trajectory of 82 under the map n-> A006369(n).

Original entry on oeis.org

82, 109, 145, 193, 257, 343, 457, 609, 406, 541, 721, 961, 1281, 854, 1139, 1519, 2025, 1350, 900, 600, 400, 533, 711, 474, 316, 421, 561, 374, 499, 665, 887, 1183, 1577, 2103, 1402, 1869, 1246, 1661, 2215, 2953, 3937, 5249, 6999, 4666, 6221, 8295, 5530, 7373
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:=proc(N) if N mod 3 = 0 then 2*(N/3); elif N mod 3 = 2 then 4*((N+1)/3)-1; else 4*((N+2)/3)-3; fi; end;
    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 = Switch[Mod[n, 3], 0, 2*n/3, 1, (4*n - 1)/3, 2, (4*n + 1)/3]; Length[t] < 100 && ! MemberQ[t, s], AppendTo[t, s]]; t (* T. D. Noe, Mar 22 2013 *)
    SubstitutionSystem[{n_ :> Switch[Mod[n, 3], 0, 2n/3, 1, (4n - 1)/3, , (4n + 1)/3]}, {82}, 60] // Flatten (* _Jean-François Alcover, Mar 01 2019 *)
    NestList[If[Divisible[#,3],(2#)/3,Floor[(4#)/3+1/2]]&,82,50] (* Harvey P. Dale, Sep 22 2019 *)

A223086 Trajectory of 64 under the map n-> A006368(n).

Original entry on oeis.org

64, 96, 144, 216, 324, 486, 729, 547, 410, 615, 461, 346, 519, 389, 292, 438, 657, 493, 370, 555, 416, 624, 936, 1404, 2106, 3159, 2369, 1777, 1333, 1000, 1500, 2250, 3375, 2531, 1898, 2847, 2135, 1601, 1201, 901, 676, 1014, 1521, 1141, 856, 1284, 1926, 2889
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:=[64];
    for n from 1 to 100 do t1:=[op(t1),f(t1[nops(t1)])]; od:
    t1;
  • Mathematica
    t = {64}; 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]]}, {64}, 100] // Flatten (* Jean-François Alcover, Mar 01 2019 *)

A223087 Trajectory of 80 under the map n-> A006368(n).

Original entry on oeis.org

80, 120, 180, 270, 405, 304, 456, 684, 1026, 1539, 1154, 1731, 1298, 1947, 1460, 2190, 3285, 2464, 3696, 5544, 8316, 12474, 18711, 14033, 10525, 7894, 11841, 8881, 6661, 4996, 7494, 11241, 8431, 6323, 4742, 7113, 5335, 4001, 3001, 2251, 1688, 2532, 3798, 5697
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:=[80];
    for n from 1 to 100 do t1:=[op(t1),f(t1[nops(t1)])]; od:
    t1;
  • Mathematica
    t = {80}; 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]]}, {80}, 100] // Flatten (* Jean-François Alcover, Mar 01 2019 *)
Previous Showing 11-19 of 19 results.