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 51-60 of 116 results. Next

A214603 Location of the first gap of exactly n in Ulam numbers, or zero if none is known. The zero terms are conjectural.

Original entry on oeis.org

1, 4, 8, 53, 48, 0, 62, 18, 38, 87, 0, 114, 260, 0, 221, 0, 568, 0, 627, 155, 0, 646, 0, 1724, 695, 0, 282, 0, 1433, 751, 0, 36460, 0, 949, 483379914, 0, 8018, 0, 1257, 0, 1553, 1858, 0, 4057, 0, 9262, 3825, 0, 10606, 0, 115835, 3153, 0, 0, 0, 6982
Offset: 1

Views

Author

Jud McCranie, Jul 22 2012

Keywords

Comments

Some terms are not believed to exist. However, the first gap of 35 occurs at 483379914 and the first gap of 88 occurs at 1127544124. - Jud McCranie, Jul 31 2012

Examples

			The first gap of 5 in Ulam numbers occurs after 48, so a(5) = 48.
		

Crossrefs

A307331 The number of Ulam numbers below 10^n.

Original entry on oeis.org

6, 26, 125, 827, 7584, 74083, 740368, 7399353, 73976842, 739778038, 7397814233, 73979274540
Offset: 1

Views

Author

Amiram Eldar, Apr 02 2019

Keywords

Comments

The terms a(1)-a(12) are from the paper by Gibbs and McCranie.
The number of Ulam numbers not exceeding 10^n can be calculated from this sequence using the fact that up to 10^12 the only powers of 10 that are Ulam numbers are 10^6 and 10^11.
The asymptotic density D of Ulam numbers is known to be 0 <= D <= 0.4. Gibbs and McCranie estimated it from this sequence as ~ 0.073979.

Crossrefs

Cf. A002858.

A378795 Ulam numbers that are semiprimes.

Original entry on oeis.org

4, 6, 26, 38, 57, 62, 69, 77, 82, 87, 106, 145, 155, 177, 206, 209, 219, 221, 253, 309, 319, 339, 341, 358, 382, 451, 485, 497, 502, 566, 685, 695, 734, 781, 849, 866, 893, 905, 949, 1018, 1037, 1079, 1081, 1101, 1157, 1167, 1169, 1186, 1191, 1257, 1313, 1355
Offset: 1

Views

Author

Massimo Kofler, Dec 07 2024

Keywords

Comments

Ulam numbers: a(1) = 1; a(2) = 2; for n>2, a(n) = least number > a(n-1) which is a unique sum of two distinct earlier terms.

Examples

			4 is a term because 4=2*2 is the product of 2 (not distinct) primes and 4 is an Ulam number.
6 is a term because 6=2*3 is the product of 2 distinct primes and 6 is an Ulam number.
57 is a term because 57=3*19 is the product of 2 distinct primes and 57 is an Ulam number.
		

Crossrefs

Intersection of A001358 and A002858.
Cf. A068820.

