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.

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

A307328 Indices of prime Ulam numbers: numbers k such that A002858(k) is prime.

Original entry on oeis.org

2, 3, 7, 8, 15, 17, 25, 31, 41, 48, 69, 73, 91, 97, 106, 107, 123, 125, 138, 167, 172, 177, 181, 193, 194, 241, 242, 246, 267, 280, 286, 287, 297, 306, 312, 322, 323, 338, 340, 343, 353, 354, 382, 388, 393, 398, 403, 411, 412, 415, 416, 433, 444, 448, 460
Offset: 1

Views

Author

Amiram Eldar, Apr 02 2019

Keywords

Crossrefs

Programs

Formula

A002858(a(n)) = A068820(n).

A379162 Ulam numbers that are sphenics.

Original entry on oeis.org

102, 114, 138, 182, 238, 258, 273, 282, 370, 402, 429, 434, 483, 602, 627, 646, 861, 986, 1023, 1030, 1311, 1335, 1338, 1406, 1462, 1790, 1834, 1902, 1946, 2054, 2093, 2134, 2247, 2330, 2354, 2445, 2486, 2613, 2630, 2635, 2674, 2919, 2985, 3070, 3219, 3395
Offset: 1

Views

Author

Massimo Kofler, Dec 17 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

			102 is a term because 102=2*3*17 is the product of 3 distinct primes and 102 is an Ulam number.
114 is a term because 114=2*3*19 is the product of 3 distinct primes and 114 is an Ulam number.
273 is a term because 273=3*7*13 is the product of 3 distinct primes and 273 is an Ulam number.
		

Crossrefs

Intersection of A002858 and A007304.

Programs

  • Maple
    N:= 10^4: # for terms <= N
    U:= [1, 2]: V:= Vector(N): V[3]:= 1: R:= NULL:
    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];
           F:= ifactors(k)[2]:
           if F[.., 2] = [1, 1, 1] then R:= R, k; break fi
       od;
       if k > N then break fi;
    od:
    R; # Robert Israel, Jan 03 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, FactorInteger[#][[;; , 2]] == {1, 1, 1} &]]; seq[300] (* Amiram Eldar, Dec 17 2024, after Jean-François Alcover at A002858 *)

A307329 Indices of twin Ulam primes: numbers k such that both u(k) and u(k+1) are primes, where u(k) = A002858(k) are the Ulam numbers.

Original entry on oeis.org

2, 7, 106, 193, 241, 286, 322, 353, 411, 415, 753, 858, 859, 1086, 1164, 1305, 1547, 1548, 1625, 1631, 1648, 1678, 1896, 1972, 2007, 2103, 2406, 2503, 2515, 2516, 2530, 2553, 2638, 2714, 3003, 3059, 3060, 3337, 3903, 4012, 4072, 4299, 4386, 4404, 4625, 4698
Offset: 1

Views

Author

Amiram Eldar, Apr 02 2019

Keywords

Crossrefs

Programs

  • Mathematica
    ulams = {1, 2}; Do[AppendTo[ulams, n = Last[ulams]; While[n++; Length[ DeleteCases[Intersection[ulams, n - ulams], n/2, 1, 1]] != 2]; n], {1000}]; p=PrimeQ[ulams]; len=Length[p]; s={}; Do[If[p[[n]]&&p[[n+1]], AppendTo[s,n]], {n,1,len-1}]; s (* after Jean-François Alcover at A002858 *)

A379532 Ulam numbers that are products of exactly four distinct primes (or tetraprimes).

Original entry on oeis.org

390, 546, 690, 798, 1155, 1230, 1770, 2010, 2090, 2418, 2618, 2814, 3090, 3290, 3390, 3930, 4326, 4370, 4470, 4578, 4602, 4641, 6110, 6870, 7170, 7490, 7735, 7930, 8294, 9834, 10110, 10545, 10738, 11102, 11346, 11390, 11454, 11622, 11715, 11886, 12270, 12441, 12470, 12570
Offset: 1

Views

Author

Massimo Kofler, Dec 24 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

			390 is a term because 390=2*3*5*13 is the product of 4 distinct primes and 390 is an Ulam number.
546 is a term because 546=2*3*7*13 is the product of 4 distinct primes and 546 is an Ulam number.
1155 is a term because 1155=3*5*7*11 is the product of 4 distinct primes and 1155 is an Ulam number.
		

Crossrefs

Intersection of A002858 and A046386.

Programs

  • Maple
    N:= 20000: # 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];
           F:= ifactors(k)[2]:
           if F[..,2] = [1,1,1,1] then R:= R,k; count:= count+1;  fi;
           break
         fi
       od;
       if k > N then break fi;
    od:
    R; # Robert Israel, Dec 25 2024
  • 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, FactorInteger[#][[;; , 2]] == {1, 1, 1, 1} &]]; seq[1200] (* Amiram Eldar, Dec 24 2024, after Jean-François Alcover at A002858 *)

A307330 Indices of Ulam prime triples, where u(k), u(k+1) and u(k+2) are all primes, and u(k) = A002858(k) are the Ulam numbers.

Original entry on oeis.org

858, 1547, 2515, 3059, 9503, 9781, 11899, 11900, 13622, 15413, 18928, 22829, 25462, 32020, 33021, 33963, 36598, 37811, 37854, 40046, 44447, 49104, 55249, 56526, 60847, 61741, 80658, 84414, 86235, 87971, 92832, 96674, 97185, 100004, 102684, 108025, 108273
Offset: 1

Views

Author

Amiram Eldar, Apr 02 2019

Keywords

Crossrefs

Programs

  • Mathematica
    ulams = {1, 2}; Do[AppendTo[ulams, n = Last[ulams]; While[n++; Length[ DeleteCases[Intersection[ulams, n - ulams], n/2, 1, 1]] != 2]; n], {1000}]; p = PrimeQ[ulams]; len = Length[p]; s={}; Do[If[p[[n]]&&p[[n+1]]&&p[[n+2]], AppendTo[s,n]], {n,1,len-2}]; s (* after Jean-François Alcover at A002858 *)

A381189 Ulam numbers that are squarefree semiprimes.

Original entry on oeis.org

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, 1387, 1389
Offset: 1

Views

Author

Massimo Kofler, Feb 16 2025

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.
Number such as 4, 2809, 3481, 6889, etc., are in A378795 but not in this or in a longer sequence.

Examples

			4 is not a term of this sequence because 4=2^2 is the product of 2 not distinct primes even if 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.
2809 is not a term of a longer sequence because 2809=53^2 is the product of 2 not distinct primes even if 2809 is an Ulam number.
		

Crossrefs

Intersection of A006881 and A002858.

Programs

  • 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, FactorInteger[#][[;; , 2]] == {1, 1} &]]; seq[160] (* Amiram Eldar, Feb 16 2025, after Jean-François Alcover at A002858 *)
Showing 1-7 of 7 results.