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

A102440 Replace each prime factor of n that is greater than 3 with the greatest semiprime less than it.

Original entry on oeis.org

1, 2, 3, 4, 4, 6, 6, 8, 9, 8, 10, 12, 10, 12, 12, 16, 15, 18, 15, 16, 18, 20, 22, 24, 16, 20, 27, 24, 26, 24, 26, 32, 30, 30, 24, 36, 35, 30, 30, 32, 39, 36, 39, 40, 36, 44, 46, 48, 36, 32, 45, 40, 51, 54, 40, 48, 45, 52, 58, 48, 58, 52, 54, 64, 40, 60, 65, 60, 66, 48, 69, 72, 69
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 09 2005

Keywords

Examples

			a(99) = a(3*3*11) -> 3*3*[11->2*5] = 3*3*2*5 = 90.
		

Crossrefs

Programs

  • Mathematica
    g[p_] := (* greatest semiprime less than prime p *) g[p] = For[k = p - 1, True, k--, If[PrimeOmega[k] == 2, Return[k]]];
    a[n_] := Product[{p, e} = pe; If[p <= 3, p, g[p]]^e, {pe, FactorInteger[n]}];
    a /@ Range[1, 100] (* Jean-François Alcover, Sep 27 2019 *)

Formula

Multiplicative with prime(i) -> (if i<=2 then prime(i) else A102415(i)).
a(n) <= n and a(n) = n iff n is 3-smooth, see A003586.
A102441(n) = a(a(n)), see A102442, A102443 for iterations.

A102414 Smallest semiprime greater than n-th prime.

Original entry on oeis.org

4, 4, 6, 9, 14, 14, 21, 21, 25, 33, 33, 38, 46, 46, 49, 55, 62, 62, 69, 74, 74, 82, 85, 91, 106, 106, 106, 111, 111, 115, 129, 133, 141, 141, 155, 155, 158, 166, 169, 177, 183, 183, 194, 194, 201, 201, 213, 226, 235, 235, 235, 247, 247, 253, 259, 265, 274, 274
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 08 2005

Keywords

Comments

A102415(n) < A000040(n) < a(n).

Crossrefs

Cf. A001358.

Programs

  • Mathematica
    ssp[n_]:=Module[{k=n+1},While[PrimeOmega[k]!=2,k++];k]; ssp/@Prime[Range[ 60]] (* Harvey P. Dale, Aug 18 2012 *)
  • PARI
    a(n) = {sp = prime(n)+1; while(bigomega(sp) != 2, sp++); sp;} \\ Michel Marcus, Mar 04 2017

A283267 Smallest b-a such that a < prime(n) < b, where a,b are semiprimes.

Original entry on oeis.org

2, 3, 4, 4, 6, 6, 3, 7, 7, 3, 7, 7, 3, 4, 4, 4, 4, 5, 5, 5, 3, 4, 11, 11, 11, 5, 5, 4, 6, 4, 7, 7, 9, 9, 3, 5, 3, 8, 5, 5, 7, 7, 7, 7, 4, 5, 9, 9, 9, 10, 10, 4, 5, 3, 7, 7, 4, 9, 9, 4, 4, 5, 5, 5, 5, 4, 9, 9, 9, 3, 6, 6, 4, 4, 5, 3, 5, 4, 5, 5, 10, 10, 8, 8, 4
Offset: 3

Views

Author

Vladimir Shevelev, Mar 04 2017

Keywords

Comments

This is the first sequence from the series of sequences: "Smallest b-a such that a < prime(n)^k < b, where a,b are semiprimes", k = 1, 2, 3, ... .
This series of sequences was inspired by Zak Seidov's message to Seqfans (Mar 02 2017) where he suggested listing the triples of primes squared with neighbor semiprimes.
There are no semiprimes below prime(2) = 3 but there are below prime(3) = 5 so the offset is 3. - David A. Corneth, Mar 04 2017
From Michael De Vlieger, Mar 04 2017: (Start)
Largest term in range a(3)..a(10^m): {7, 11, 24, 38, 54, 74, ...}.
Largest term in range a(3)..a(2^m), m>1: {3, 6, 7, 11, 11, 14, 19, 20, 24, 25, 38, 38, 38, 47, 47, 55, 70, 74, ...}.
Largest run in range a(3)..a(10^m): {2, 4, 6, 8, 10, 12, ...}.
Largest run in range a(3)..a(2^m), m>1: {1, 2, 2, 4, 4, 4, 4, 5, 6, 7, 7, 8, 8, 10, 10, 10, 12, 12, ...}. (End)

Examples

			For a(3), the largest semiprime below 5 is 4. The least semiprime above 5 is 6. Therefore, (a, b) = (4, 6) giving a(3) = 6 - 4 = 2. - _David A. Corneth_, Mar 04 2017
		

Crossrefs

Programs

  • Mathematica
    Table[Module[{p = Prime@ n, a, b}, a = p - 1; b = p + 1; While[PrimeOmega@ a != 2, a--]; While[PrimeOmega@ b != 2, b++]; b - a], {n, 3, 120}] (* Michael De Vlieger, Mar 04 2017 *)
  • PARI
    issemi(n)=bigomega(n)==2
    a(n,p=prime(n))=my(a=p,b=p); while(!issemi(a--), ); while(!issemi(b++), ); b-a \\ Charles R Greathouse IV, Mar 04 2017

Formula

a(n) = A102414(n) - A102415(n). - Michel Marcus, Mar 04 2017

Extensions

More terms from Peter J. C. Moses, Mar 04 2017

A121885 Excess of n-th prime over previous semiprime.

Original entry on oeis.org

1, 1, 1, 3, 2, 4, 1, 3, 5, 2, 2, 4, 1, 2, 1, 3, 2, 2, 4, 2, 1, 2, 2, 6, 8, 1, 3, 2, 4, 2, 3, 5, 3, 5, 2, 2, 1, 4, 1, 3, 4, 6, 3, 5, 2, 2, 1, 3, 7, 2, 4, 2, 3, 1, 2, 4, 3, 3, 5, 2, 2, 2, 4, 3, 2, 2, 1, 3, 7, 1, 2, 2, 2, 1, 3, 2, 3, 2, 2, 4, 4, 6, 2, 6, 2, 3, 3
Offset: 3

Views

Author

Jonathan Vos Post, Aug 31 2006

Keywords

Comments

See: A102415 Greatest semiprime less than n-th prime. See: A102414 Smallest semiprime greater than n-th prime.

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; Table[i = Prime[n] - 1; While[! SemiPrimeQ[i], i--]; Prime[n] - i, {n, 3, 100}] (* T. D. Noe, Oct 08 2012 *)
    eps[n_]:=Module[{c=n-1},While[PrimeOmega[c]!=2,c--];n-c]; Table[eps[n],{n,Prime[Range[3,90]]}] (* Harvey P. Dale, Aug 12 2014 *)
  • PARI
    dsemi(n)= { local(k=0); if(isprime(n),k=0;while(bigomega(n-k)<>2&&kAntonio Roldán, Oct 08 2012

Formula

a(n) = Min{A000040(n)-s for s < A000040(n) and s in A001358(k)}. a(n) = A000040(n) - A102415(n).

Extensions

Extended by T. D. Noe, Oct 08 2012
Showing 1-4 of 4 results.