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 11-15 of 15 results.

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

A124319 Semiprime(3almostprime(n))-3almostprime(semiprime(n)). Commutator[A001358, A014612] at n.

Original entry on oeis.org

2, 6, 7, 12, 16, 17, -11, 24, 23, 20, -1, 10, 48, 40, 39, 26, 14, 4, -1, 51, 60, 48, 48, 43, 31, 39, 22, 15, 37, 32, 39, 60, 90, 82, 68, 63, 64, 58, 66, 51, 53, 48, 28, 34, 42, 24, 28, 39, 87, 96, 106, 124, 124, 135, 131, 131, 88, 91, 72, 96, 103, 83, 83, 81, 91
Offset: 1

Views

Author

Jonathan Vos Post, Oct 26 2006

Keywords

Examples

			a(1) = semiprime(3almostprime(1)) - 3almostprime(semiprime(1)) = 22 - 20 = 2.
a(2) = semiprime(3almostprime(2)) - 3almostprime(semiprime(2)) = 34 - 28 = 6.
a(3) = semiprime(3almostprime(3)) - 3almostprime(semiprime(3)) = 51 - 44 = 7.
a(4) = semiprime(3almostprime(4)) - 3almostprime(semiprime(4)) = 57 - 45 = 12.
a(7) = semiprime(3almostprime(7)) - 3almostprime(semiprime(7)) = 87 - 98 = -11, which is the first negative value in the commutators we have seen in these related set of sequences, exposing an incorrect assumption.
		

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_] := p[k] = Select[Range[1000], PrimeOmega[#] == k &]; p[2][[ Take[p[3], 70]]] - p[3][[Take[p[2], 70]]] (* Giovanni Resta, Jun 13 2016 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A124319(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)))
        def A001358(n):
            m, k = n, g(n)+n
            while m != k:
                m, k = k, g(k)+n
            return m
        m, k = n, f(n)+n
        while m != k:
            m, k = k, f(k)+n
        r, k = (p:=A001358(n)), f(p)+p
        while r != k:
            r, k = k, f(k)+p
        return A001358(m)-r # Chai Wah Wu, Aug 17 2024

Extensions

a(18) corrected and a(22)-a(65) from Giovanni Resta, Jun 13 2016

A105346 3-almost primes whose indices are 3-almost primes.

Original entry on oeis.org

42, 52, 76, 92, 116, 117, 125, 174, 182, 186, 212, 230, 266, 275, 282, 285, 316, 318, 325, 385, 406, 410, 423, 428, 436, 455, 470, 474, 507, 508, 534, 575, 604, 605, 618, 627, 654, 657, 670, 678, 682, 705, 710, 730, 754, 762, 772, 788, 834, 861, 903, 931
Offset: 1

Views

Author

Jonathan Vos Post, Apr 30 2005

Keywords

Comments

The n-th 3-almost prime function applied to itself. This is the 3-almost prime equivalent of A091022, the latter being the n-th 2-almost prime function applied to itself. Note that this new iterated 3-almost prime sequence begins with the meaning of "Life, the Universe and Everything" and then generalizes to include the number of playing cards in a deck and the boiling point of water on the Fahrenheit scale.

Examples

			a(1) = 3-almost-prime(3-almost-prime(1)) = 3-almost-prime(8) = 42.
a(2) = 3-almost-prime(3-almost-prime(2)) = 3-almost-prime(12) = 52.
a(3) = 3-almost-prime(3-almost-prime(3)) = 3-almost-prime(18) = 76.
		

Crossrefs

Programs

  • Maple
    isA014612 := proc(n) option remember ; RETURN( numtheory[bigomega](n) = 3) ; end: A014612 := proc(n) option remember ; if n =1 then 8; else for a from procname(n-1)+1 do if isA014612(a) then RETURN(a) ; fi; od; fi; end: for n from 1 to 100 do q := A014612(A014612(n)) ; printf("%d,",q) ; od: # R. J. Mathar, Jan 27 2009
  • Mathematica
    With[{tap=Select[Range[2000],PrimeOmega[#]==3&]},Table[tap[[tap[[n]]]],{n,100}]] (* Harvey P. Dale, May 20 2019 *)
  • PARI
    do(lim)=my(v=List(), t); forprime(p=2, lim\4, forprime(q=2, min(lim\(2*p), p), t=p*q; forprime(r=2, min(lim\t, q), listput(v, t*r)))); v=Set(v); t=setsearch(v,#v); if(!t, t=setsearch(v,#v,1)-1); vector(t,i,v[v[i]]) \\ Charles R Greathouse IV, Feb 05 2017

Formula

a(n) = A014612(A014612(n)).

Extensions

Extended by R. J. Mathar, Jan 27 2009

A176706 Primes p such that the p-th semiprime divided by the sum of the digits of p is a prime.

Original entry on oeis.org

2, 3, 7, 23, 131, 313, 353, 397, 887, 1307, 1439, 1783, 2003, 2027, 2069, 2111, 2593, 2777, 3541, 4111, 4201, 4889, 5653, 5897, 6421, 6823, 8353, 8447, 9721, 9749, 11159, 11483, 12011, 12073, 12251, 13313, 14323, 14431, 15083, 15131, 15887, 17029
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 24 2010

Keywords

Examples

			131 is a term because the 131st semiprime is 415, the sum of the digits of 131 is 5, and 415/5 = 83, which is prime.
		

Crossrefs

Programs

  • Maple
    isA001358 := proc(n) numtheory[bigomega](n) = 2 ; end proc:
    A001358 := proc(n) option remember ; if n = 1 then return 4 ; else for a from procname(n-1)+1 do if isA001358(a) then return a; end if; end do; end if; end proc:
    A007953 := proc(n) add(d,d=convert(n,base,10)) ; end proc:
    isA176706 := proc(n) if isprime(n) then r := A001358(n)/A007953(n) ; if type(r,'integer') then isprime(r) ; else false; end if; else false; end if; end proc:
    for n from 1 to 2000 do p := ithprime(n) ; if isA176706(p) then printf("%d,",p) ; end if; end do: # R. J. Mathar, Apr 24 2010
  • Mathematica
    Module[{semis=Select[Range[100000],PrimeOmega[#]==2&]},Select[ Prime[ Range[ PrimePi[ Length[semis]]]], PrimeQ[semis[[#]]/ Total[ IntegerDigits[ #]]]&]] (* Harvey P. Dale, May 10 2014 *)

Extensions

Keyword:base added, sequence extended by R. J. Mathar, Apr 24 2010
Previous Showing 11-15 of 15 results.