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

A049821 a(n) = j + k, where u(n) = u(j) + u(k) is the unique sum of Ulam numbers described in A002859 (with 1 <= j < k < n).

Original entry on oeis.org

3, 4, 5, 6, 8, 9, 12, 12, 14, 15, 15, 17, 18, 18, 20, 20, 22, 23, 23, 25, 25, 27, 28, 28, 35, 28, 29, 35, 33, 38, 35, 41, 37, 37, 39, 41, 46, 48, 43, 51, 45, 53, 48, 48, 50, 50, 58, 52, 60, 54, 56, 62, 56, 65, 59, 61, 61, 63, 70, 64, 66, 71, 66, 73, 69, 77, 71, 79, 73, 83, 74, 76, 78
Offset: 3

Views

Author

Keywords

Examples

			From _Petros Hadjicostas_, Nov 20 2019: (Start)
A002859(3) = 4 = 1 + 3 = A002859(1) + A002859(2), so a(3) = 1 + 2 = 3.
A002859(4) = 5 = 1 + 4 = A002859(1) + A002859(3), so a(4) = 1 + 3 = 4.
A002859(5) = 6 = 1 + 5 = A002859(1) + A002859(4), so a(5) = 1 + 4 = 5.
A002859(6) = 8 = 3 + 5 = A002859(2) + A002859(4), so a(6) = 2 + 4 = 6.
A002859(7) = 10 = 4 + 6 = A002859(3) + A002859(5), so a(7) = 3 + 5 = 8.
(End)
		

Crossrefs

Programs

  • Maple
    # First we modify Peter Luschny's program from A002858 (with len >= 3):
    UlamList := proc(len) local isUlam, nextUlam, behead; behead := u -> u[2 .. numelems(u)]; isUlam := proc(n, h, u, r) local hu, tu, hr, tr; hu := u[1]; hr := r[1]; if h = 2 then return false; end if; if hr <= hu then return evalb(h = 1); end if; if hr + hu = n then tu := behead(u); tr := behead(r); return isUlam(n, h + 1, tu, tr); end if; if hr + hu < n then tu := behead(u); return isUlam(n, h, tu, r); end if; tr := behead(r); isUlam(n, h, u, tr); end proc; nextUlam := proc(n, u, r) if isUlam(n, 0, u, r) then if nops(u) = len - 1 then return [op(u), n]; end if; nextUlam(n + 1, [op(u), n], [n, op(r)]); else nextUlam(n + 1, u, r); end if; end proc; nextUlam(3, [1, 3], [3, 1]); end proc:
    # Next we create a function to calculate a(n) for given n >= 3:
    a := proc(n) local u, a, i, j: u := 0: if 3 <= n then a := UlamList(n): for i to n - 2 do for j from i + 1 to n - 1 do if a[n] = a[i] + a[j] then u := i+j: end if: end do: end do: end if: u: end proc:
    # Finally, we create a list of values for a(n):
    seq(a(n), n=3..100); # Petros Hadjicostas, Nov 20 2019

Extensions

Name edited by and typo in the data corrected by Petros Hadjicostas, Nov 20 2019
More terms from Petros Hadjicostas, Nov 20 2019

A049877 a(n) = max(j,k), where u(n) = u(j) + u(k) is the unique sum of Ulam numbers described in A002859 (with 1 <= j < k < n).

Original entry on oeis.org

2, 3, 4, 4, 5, 6, 8, 9, 9, 11, 12, 12, 14, 15, 16, 17, 17, 19, 20, 21, 22, 22, 24, 25, 20, 27, 27, 27, 30, 27, 32, 27, 34, 35, 36, 36, 27, 27, 40, 27, 42, 36, 44, 45, 46, 47, 31, 49, 33, 51, 52, 35, 53, 38, 56, 57, 58, 58, 43, 61, 62, 44, 63, 46, 66, 50, 68, 52, 70, 47, 72, 73, 73, 60
Offset: 3

Views

Author

Keywords

Examples

			From _Petros Hadjicostas_, Nov 20 2019: (Start)
A002859(3) = 4 = 1 + 3 = A002859(1) + A002859(2), so a(3) = max(1,2) = 2.
A002859(4) = 5 = 1 + 4 = A002859(1) + A002859(3), so a(4) = max(1,3) = 3.
A002859(5) = 6 = 1 + 5 = A002859(1) + A002859(4), so a(5) = max(1,4) = 4.
A002859(6) = 8 = 3 + 5 = A002859(2) + A002859(4), so a(6) = max(2,4) = 4.
A002859(7) = 10 = 4 + 6 = A002859(3) + A002859(5), so a(7) = max(3,5) = 5.
(End)
		

Crossrefs

