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

A065516 Differences between products of 2 primes.

Original entry on oeis.org

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

Views

Author

Lior Manor, Nov 27 2001

Keywords

Comments

See A215231 and A085809 for record values and where they occur: A215231(n) = a(A085809(n)). - Reinhard Zumkeller, Mar 23 2014

Examples

			a(6) = A001358(7) - A001358(6) = 21 - 15 = 6.
		

Crossrefs

A166237 is the version for distinct primes.

Programs

  • Haskell
    a065516 n = a065516_list !! (n-1)
    a065516_list = zipWith (-) (tail a001358_list) a001358_list
    -- Reinhard Zumkeller, Mar 23 2014
  • Mathematica
    Differences[Select[Range[329], PrimeOmega[#] == 2 &]] (* Arkadiusz Wesolowski, Nov 24 2011 *)
  • PARI
    {spg(m)=local(a,b); a=0; b=4; for(n=5,m,if(bigomega(n) == 2,a=n; print1(a-b","); b=a; ))}
    

Formula

a(n) = A001358(n+1) - A001358(n).

Extensions

More terms from Jason Earls, Jul 24 2003

A215231 Increasing gaps between semiprimes.

Original entry on oeis.org

2, 3, 4, 6, 7, 11, 14, 19, 20, 24, 25, 28, 30, 32, 38, 47, 54, 55, 70, 74, 76, 82, 85, 87, 88, 95, 98, 107, 110, 112, 120, 123, 126, 146, 163, 166, 171, 174
Offset: 1

Views

Author

T. D. Noe, Aug 07 2012

Keywords

Comments

See A215232 and A217851 for the semiprimes that begin and end the gaps.
Records in A065516. - R. J. Mathar, Aug 09 2012
How long can these gaps be? In the Cramér model, with x = A215232(n), they are of length log(x)^2/log(log(x))(1 + o(1)) with probability 1. - Charles R Greathouse IV, Sep 07 2012
a(n) = A065516(A085809(n)). - Reinhard Zumkeller, Mar 23 2014

Examples

			4 is here because the difference between 10 and 14 is 4, and there is no smaller semiprimes with this property.
		

Crossrefs

Cf. A001358 (semiprimes), A131109, A215232, A217851.
Cf. A005250 (increasing gaps between primes).
Cf. A239673 (increasing gaps between sphenic numbers).

Programs

  • Haskell
    a215231 n = a215231_list !! (n-1)
    (a215231_list, a085809_list) = unzip $ (2, 1) : f 1 2 a065516_list where
       f i v (q:qs) | q > v = (q, i) : f (i + 1) q qs
                    | otherwise = f (i + 1) v qs
    -- Reinhard Zumkeller, Mar 23 2014
  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; nextSemiprime[n_] := Module[{m = n + 1}, While[! SemiPrimeQ[m], m++]; m]; t = {{0, 0}}; s1 = nextSemiprime[1]; While[s1 < 10^7, s2 = nextSemiprime[s1]; d = s2 - s1; If[d > t[[-1, 1]], AppendTo[t, {d, s1}]; Print[{d, s1}]]; s1 = s2]; t = Rest[t]; Transpose[t][[1]]

Extensions

a(27)-a(31) from Donovan Johnson, Aug 07 2012
a(32)-a(38) from Donovan Johnson, Sep 20 2012

A349995 Record gaps between odd squarefree semiprimes (A046388).

Original entry on oeis.org

6, 12, 16, 20, 22, 24, 26, 28, 32, 36, 38, 40, 44, 50, 52, 60, 64, 70, 74, 84, 90, 92, 100, 102, 116, 118, 120, 132, 136, 138, 140, 142, 146, 152, 154, 156, 164, 170, 184, 186, 210
Offset: 1

Views

Author

Hugo Pfoertner, Dec 25 2021

Keywords

Examples

			  n  A350098(n)  A350099(n)  a(n)
  1      15          21        6
  2      21          33       12
  3      95         111       16
  4     267         287       20
  5    2369        2391       22
		

Crossrefs

Records in A341828.
Cf. A350098 lower ends of the record gaps, A350099 upper ends of the record gaps.

Extensions

a(35)-a(41) from Lucas A. Brown, Feb 29 2024

A114021 Number of semiprimes between n and n + sqrt(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 2, 1, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 1, 0, 0, 1, 2, 3, 3, 3, 3, 3, 2, 2, 2, 1, 0, 1, 1, 1, 2, 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 5, 5, 5, 4, 4, 4, 4, 3, 3, 2, 1, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2
Offset: 0

Views

Author

Jonathan Vos Post, Jan 31 2006

Keywords

Comments

It appears that for n > 37 it is always true that a(n) > 0. The exponent can be reduced further. Since 597 + 597^(0.4129) > 611, leaping the record semiprime gap between 597 and 611, it seems that for n > 597 it is always true that there is a semiprime between n and n^(0.4129). It seems that for n > 2705 it is always true that there is a semiprime between n and n^(0.3509). These conjectures are related to the various sequences about semiprime gaps and the merit of such gaps.
a(96) appears to be the last zero term. - T. D. Noe, Aug 12 2008

Examples

			a(0) = 0 because there are no semiprimes between 0 and 0+sqrt(0) = 0.
a(2) = 0 because there are no semiprimes between 2 and 2+sqrt(2) = 3.414...
a(3) = 1 as the semiprime 4 falls between 3 and 3 + sqrt(3) = 4.732...
a(5) = 1 as the semiprime 6 falls between 5 and 5 + sqrt(5) = 7.236...
		

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_] := TrueQ[Plus@@Last/@FactorInteger[n]==2]; Table[hi=n+Sqrt[n]; If[IntegerQ[hi], hi--, hi=Floor[hi]]; Length[Select[Range[n+1,hi], SemiPrimeQ]], {n,0,150}] (* T. D. Noe, Aug 12 2008 *)
  • Perl
    use ntheory ":all"; print "$ ",semiprime_count($+1, $+sqrtint($)-($ && is_square($))),"\n" for 0..1000; # Dana Jacobsen, Mar 04 2019

Formula

a(n) = card{S such that S is an element of A001358 and n < S < n + n^(1/2)}.

Extensions

Corrected and extended by T. D. Noe, Aug 12 2008

A239674 Where records occur in A239656 (the first differences of sphenic numbers).

Original entry on oeis.org

1, 2, 19, 498, 2114, 8351, 8381, 59704, 233890, 291963, 1119181, 1507131, 1839746, 9768399, 40844982, 94852115, 138032741, 443653568, 453853664, 2491818901
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 23 2014

Keywords

Crossrefs

Programs

  • Haskell
    a239674 n = a239674_list !! (n-1)
    -- See A239673 for definition of A239674_list.
    
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, (lim)^(1/3), forprime(q=p+1, sqrt(lim\p), t=p*q; forprime(r=q+1, lim\t, listput(v, t*r)))); vecsort(Vec(v)) ; \\ A007304
    chk(lim) = my(v=list(lim), dv = vector(#v-1, k, v[k+1] - v[k]), r=0); for (i=1, #dv, if (dv[i] > r, r=dv[i]; print1(i, ", "));); \\ Michel Marcus, Sep 20 2023

Formula

A239656(a(n)) = A239673(n).

Extensions

a(12)-a(14) from Michel Marcus, Sep 20 2023
a(15)-a(20) from Amiram Eldar, May 19 2024

A350098 a(n) is the lower end of a record gap A349995(n) between consecutive odd squarefree semiprimes (A046388).

Original entry on oeis.org

15, 21, 95, 267, 2369, 6559, 8817, 13705, 15261, 21583, 35981, 66921, 113009, 340891, 783757, 872219, 3058853, 3586843, 5835191, 12345473, 108994623, 248706917, 268749691, 679956119, 709239621, 3648864859, 3790337723, 4171420481, 33955869693, 34279038379, 34840796369
Offset: 1

Views

Author

Hugo Pfoertner, Dec 26 2021

Keywords

Examples

			See A349995.
		

Crossrefs

Starting at a(3)=95 the terms coincide with the known terms of A114057.

Formula

a(n) = A350099(n) - A349995(n).

A350099 a(n) is the upper end of a record gap A349995(n) between consecutive odd squarefree semiprimes (A046388).

Original entry on oeis.org

21, 33, 111, 287, 2391, 6583, 8843, 13733, 15293, 21619, 36019, 66961, 113053, 340941, 783809, 872279, 3058917, 3586913, 5835265, 12345557, 108994713, 248707009, 268749791, 679956221, 709239737, 3648864977, 3790337843, 4171420613, 33955869829, 34279038517, 34840796509
Offset: 1

Views

Author

Hugo Pfoertner, Dec 26 2021

Keywords

Examples

			See A349995.
		

Crossrefs

Formula

a(n) = A350098(n) + A349995(n).

A114057 Start of record gap in odd semiprimes A046315.

Original entry on oeis.org

9, 25, 39, 95, 267, 2369, 6559, 8817, 13705, 15261, 21583, 35981, 66921, 113009, 340891, 783757, 872219, 3058853, 3586843, 5835191, 12345473, 108994623, 248706917, 268749691, 679956119, 709239621, 3648864859, 3790337723, 4171420481, 33955869693, 34279038379
Offset: 1

Views

Author

Jonathan Vos Post, Feb 02 2006

Keywords

Comments

3 of the first 5 values of record gaps in odd semiprimes are also record merits = (A046315(k+1)-A046315(k))/log_10(A046315(k)), namely: (15 - 9) / log_10(9) = 6.28770982; (111 - 95) / log_10(95) = 8.09010923; (287 - 267) / log_10(267) = 8.24228608. It is easy to prove that there are gaps of arbitrary length in even semiprimes (A100484); can we prove that there are gaps of arbitrary length in odd semiprimes (A046315) and in semiprimes (A001358)?
The record gaps have lengths 6, 8, 10, 16, 20, 22, 24, 26, 28, 32, 36, 38, 40, 44, 50, 52, 60, 64, 70, 74. - T. D. Noe, Feb 03 2006

Examples

			a(1) = A046315(2)-A046315(1) = 15 - 9 = 6.
a(2) = A046315(5)-A046315(4) = 33 - 25 = 8.
a(3) = A046315(8)-A046315(7) = 49 - 39 = 10.
a(4) = A046315(20)-A046315(19) = 111 - 95 = 16.
a(5) = A046315(55)-A046315(54) = 287 - 267 = 20.
		

Crossrefs

Starting at a(4)=95 the known terms of this sequence coincide with A350098.

Programs

  • Mathematica
    f[n_] := Block[{k = n + 2}, While[ Plus @@ Last /@ FactorInteger@k != 2, k += 2]; k]; lst = {}; d = 0; a = b = 9; Do[{a, b} = {b, f[a]}; If[b - a > d, d = b - a; AppendTo[lst, a]], {n, 10^8}]; lst (* Robert G. Wilson v, Feb 03 2006 *)

Formula

{a(n)} = {A046315(k) such that A046315(k+1)-A046315(k) is a record}.

Extensions

More terms from Robert G. Wilson v and T. D. Noe, Feb 03 2006
a(23)-a(28) from Donovan Johnson, Mar 14 2010
a(29)-a(31) from Donovan Johnson, Oct 20 2012

A114058 Start of record gap in even semiprimes (A100484).

Original entry on oeis.org

4, 6, 14, 46, 178, 226, 1046, 1774, 2258, 2654, 19102, 31366, 39218, 62794, 311842, 721306, 740522, 984226, 2699066, 2714402, 4021466, 9304706, 34103414, 41662646, 94653386, 244329494, 379391318, 383825566, 774192266
Offset: 1

Views

Author

Jonathan Vos Post, Feb 02 2006

Keywords

Comments

5 of the first 6 values of record gaps in even semiprimes are also record merits = (A100484(k+1)-A100484(k))/log_10(A100484(k)), namely: (6 - 4) / log_10(4) = 3.32192809; (10 - 6) / log_10(6) = 5.14038884; (22 - 14) / log_10(14) = 6.98002296; (58 - 46) / log_10(46) = 7.21692586; (254 - 226) / log_10(226) = 11.8940995. It is easy to prove that there are gaps of arbitrary length in even semiprimes (A100484), as 2*(n!+2), 2*(n!+3), 2*(n!+4), ..., 2*(n!+n) gives (n-1) consecutive even nonsemiprimes. Can we prove that there are gaps of arbitrary length in odd semiprimes (A046315) and in semiprimes (A001358)?
For every n, a(n) = 2*A002386(n). - John W. Nicholson, Jul 26 2012

Examples

			gap[a(1)] = A100484(2)-A100484(1) = 6 - 4 = 2.
gap[a(2)] = A100484(3)-A100484(2) = 10 - 6 = 4.
gap[a(3)] = A100484(5)-A100484(4) = 22 - 14 = 8.
gap[a(4)] = A100484(10)-A100484(9) = 58 - 46 = 12.
gap[a(5)] = A100484(25)-A100484(24) = 194 - 178 = 16.
gap[a(6)] = A100484(31)-A100484(30) = 254 - 226 = 28.
		

Crossrefs

Cf. A001358, A046315, A065516, A085809, A100484, A114412, A114021. Maximal gap small prime A002386.

Programs

  • Mathematica
    f[n_] := Block[{k = n + 2}, While[ Plus @@ Last /@ FactorInteger@k != 2, k += 2]; k]; lst = {}; d = 0; a = b = 4; Do[{a, b} = {b, f[a]}; If[b - a > d, d = b - a; AppendTo[lst, a]], {n, 10^8}]; lst (* Robert G. Wilson v *)

Formula

a(n) = A100484(k) such that A100484(k+1)-A100484(k) is a record.

Extensions

a(7)-a(25) from Robert G. Wilson v, Feb 03 2006
a(26)-a(31) from Donovan Johnson, Mar 14 2010
Showing 1-9 of 9 results.