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 31-40 of 63 results. Next

A239656 First differences of sphenic numbers, cf. A007304.

Original entry on oeis.org

12, 24, 4, 8, 24, 3, 5, 4, 16, 8, 16, 11, 5, 4, 8, 4, 4, 5, 27, 8, 1, 7, 8, 9, 3, 8, 7, 9, 3, 1, 4, 20, 8, 4, 23, 9, 3, 9, 4, 4, 11, 14, 3, 4, 4, 8, 8, 3, 1, 4, 1, 3, 4, 13, 10, 5, 4, 9, 11, 4, 8, 12, 12, 4, 21, 6, 13, 8, 8, 5, 3, 4, 4, 3, 1, 5, 3, 9, 11, 4
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 23 2014

Keywords

Comments

a(n) = A007304(n+1) - A007304(n);
see A239673 and A239674 for record values and where they occur: A239673(n) = a(A239674(n)).

Crossrefs

Cf. A065516.

Programs

  • Haskell
    a239656 n = a239656_list !! (n-1)
    a239656_list = zipWith (-) (tail a007304_list) a007304_list
  • Maple
    A007304 := proc(n)
        option remember;
        if n = 1 then
            30;
        else
            for a from procname(n-1)+1 do
                if numtheory[bigomega](a) =3 and nops(numtheory[factorset](a)) = 3 then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    A239656 := proc(n)
        A007304(n+1)-A007304(n) ;
    end proc:
  • Mathematica
    With[{upto=1000},Differences[Sort[Select[Times@@@Subsets[Prime[ Range[ Ceiling[upto/6]]],{3}],#<=upto&]]]] (* Harvey P. Dale, Jan 08 2015 *)

A264043 Numbers n such that n and n+3 are consecutive semiprimes.

Original entry on oeis.org

6, 22, 35, 46, 62, 74, 82, 115, 155, 166, 206, 259, 262, 295, 323, 355, 358, 362, 395, 466, 478, 482, 502, 511, 559, 562, 583, 586, 611, 623, 626, 671, 703, 718, 731, 734, 746, 755, 763, 799, 835, 838, 862, 866, 886, 895, 914, 923, 955, 979, 982
Offset: 1

Views

Author

Zak Seidov, Nov 02 2015

Keywords

Examples

			6 and 9 are 2nd and 3rd semiprimes, or 6=A001358(2) and 9=A001358(3);
22=A001358(8) and 25=A001358(9).
		

Crossrefs

Programs

  • Mathematica
    Flatten[Position[Partition[Table[If[PrimeOmega[n]==2,1,0],{n,1000}], 4,1],?(#=={1,0,0,1}&)]] (* _Harvey P. Dale, Feb 08 2016 *)
  • PARI
    for(n=1, 1e3, if(bigomega(n) == 2 && bigomega(n+3) == 2 && bigomega(n+1) !=2 && bigomega(n+2) !=2, print1(n", "))) \\ Altug Alkan, Nov 02 2015
    
  • PARI
    is(n)=if(n%4==2, isprime(n/2) && bigomega(n+3)==2 && bigomega(n+1)!=2, n%4==3 && isprime((n+3)/2) && bigomega(n)==2 && bigomega(n+2)!=2) \\ Charles R Greathouse IV, Nov 02 2015

Formula

a(n) >> n log n. - Charles R Greathouse IV, Nov 02 2015

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

A114405 5-almost prime gaps. First differences of A014614.

Original entry on oeis.org

16, 24, 8, 28, 4, 8, 42, 6, 8, 4, 20, 8, 35, 9, 12, 6, 2, 8, 20, 4, 8, 56, 10, 14, 4, 9, 3, 12, 20, 10, 6, 8, 4, 28, 4, 20, 32, 15, 21, 4, 2, 18, 4, 14, 26, 4, 15, 5, 4, 4, 8, 4, 2, 26, 16, 6, 2, 8, 20, 48, 20, 34, 6, 3, 27, 2, 4, 20, 1, 7, 16, 8, 4, 4, 6, 30, 6, 6, 12, 6, 3, 11
Offset: 1

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Comments

First occurrences of a(n)=1,2,3,.. are at n=69, 17, 27, 5, 48, 8, 70, 3, 14, 23, 82, 15, 150, 24, 38, 1, 172, 42, 258, 11, 39, 135, 102, 2, 779, 45, 65, 4, 518, 76, 263, 37, 211, 62, 13, 1009, 2463, 606, 254, 151, 3348, 7, 4513,... - R. J. Mathar, Oct 06 2007

Examples

			a(1) = 16 = 48-32 where 32 is the first 5-almost prime and 48 is the second.
a(2) = 24 = 72-48.
a(3) = 8 = 80-72.
a(4) = 28 = 108-80.
a(5) = 4 = 112-108.
a(6) = 8 = 120-112.
a(7) = 42 = 162-120.
a(8) = 6 = 168-162.
a(13) = 35 = 243-208.
a(22) = 56 = 368-312.
		

Crossrefs

Programs

  • Mathematica
    Differences[Select[Range[2000],PrimeOmega[#]==5&]] (* Harvey P. Dale, Sep 28 2019 *)

Formula

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

Extensions

More terms from R. J. Mathar, Oct 06 2007

A114414 Records in 4-almost prime gaps ordered by merit.

Original entry on oeis.org

8, 12, 14, 21, 28
Offset: 1

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Comments

Next term (if it exists) associated with A014613 > 1030000. - R. J. Mathar, Mar 13 2007

Examples

			Records defined in terms of A114404 and A014613:
  n  A114404(n)  A114404(n)/log_10(A014613(n))
  =  ==========  =============================
  1      8       8/log_10(16)   = 6.64385619
  2      12      12/log_10(24)  = 8.6943213
  3      4       4/log_10(36)   = 2.57019442
  4      14      14/log_10(40)  = 8.73874891
  5      2       2/log_10(54)   = 1.15447195
  6      4       4/log_10(56)   = 2.2880834
  7      21      21/log_10(60)  = 11.810019
  ...
  13     22      22/log_10(104) = 10.9071078
  ...
  21     28      28/log_10(156) = 12.7671725
		

Crossrefs

Programs

  • Maple
    Digits := 16 : A114414 := proc() local n,a014613,a114414,rec ; a014613 := 16 ; a114414 := 8 ; rec := a114414/log(a014613) ; print(a114414) ; n := 17 ; while true do while numtheory[bigomega](n) <> 4 do n := n+1 ; od ; a114414 := n-a014613 ; if ( evalf(a114414/log(a014613)) > evalf(rec) ) then rec := a114414/log(a014613) ; print(a114414) ; fi ; a014613 := n ; n := n+1 : od ; end: A114414() ; # R. J. Mathar, Mar 13 2007

Formula

a(n) = records in A114404(n)/log_10(A014613(n)) = records in (A014613(n+1) - A014613(n))/log_10(A014613(n)).

A217335 Semiprimes p such that next semiprime after p is p+20.

Original entry on oeis.org

2681, 3523, 6953, 8227, 16817, 26101, 28533, 28563, 28617, 29011, 34249, 37007, 42401, 49983, 50117, 55703, 60657, 65083, 66938, 71381, 71873, 73443, 76247, 92773, 92978, 101109, 101271, 109129, 111479, 112051, 113018, 113721, 115586, 116267, 119969, 124177
Offset: 1

Views

Author

Zak Seidov, Oct 01 2012

Keywords

Examples

			2681 = A001358(760)  = 7*383, 2701 = A001358(761) = 37*73,
3523 = A001358(986)  = 13*271, 3543 = A001358(987) = 3*1181.
		

Crossrefs

Programs

  • Magma
    IsSemiprime:=func; [n: n in [4..130000] | IsSemiprime(n) and IsSemiprime(n+20) and forall{n+i: i in [1..19] | not IsSemiprime(n+i)}]; // Bruno Berselli, Oct 01 2012
  • Mathematica
    f = Flatten@Position[Differences@(s = Select[Range@100000, PrimeOmega@# == 2 &]), 20]; s[[f]] (* Hans Rudolf Widmer, Aug 19 2024 *)

A264044 Numbers n such that n and n+4 are consecutive semiprimes.

Original entry on oeis.org

10, 51, 58, 65, 87, 111, 129, 209, 249, 274, 291, 305, 335, 377, 382, 403, 407, 447, 454, 485, 489, 493, 497, 529, 538, 629, 681, 699, 713, 749, 767, 781, 785, 803, 831, 889, 901, 917, 939, 951, 961, 985, 989, 1007, 1037, 1073, 1115, 1191, 1207
Offset: 1

Views

Author

Zak Seidov, Nov 02 2015

Keywords

Comments

Note that a(1)=10=A131109(k=4).
Subsequence of A175648: a(1)=10=A175648(2), a(2)=51=A175648(7), a(3)=58=A175648(8), etc. - Zak Seidov, Dec 20 2017

Examples

			10=A001358(4) and 14=A001358(5).
		

Crossrefs

Programs

  • Maple
    B:= select(numtheory:-bigomega=2, [$1..2000]):
    B[select(t ->B[t+1]-B[t]=4, [$1..nops(B)-1])]; # Robert Israel, Dec 21 2017
  • Mathematica
    Select[Partition[Select[Range[1250], PrimeOmega@ # == 2 &], 2, 1], Differences@ # == {4} &][[All, 1]] (* Michael De Vlieger, Dec 20 2017 *)
    SequencePosition[Table[If[PrimeOmega[n]==2,1,0],{n,1300}],{1,0,0,0,1}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 19 2020 *)
  • PARI
    is(n)=bigomega(n)==2 && bigomega(n+4)==2 && bigomega(n+1)!=2 && bigomega(n+2)!=2 && bigomega(n+3)!=2 \\ Charles R Greathouse IV, Nov 02 2015

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

A124317 Semiprimes indexed by 3-almost primes.

Original entry on oeis.org

22, 34, 51, 57, 82, 85, 87, 123, 133, 134, 146, 158, 201, 205, 209, 214, 221, 226, 237, 295, 305, 309, 321, 327, 341, 361, 365, 371, 394, 395, 413, 447, 478, 481, 497, 501, 529, 533, 543, 545, 551, 554, 559, 583, 597, 614, 623, 635, 689, 699, 734, 763, 766
Offset: 1

Views

Author

Jonathan Vos Post, Oct 26 2006

Keywords

Comments

Note that a(10)-a(9) = a(30)-a(29) = 1, achieving the minimum possible, due to a combination of the appropriate semiprime gap (A065516) and 3-almost prime gap (A114403).

Examples

			a(1) = semiprime(3almostprime(1)) = semiprime(8 = 2^3) = 22 = 2 * 11.
a(2) = semiprime(3almostprime(2)) = semiprime(12 = 2^2 * 3) = 34 = 2 * 17.
a(3) = semiprime(3almostprime(3)) = semiprime(18 = 2 * 3^2) = 51 = 3 * 17.
		

Crossrefs

Cf. A124318 3-almost primes indexed by semiprimes. A124319 semiprime(3almostprime(n)) - 3almostprime(semiprime(n)). A124308 Primes indexed by 5-almost primes. A124309 5-almost primes indexed by primes. A124310 prime(5almostprime(n)) - 5almostprime(prime(n)). 4-almost primes indexed by primes = A124283. prime(4almostprime(n)) - 4almostprime(prime(n)) = A124284. Primes indexed by 3-almost primes = A124268. 3-almost primes indexed by primes = A124269. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040, A001358] at n.

Programs

  • Mathematica
    p[k_] := Select[Range[1000], PrimeOmega[#] == k &]; p[2][[Take[p[3], 60]]] (* Giovanni Resta, Jun 13 2016 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A124317(n):
        def f(x): return int(x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        def g(x): return int(x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)+n
        while m != k:
            m, k = k, f(k)+n
        r, k = m, g(m)+m
        while r != k:
            r, k = k, g(k)+m
        return r # Chai Wah Wu, Aug 17 2024

Formula

a(n) = semiprime(3almostprime(n)) = A001358(A014612(n)).

Extensions

Data corrected by Giovanni Resta, Jun 13 2016

A124318 3-almost primes indexed by semiprimes.

Original entry on oeis.org

20, 28, 44, 45, 66, 68, 98, 99, 110, 114, 147, 148, 153, 165, 170, 188, 207, 222, 238, 244, 245, 261, 273, 284, 310, 322, 343, 356, 357, 363, 374, 387, 388, 399, 429, 438, 465, 475, 477, 494, 498, 506, 531, 549, 555, 590, 595, 596, 602, 603, 628, 639, 642
Offset: 1

Views

Author

Jonathan Vos Post, Oct 26 2006

Keywords

Examples

			a(1) = 3almostprime(semiprime(1)) = 3almostprime(4 = 2^2) = 20 = 2^2 * 5.
a(2) = 3almostprime(semiprime(2)) = 3almostprime(6 = 2 * 3) = 28 = 2^2 * 7.
a(3) = 3almostprime(semiprime(3)) = 3almostprime(9 = 3^2) = 44 = 2^2 * 11.
a(4) = 3almostprime(semiprime(4)) = 3almostprime(10 = 2 * 5) = 45 = 3^2 * 5.
		

Crossrefs

Cf. A124317 Semiprimes indexed by 3-almost primes. A124318 3-almost primes indexed by semiprimes. A124319 semiprime(3almostprime(n)) - 3almostprime(semiprime(n)). A124308 Primes indexed by 5-almost primes. A124309 5-almost primes indexed by primes. A124310 prime(5almostprime(n)) - 5almostprime(prime(n)). 4-almost primes indexed by primes = A124283. prime(4almostprime(n)) - 4almostprime(prime(n)) = A124284. Primes indexed by 3-almost primes = A124268. 3-almost primes indexed by primes = A124269. prime(3almostprime(n)) - 3almostprime(prime(n)) = A124270. See also A106349 Primes indexed by semiprimes. See also A106350 Semiprimes indexed by primes. See also A122824 Prime(semiprime(n)) - semiprime(prime(n)). Commutator [A000040, A001358] at n.

Programs

  • Mathematica
    p[k_] := Select[Range[1000], PrimeOmega[#] == k &]; p[3][[Take[p[2], 60]]] (* Giovanni Resta, Jun 13 2016 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A124318(n):
        def g(x): return int(x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        def f(x): return int(x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)+n
        while m != k:
            m, k = k, f(k)+n
        r, k = m, g(m)+m
        while r != k:
            r, k = k, g(k)+m
        return r # Chai Wah Wu, Aug 17 2024

Formula

a(n) = 3almostprime(semiprime(n)) = A014612(A001358(n)).

Extensions

a(22)-a(53) from Giovanni Resta, Jun 13 2016
Previous Showing 31-40 of 63 results. Next