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.

User: Jimin Park

Jimin Park's wiki page.

Jimin Park has authored 5 sequences.

A378379 Minimal x such that there is a partition of (x, x) into sums of distinct pairs of nonnegative integers with size at least n, excluding (0, 0).

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 9, 10, 12, 14, 16, 18, 20, 23, 25, 28, 30, 33, 35, 38, 41, 44, 47, 50, 53, 56, 60, 63, 67, 70, 74, 77, 81, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 125, 129, 134, 138, 143, 147, 152, 156, 161, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220
Offset: 1

Author

Jimin Park, Nov 24 2024

Keywords

Comments

For (n, n), there is at least one maximal partition P that's symmetric: (x, y) in P <=> (y, x) in P. This can be proven by manipulating integer sequences c(i) (i >= 1) such that 0 <= c(i) <= i+1 for all i and Sum_{i > 0} i*c(i) = 2n, which correspond to partitions P of (n, n) with size |P| = Sum_{i > 0} c(i), where c(i) is equal to number of (x, y) in P such that x+y = i.

Examples

			For n = 8, a(n) = 9, as (9, 9) can be expressed as the sum (0, 1) + (0, 2) + (0, 3) + (1, 0) + (2, 0) + (3, 0) + (1, 2) + (2, 1), but the longest sum for (8, 8) has 7 pairs.
		

Crossrefs

Maximal size among partitions considered by A054242 and A201377.
Minimal x such that A378126(x, x) >= n.
Cf. A086435.

