login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A049878
a(n) = min(j,k), where u(n) = u(j) + u(k) is the unique sum of Ulam numbers described in A002859 (with 1 <= j < k < n).
3
1, 1, 1, 2, 3, 3, 4, 3, 5, 4, 3, 5, 4, 3, 4, 3, 5, 4, 3, 4, 3, 5, 4, 3, 15, 1, 2, 8, 3, 11, 3, 14, 3, 2, 3, 5, 19, 21, 3, 24, 3, 17, 4, 3, 4, 3, 27, 3, 27, 3, 4, 27, 3, 27, 3, 4, 3, 5, 27, 3, 4, 27, 3, 27, 3, 27, 3, 27, 3, 36, 2, 3, 5, 27, 14, 27, 3, 27, 3, 27, 3, 4, 3, 27, 3, 4, 27, 3
OFFSET
3,4
LINKS
Eric Weisstein's World of Mathematics, Ulam Sequence.
Wikipedia, Ulam number.
EXAMPLE
From Petros Hadjicostas, Nov 20 2019: (Start)
A002859(3) = 4 = 1 + 3 = A002859(1) + A002859(2), so a(3) = min(1,2) = 1.
A002859(4) = 5 = 1 + 4 = A002859(1) + A002859(3), so a(4) = min(1,3) = 1.
A002859(5) = 6 = 1 + 5 = A002859(1) + A002859(4), so a(5) = min(1,4) = 1.
A002859(6) = 8 = 3 + 5 = A002859(2) + A002859(4), so a(6) = min(2,4) = 2.
A002859(7) = 10 = 4 + 6 = A002859(3) + A002859(5), so a(7) = min(3,5) = 3.
(End)
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 := min(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
CROSSREFS
KEYWORD
nonn
EXTENSIONS
Name edited and typo in the data corrected by Petros Hadjicostas, Nov 20 2019
More terms from Petros Hadjicostas, Nov 20 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 21:38 EDT 2024. Contains 376078 sequences. (Running on oeis4.)