Programs

  • Maple
    # First we modify Peter Luschny's program from A002858 (with len >= 3):
    UlamList := proc(len) local isUlam, nextUlam, behead; behead := u -> u[2 .. numelems(u)]; isUlam := proc(n, h, u, r) local hu, tu, hr, tr; hu := u[1]; hr := r[1]; if h = 2 then return false; end if; if hr <= hu then return evalb(h = 1); end if; if hr + hu = n then tu := behead(u); tr := behead(r); return isUlam(n, h + 1, tu, tr); end if; if hr + hu < n then tu := behead(u); return isUlam(n, h, tu, r); end if; tr := behead(r); isUlam(n, h, u, tr); end proc; nextUlam := proc(n, u, r) if isUlam(n, 0, u, r) then if nops(u) = len - 1 then return [op(u), n]; end if; nextUlam(n + 1, [op(u), n], [n, op(r)]); else nextUlam(n + 1, u, r); end if; end proc; nextUlam(3, [1, 3], [3, 1]); end proc:
    # Next we create a function to calculate a(n) for given n >= 3:
    a := proc(n) local u, a, i, j: u := 0: if 3 <= n then a := UlamList(n): for i to n - 2 do for j from i + 1 to n - 1 do if a[n] = a[i] + a[j] then u := max(i, j): end if: end do: end do: end if: u: end proc:
    # Finally, we create a list of values for a(n):
    seq(a(n), n=3..100); # Petros Hadjicostas, Nov 20 2019

Extensions

Name edited by and more terms from Petros Hadjicostas, Nov 20 2019

A049879 a(n) = |j - k|, where u(n) = u(j) + u(k) is the unique sum of Ulam numbers described in A002859 (with 1 <= j < k < n).

Original entry on oeis.org

1, 2, 3, 2, 2, 3, 4, 6, 4, 7, 9, 7, 10, 12, 12, 14, 12, 15, 17, 17, 19, 17, 20, 22, 5, 26, 25, 19, 27, 16, 29, 13, 31, 33, 33, 31, 8, 6, 37, 3, 39, 19, 40, 42, 42, 44, 4, 46, 6, 48, 48, 8, 50, 11, 53, 53, 55, 53, 16, 58, 58, 17, 60, 19, 63, 23, 65, 25, 67, 11, 70, 70, 68, 33, 58, 35, 74
Offset: 3

Views

Author

Keywords

Examples

			From _Petros Hadjicostas_, Nov 20 2019: (Start)
A002859(3) = 4 = 1 + 3 = A002859(1) + A002859(2), so a(3) = |1-2| = 1.
A002859(4) = 5 = 1 + 4 = A002859(1) + A002859(3), so a(4) = |1-3| = 2.
A002859(5) = 6 = 1 + 5 = A002859(1) + A002859(4), so a(5) = |1-4| = 3.
A002859(6) = 8 = 3 + 5 = A002859(2) + A002859(4), so a(6) = |2-4| = 2.
A002859(7) = 10 = 4 + 6 = A002859(3) + A002859(5), so a(7) = |3-5| = 2.
(End)
		

Crossrefs

Programs

  • Maple
    # First we modify Peter Luschny's program from A002858 (with len >= 3):
    UlamList := proc(len) local isUlam, nextUlam, behead; behead := u -> u[2 .. numelems(u)]; isUlam := proc(n, h, u, r) local hu, tu, hr, tr; hu := u[1]; hr := r[1]; if h = 2 then return false; end if; if hr <= hu then return evalb(h = 1); end if; if hr + hu = n then tu := behead(u); tr := behead(r); return isUlam(n, h + 1, tu, tr); end if; if hr + hu < n then tu := behead(u); return isUlam(n, h, tu, r); end if; tr := behead(r); isUlam(n, h, u, tr); end proc; nextUlam := proc(n, u, r) if isUlam(n, 0, u, r) then if nops(u) = len - 1 then return [op(u), n]; end if; nextUlam(n + 1, [op(u), n], [n, op(r)]); else nextUlam(n + 1, u, r); end if; end proc; nextUlam(3, [1, 3], [3, 1]); end proc:
    # Next we create a function to calculate a(n) for given n >= 3:
    a := proc(n) local u, a, i, j: u := 0: if 3 <= n then a := UlamList(n): for i to n - 2 do for j from i + 1 to n - 1 do if a[n] = a[i] + a[j] then u := abs(i-j): end if: end do: end do: end if: u: end proc:
    # Finally, we create a list of values for a(n):
    seq(a(n), n=3..100); # Petros Hadjicostas, Nov 20 2019

Extensions

Name edited by and more terms from Petros Hadjicostas, Nov 20 2019
Showing 1-3 of 3 results.