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

A375910 Row sums of A350279.

Original entry on oeis.org

1, 4, 9, 48, 13, 41, 61, 24, 30, 72, 69, 151, 86, 40, 53, 538, 74, 128, 109, 100, 110, 182, 69, 507, 135, 81, 93, 395, 129, 217, 599, 132, 139, 249, 220, 460, 182, 161, 177, 850, 121, 340, 267, 140, 158, 448, 631, 1625, 232, 173, 182, 708, 233, 389, 504, 220, 242, 428
Offset: 1

Views

Author

Paolo Xausa, Sep 02 2024

Keywords

Comments

1

Crossrefs

Programs

  • Mathematica
    FarkasStep[x_] := Which[Divisible[x, 3], x/3, Mod[x, 4] == 3, (3*x + 1)/2, True, (x + 1)/2];
    Array[Total[FixedPointList[FarkasStep, 2*# - 1]] - 1 &, 100]

Formula

a(n) = Sum_{k = 1..A375909(n) + 1} A350279(n,k).

A349407 The Farkas map: a(n) = x/3 if x mod 3 = 0; a(n) = (3x+1)/2 if x mod 3 <> 0 and x mod 4 = 3; a(n) = (x+1)/2 if x mod 3 <> 0 and x mod 4 = 1, where x = 2*n-1.

Original entry on oeis.org

1, 1, 3, 11, 3, 17, 7, 5, 9, 29, 7, 35, 13, 9, 15, 47, 11, 53, 19, 13, 21, 65, 15, 71, 25, 17, 27, 83, 19, 89, 31, 21, 33, 101, 23, 107, 37, 25, 39, 119, 27, 125, 43, 29, 45, 137, 31, 143, 49, 33, 51, 155, 35, 161, 55, 37, 57, 173, 39, 179, 61, 41, 63, 191, 43
Offset: 1

Views

Author

Paolo Xausa, Nov 16 2021

Keywords

Comments

The map takes a positive odd integer x (= 2*n-1) and produces the positive odd integer a(n).
Farkas proves that the trajectory of the iterates of the map starting from any positive odd integer always reaches 1.
If displayed as a rectangular array with six columns, the columns include A016921, A016813, A016945, A004767, A239129 (see example). - Omar E. Pol, Jan 01 2022

Examples

			From _Omar E. Pol_, Jan 01 2022: (Start)
Written as a rectangular array with six columns read by rows the sequence begins:
   1,  1,  3,  11,  3,  17;
   7,  5,  9,  29,  7,  35;
  13,  9, 15,  47, 11,  53;
  19, 13, 21,  65, 15,  71;
  25, 17, 27,  83, 19,  89;
  31, 21, 33, 101, 23, 107;
  37, 25, 39, 119, 27, 125;
  43, 29, 45, 137, 31, 143;
  49, 33, 51, 155, 35, 161;
  55, 37, 57, 173, 39, 179;
...
(End)
		

References

  • H. M. Farkas, "Variants of the 3N+1 Conjecture and Multiplicative Semigroups", in Entov, Pinchover and Sageev, "Geometry, Spectral Theory, Groups, and Dynamics", Contemporary Mathematics, vol. 387, American Mathematical Society, 2005, p. 121.
  • J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, American Mathematical Society, 2010, p. 74.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,0,0,0,0,2,0,0,0,0,0,-1},{1,1,3,11,3,17,7,5,9,29,7,35},100]
    Table[Which[Mod[n,3]==0,n/3,Mod[n,4]==3,(3n+1)/2,True,(n+1)/2],{n,1,200,2}] (* Harvey P. Dale, May 15 2022 *)
  • PARI
    a(n)=if (n%3==2, 2*n\3, if (n%2, n, 3*n-1)) \\ Charles R Greathouse IV, Nov 16 2021
    
  • Python
    def a(n):
        x = 2*n - 1
        return x//3 if x%3 == 0 else ((3*x+1)//2 if x%4 == 3 else (x+1)//2)
    print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Nov 16 2021

A375266 Irregular triangle read by rows in which row n lists the iterates of the A375265 map from n to 1.

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 2, 1, 5, 16, 8, 4, 2, 1, 6, 2, 1, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 8, 4, 2, 1, 9, 3, 1, 10, 5, 16, 8, 4, 2, 1, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 12, 4, 2, 1, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1
Offset: 1

Views

Author

Paolo Xausa, Aug 08 2024

Keywords

Comments

By definition the trajectory ends when 1 is reached, so row 1 does not contain the cycle 1 -> 4 -> 2 -> 1.
See A375265 for links.

Examples

			Triangle begins:
   1;
   2,  1;
   3,  1;
   4,  2,  1;
   5, 16,  8,  4,  2,  1;
   6,  2,  1;
   7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10,  5, 16,  8,  4,  2,  1;
   8,  4,  2,  1;
   9,  3,  1;
  10,  5, 16,  8,  4,  2,  1;
  ...
		

Crossrefs

Cf. A375265, A375267 (# of iterations), A375268 (row sums), A375280 (row maxs).

Programs

  • Mathematica
    A375265[n_] := Which[Divisible[n, 3], n/3, Divisible[n, 2], n/2, True, 3*n + 1];
    Array[NestWhileList[A375265, #, # > 1 &] &, 15]

A375909 Number of iterations of the Farkas map (A349407) to reach 1 starting from 2*n - 1.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Sep 02 2024

Keywords

Examples

			a(10) = 5 because the trajectory 19 -> 29 -> 15 -> 5 -> 3 -> 1 takes 5 steps.
		

Crossrefs

(Row lengths of A350279) - 1.

Programs

  • Mathematica
    FarkasStep[x_] := Which[Divisible[x, 3], x/3, Mod[x, 4] == 3, (3*x + 1)/2, True, (x + 1)/2];
    Array[Length[FixedPointList[FarkasStep, 2*# - 1]] - 2 &, 100]

A375911 Largest value in the trajectory of 2*n - 1 in the Farkas map (A349407).

Original entry on oeis.org

1, 3, 5, 17, 9, 17, 17, 15, 17, 29, 21, 53, 25, 27, 29, 161, 33, 53, 37, 39, 41, 65, 45, 161, 49, 51, 53, 125, 57, 89, 161, 63, 65, 101, 69, 161, 73, 75, 77, 269, 81, 125, 85, 87, 89, 137, 161, 485, 97, 99, 101, 233, 105, 161, 125, 111, 113, 173, 117, 269, 161
Offset: 1

Views

Author

Paolo Xausa, Sep 02 2024

Keywords

Examples

			a(10) = 29 because 29 is the largest value in the trajectory 19 -> 29 -> 15 -> 5 -> 3 -> 1.
		

Crossrefs

Programs

  • Mathematica
    FarkasStep[x_] := Which[Divisible[x, 3], x/3, Mod[x, 4] == 3, (3*x + 1)/2, True, (x + 1)/2];
    Array[Max[FixedPointList[FarkasStep, 2*# - 1]] &, 100]

Formula

a(n) = max{A350279(n,k) for 1 <= k <= A375909(n) + 1}.

A350515 a(n) = (n-1)/3 if n mod 3 = 1; a(n) = n/2 if n mod 6 = 0 or n mod 6 = 2; a(n) = (3n+1)/2 if n mod 6 = 3 or n mod 6 = 5.

Original entry on oeis.org

0, 0, 1, 5, 1, 8, 3, 2, 4, 14, 3, 17, 6, 4, 7, 23, 5, 26, 9, 6, 10, 32, 7, 35, 12, 8, 13, 41, 9, 44, 15, 10, 16, 50, 11, 53, 18, 12, 19, 59, 13, 62, 21, 14, 22, 68, 15, 71, 24, 16, 25, 77, 17, 80, 27, 18, 28, 86, 19, 89, 30, 20, 31, 95, 21, 98, 33, 22, 34, 104
Offset: 0

Views

Author

Paolo Xausa, Jan 02 2022

Keywords

Comments

This is a variant of the Farkas map (A349407).
Yolcu, Aaronson and Heule prove that the trajectory of the iterates of the map starting from any nonnegative integer always reaches 0.
If displayed as a rectangular array with six columns, the columns are A008585, A005843, A016777, A017221, A005408, A017257 (see example). - Omar E. Pol, Jan 02 2022

Examples

			From _Omar E. Pol_, Jan 02 2022: (Start)
Written as a rectangular array with six columns read by rows the sequence begins:
   0,  0,  1,  5,  1,  8;
   3,  2,  4, 14,  3, 17;
   6,  4,  7, 23,  5, 26;
   9,  6, 10, 32,  7, 35;
  12,  8, 13, 41,  9, 44;
  15, 10, 16, 50, 11, 53;
  18, 12, 19, 59, 13, 62;
  21, 14, 22, 68, 15, 71;
  24, 16, 25, 77, 17, 80;
  27, 18, 28, 86, 19, 89;
  30, 20, 31, 95, 21, 98;
...
(End)
		

Crossrefs

Programs

  • Mathematica
    nterms=100;Table[If[Mod[n,3]==1,(n-1)/3,If[Mod[n,6]==0||Mod[n,6]==2,n/2,(3n+1)/2]],{n,0,nterms-1}]
    (* Second program *)
    nterms=100;LinearRecurrence[{0,0,0,0,0,2,0,0,0,0,0,-1},{0,0,1,5,1,8,3,2,4,14,3,17},nterms]
  • Python
    def a(n):
        r = n%6
        if r == 1 or r == 4: return (n-1)//3
        if r == 0 or r == 2: return n//2
        if r == 3 or r == 5: return (3*n+1)//2
    print([a(n) for n in range(70)]) # Michael S. Branicky, Jan 02 2022

Formula

a(n) = (A349407(n+1)-1)/2.
a(n) = 2*a(n-6)-a(n-12). - Wesley Ivan Hurt, Jan 03 2022

A350548 Irregular triangle T(n,k) read by rows in which row n lists the iterates of the A350515 map from n to 0.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 5, 8, 4, 1, 0, 4, 1, 0, 5, 8, 4, 1, 0, 6, 3, 5, 8, 4, 1, 0, 7, 2, 1, 0, 8, 4, 1, 0, 9, 14, 7, 2, 1, 0, 10, 3, 5, 8, 4, 1, 0, 11, 17, 26, 13, 4, 1, 0, 12, 6, 3, 5, 8, 4, 1, 0, 13, 4, 1, 0, 14, 7, 2, 1, 0, 15, 23, 35, 53, 80, 40, 13, 4, 1, 0
Offset: 0

Views

Author

Paolo Xausa, Jan 04 2022

Keywords

Examples

			Written as an irregular triangle, the sequence begins:
  n\k   0   1   2   3   4   5   6
  -------------------------------
   0:   0
   1:   1   0
   2:   2   1   0
   3:   3   5   8   4   1   0
   4:   4   1   0
   5:   5   8   4   1   0
   6:   6   3   5   8   4   1   0
   7:   7   2   1   0
   8:   8   4   1   0
   9:   9  14   7   2   1   0
  10:  10   3   5   8   4   1   0
  11:  11  17  26  13   4   1   0
  ...
		

Crossrefs

Programs

  • Mathematica
    A350515[n_]:=If[Mod[n,3]==1,(n-1)/3,If[Mod[n,6]==0||Mod[n,6]==2,n/2,(3n+1)/2]];
    nrows=20;Table[NestWhileList[A350515,n,#>0&],{n,0, nrows-1}]

Formula

T(n,0) = n; T(n,k) = A350515(T(n,k-1)), where n >= 0 and k >= 1.
T(n,k) = (A350279(n+1,k+1)-1)/2, where n >= 0 and k >= 0.
Showing 1-7 of 7 results.