Programs

  • Python
    import math
    def A378379(n: int) -> int:
      l = (math.isqrt(1+8*n)-1)//2 # l = A003056(n), min. possible largest pair norm
      r = n - (l-1)*(l+2)//2 # r = n - A000096(l-1), number of pairs with norm l
      return ((l-1)*l*(l+1)//3 + l*r + 1)//2 # ceil((A007290(l+1) + l*r) / 2)

Formula

a(n*(n+3)/2) = n*(n+1)*(n+2)/6.

A378126 Array read by antidiagonals: T(n, m) is the maximal size of partitions of (n, m) into sums of distinct pairs of nonnegative integers, excluding (0, 0).

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 3, 3, 4, 4, 4, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 4, 5, 4, 4, 4, 3, 3, 4, 5, 5, 5, 5, 5, 5, 4, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 5, 5, 5, 4, 4, 5, 5, 6, 6, 6, 6
Offset: 0

Author

Jimin Park, Nov 17 2024

Keywords

Comments

A378379(n) is the least number x such that T(x, x) >= n, and as the growth rate of A378379(n) is Theta(n^(3/2)), the growth rate of T(n, m) is O((n+m)^(2/3)).

Examples

			Table begins:
  0 1 1 2 2 2 3 3 3 3 ...
  1 2 2 3 3 3 4 4 4 4 ...
  1 2 3 3 4 4 4 5 5 5 ...
  2 3 3 4 4 4 5 5 5 6 ...
  2 3 4 4 5 5 5 6 6 6 ...
  2 3 4 4 5 5 6 6 6 7 ...
  3 4 4 5 5 6 6 6 7 7 ...
  3 4 5 5 6 6 6 7 7 7 ...
  3 4 5 5 6 6 7 7 7 8 ...
  3 4 5 6 6 7 7 7 8 8 ...
  ...
T(9, 5) = 7, as (9, 5) can be expressed as the sum (0, 1) + (0, 2) + (1, 0) + (1, 1) + (2, 0) + (2, 1) + (3, 0), which is the longest for (9, 5).
		

Crossrefs

Maximal size among partitions considered by A054242 and A201377.
The first row is T(n, 0) = A003056(n).

Programs

  • Python
    import functools
    @functools.cache
    def A378126(n: int, m: int, t: tuple[int, int] = (0, 0)) -> int:
      if (n, m) <= t: return 0
      v = 1
      for nn in range(t[0], n//2+1):
        for nm in range(m+1):
          if (nn, nm) <= t: continue
          rn, rm = n-nn, m-nm
          if (rn, rm) <= (nn, nm): continue
          nv = 1 + A378126(rn, rm, (nn, nm))
          if nv > v: v = nv
      return v

Formula

T(n, m) = T(m, n).
T(n, m) >= T(n, 0) + T(0, m).
T(n, m) = A086435(p^n * q^m) for any distinct primes p and q.
T(n, 0) = A003056(n).
T(n, 1) = T(n, 0) + 1.
T(n, 2) = T(n-1, 0) + 2, for n >= 1.
T(n, m) = O((n+m)^(2/3)).

A193865 a(n) = (A187108(n+1)-A187108(n))/2.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 3, 3, 2, 1, 2, 1, 3, 3, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 3, 3, 2, 1, 2, 1, 3, 2, 1, 2, 1, 3, 3, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 2, 1, 3, 3
Offset: 1

Author

Jimin Park, Aug 07 2011

Keywords

Programs

  • AS3
    var a:Array=new Array();
    var i:int;
    var n:int=0;
    var ni:int;
    var b:Array = new Array();
    for (i=0; i<=1000; i++){
    while(a[n]!=undefined) n++;
    b.push(String(2*n+1));
    a[n]=1;
    ni=2*n+1;
    while(ni>=2*n+1&&ni>1){
    ni=3*ni+1;
    while(ni%2==0)ni/=2;
    a[(ni-1)/2]=1;
    }}
    for(i=0;i<1000;i++)b[i]=(b[i+1]-b[i])/2;b.pop();
    trace(b);

A187108 Odd numbers not in the trajectory of a smaller number under the Collatz (3x+1) iteration.

Original entry on oeis.org

1, 3, 7, 9, 15, 19, 21, 25, 27, 33, 37, 39, 43, 45, 51, 55, 57, 63, 69, 73, 75, 79, 81, 87, 93, 97, 99, 105, 109, 111, 115, 117, 123, 127, 129, 133, 135, 141, 145, 147, 151, 153, 159, 163, 165, 169, 171, 177, 181, 183, 187, 189, 195, 199, 201, 207, 213, 217
Offset: 1

Author

Jimin Park, Mar 05 2011

Keywords

Comments

These are the odd numbers in A061641, which gives a more detailed explanation. - T. D. Noe, Mar 05 2011

Crossrefs

Cf. A061641.

Programs

  • ActionScript
    // AS3
    var a:Array=new Array();
    var i:int;
    var n:int=0;
    var ni:int;
    var s:String='';
    for (i=0;i<50;i++){
    while(a[n]!=undefined) n++;
    s+=String(2*n+1)+',';
    a[n]=1;
    ni=2*n+1;
    while(ni>=2*n+1&&ni>1){
    ni=3*ni+1;
    while(ni%2==0)ni/=2;
    a[(ni-1)/2]=1;
    }
    }
    trace(s);

A166549 The number of halving steps of the Collatz 3x+1 map to reach 1 starting from 2n-1.

Original entry on oeis.org

0, 5, 4, 11, 13, 10, 7, 12, 9, 14, 6, 11, 16, 70, 13, 67, 18, 10, 15, 23, 69, 20, 12, 66, 17, 17, 9, 71, 22, 22, 14, 68, 19, 19, 11, 65, 73, 11, 16, 24, 16, 70, 8, 21, 21, 59, 13, 67, 75, 18, 18, 56, 26, 64, 72, 45, 10, 23, 15, 23, 61, 31, 69, 31, 77, 20, 20, 28, 58, 28, 12, 66, 74, 74, 17
Offset: 1

Author

Jimin Park, Oct 16 2009

Keywords

Comments

A given term k appears A131450(k) times. - Flávio V. Fernandes, Mar 13 2022

Crossrefs

Programs

  • Maple
    A006370 := proc(n) if type(n,'even') then n/2; else 3*n+1 ; end if; end proc:
    A006577 := proc(n) a := 0 ; x := n ; while x > 1 do x := A006370(x) ; a := a+1 ; end do; a ; end proc:
    A006667 := proc(n) a := 0 ; x := n ; while x > 1 do if type(x,'even') then x := x/2 ; else x := 3*x+1 ; a := a+1 ; end if; end do; a ; end proc:
    A075680 := proc(n) A006667(2*n-1) ; end proc:
    A166549 := proc(n) A006577(2*n-1)-A075680(n) ; end: seq(A166549(n),n=1..120) ; # R. J. Mathar, Oct 18 2009
    # second Maple program:
    b:= proc(n) option remember; `if`(n=1, 0,
          1+b(`if`(n::even, n/2, (3*n+1)/2)))
        end:
    a:= n-> b(2*n-1):
    seq(a(n), n=1..75);  # Alois P. Heinz, Mar 14 2022
  • Mathematica
    b[n_] := b[n] = If[n == 1, 0, 1 + b[If[EvenQ[n], n/2, (3n+1)/2]]];
    a[n_] := b[2n-1];
    Table[a[n], {n, 1, 75}] (* Jean-François Alcover, Apr 22 2022, after Alois P. Heinz *)

Formula

a(n) = A006577(2n-1) - A075680(n).

Extensions

Edited and extended by R. J. Mathar, Oct 18 2009