Programs

  • Maple
    N:= 5000: # for terms <= N
    U:= [1, 2]: V:= Vector(N): V[3]:= 1: R:= NULL: count:= 0:
    for i from 3 do
       for k from U[-1]+1 to N do
         if V[k] = 1 then
           J:= select(`<=`, U +~ k, N);
           V[J]:= V[J] +~ 1;
           U:= [op(U), k];
           if numtheory:-bigomega(k) = 2 then R:= R, k; count:= count+1;  fi;
           break
         fi
       od;
       if k > N then break fi;
    od:
    R; # Robert Israel, Jan 24 2025
  • Mathematica
    seq[numUlams_] := Module[{ulams = {1, 2}}, Do[AppendTo[ulams, n = Last[ulams]; While[n++; Length[DeleteCases[Intersection[ulams, n - ulams], n/2, 1, 1]] != 2]; n], {numUlams}]; Select[ulams, PrimeOmega[#] == 2 &]]; seq[200] (* Amiram Eldar, Dec 07 2024, after Jean-François Alcover at A002858 *)

A006844 a(1)=4, a(2)=5; thereafter a(n) is smallest number that is greater than a(n-1) and having a unique representation as a(j) + a(k) for j

Original entry on oeis.org

4, 5, 9, 13, 14, 17, 19, 21, 24, 25, 27, 35, 37, 43, 45, 47, 57, 67, 69, 73, 77, 83, 93, 101, 105, 109, 113, 115, 123, 125, 133, 149, 153, 163, 173, 197, 201, 205, 209, 211, 213, 217, 219, 227, 229, 235, 237, 239
Offset: 1

Views

Author

Keywords

Comments

This is the 1-additive sequence with base {4,5}. Apart from three extra terms (4, 14, 24) in the initial segment, this breaks up naturally into segments of 32 terms each. [Finch, 1992]. - N. J. A. Sloane, Aug 12 2015
An Ulam-type sequence - see A002858 for many further references, comments, etc. - T. D. Noe, Jan 21 2008

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 145-151.
  • R. K. Guy, "s-Additive sequences," preprint, 1994.
  • R. K. Guy, Unsolved Problems in Number Theory, Section C4.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • Haskell
    a006844 n = a006844_list !! (n-1)
    a006844_list = 4 : 5 : ulam 2 5 a006844_list
    -- Function ulam as defined in A002858.
    -- Reinhard Zumkeller, Nov 03 2011
  • Mathematica
    s = {4, 5}; n0 = 9; dn = 32; m = 192; Do[ AppendTo[s, n = Last[s]; While[n++; Length[ DeleteCases[ Intersection[s, n - s], n/2, 1, 1]] != 2]; n], {n0 + dn}]; Clear[a]; a[n_] := a[n] = If[n <= n0 + dn, s[[n]], a[n - dn] + m]; Table[a[n], {n, 1, 200}] (* Jean-François Alcover, Apr 03 2013 *)

Formula

For n>9, a(n+32) = a(n) + 192. - T. D. Noe, Jan 21 2008

A048951 (2,4) Ulam sequence.

Original entry on oeis.org

2, 4, 6, 8, 12, 16, 22, 26, 32, 36, 52, 56, 72, 76, 94, 96, 106, 114, 124, 138, 144, 154, 164, 174, 194, 198, 204, 212, 228, 252, 262, 276, 290, 296, 310, 350, 354, 360, 364, 378, 394, 412, 418, 438, 442, 472, 476, 482, 486, 506, 516, 520, 546, 564, 618, 632
Offset: 1

Views

Author

Keywords

Comments

This sequence is 2*A002858, since in general U(k*m, k*n) = k * U(m, n), where U(m, n) is the (m, n)-Ulam sequence. - Enrique Navarrete, May 05 2017

Crossrefs

Cf. A002858.

Programs

  • Haskell
    a048951 n = a048951_list !! (n-1)
    a048951_list = 2 : 4 : ulam 2 4 a048951_list
    -- Function ulam as defined in A002858.
    -- Reinhard Zumkeller, Nov 03 2011

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

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

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			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)
		

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 := 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

Extensions

Name edited and typo in the data corrected by Petros Hadjicostas, Nov 20 2019
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

A081026 Variation on Ulam numbers: a(1) = 1; a(2) = 2; for n>2, a(n) = smallest (n odd) or largest (n even) number > a(n-1) that is a unique sum of two distinct earlier terms.

Original entry on oeis.org

1, 2, 3, 5, 6, 11, 12, 23, 24, 47, 48, 95, 96, 191, 192, 383, 384, 767, 768, 1535, 1536, 3071, 3072, 6143, 6144, 12287, 12288, 24575, 24576, 49151, 49152, 98303, 98304, 196607, 196608, 393215, 393216, 786431, 786432, 1572863, 1572864, 3145727
Offset: 1

Views

Author

David W. Wilson, Mar 02 2003

Keywords

References

  • Dan Asimov, post to math-fun mailing list, Feb 11, 2003.

Crossrefs

Formula

Appears that a(2k) = 3*2^(k-1)-1, a(2k+1) = 3*2^(k-1) for k >= 1.
Previous Showing 51-60 of 116 results. Next