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-10 of 304 results. Next

A114403 Triprime gaps. First differences of A014612.

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Nov 25 2005

Keywords

Examples

			a(1) = 4 = 12-8 where 8 is the first triprime and 12 is the second.
a(2) = 6 = 18-12
a(3) = 2 = 20-18
a(4) = 7 = 27-20
		

Crossrefs

Programs

  • Maple
    is3Alm := proc(n::integer) local ifa,ex,i ; ifa := op(2,ifactors(n)) ; ex := 0 ; for i from 1 to nops(ifa) do ex := ex+ op(2,op(i,ifa)) ; od : if ex = 3 then RETURN(true) ; else RETURN(false) ; fi ; end: A014612 := proc(n::integer) local resul,i; i :=1; resul := 8 ; while i < n do resul := resul + 1 ; if is3Alm(resul) then i := i+1 ; fi ; od ; RETURN(resul) ; end: A114403 := proc(n::integer) RETURN(A014612(n+1)-A014612(n)) ; end: for n from 1 to 160 do printf("%d,",A114403(n)) ; od: # R. J. Mathar, Apr 25 2006
  • Mathematica
    Differences[Select[Range[425], PrimeOmega[#] == 3 &]] (* Jayanta Basu, Jul 01 2013 *)

Formula

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

Extensions

Corrected and extended by R. J. Mathar, Apr 25 2006

A109023 3-almost primes (A014612) whose digit reversal is different and also has 3 prime factors (with multiplicity).

Original entry on oeis.org

117, 147, 165, 244, 246, 285, 286, 290, 338, 366, 369, 406, 418, 425, 435, 438, 442, 475, 498, 506, 507, 508, 524, 534, 539, 548, 561, 574, 582, 604, 605, 609, 628, 642, 663, 670, 682, 705, 711, 741, 759, 805, 814, 826, 833, 834, 845, 890, 894, 906, 935
Offset: 1

Views

Author

Jonathan Vos Post, Jun 16 2005

Keywords

Comments

This sequence is the k = 3 instance of the series which begins with k = 1, k = 2.

Examples

			1066 is in this sequence because 1066 = 2 * 13 * 41, making it a 3-almost prime and reverse(1066) = 6601 = 7 * 23 * 41, also a 3-almost prime.
2001 is in this sequence because 2001 = 3 * 23 * 29 and reverse(2001) = 1002 = 2 * 3 * 167.
		

References

  • W. W. R. Ball and H. S. M. Coxeter, Mathematical Recreations and Essays, 13th ed. New York: Dover, pp. 14-15, 1987.
  • J. Edalj, Problem 1622. L'Intermédiaire des Mathématiciens, 16, 34, 1909.

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],PrimeOmega[#]==3&&PrimeOmega[FromDigits[Reverse[IntegerDigits[#]]]]==3&&!PalindromeQ[#]&] (* James C. McMahon, Mar 06 2024 *)
  • PARI
    is(n) = {
    	my(r = fromdigits(Vecrev(digits(n))));
    	n!=r && bigomega(n) == 3 && bigomega(r) == 3
    } \\ David A. Corneth, Mar 07 2024

Extensions

1002 replaced by 935 - R. J. Mathar, Dec 14 2009

A124270 a(n) = prime(A014612(n)) - A014612(prime(n)). Commutator [A000040,A014612] at n.

Original entry on oeis.org

7, 19, 34, 41, 53, 44, 38, 103, 91, 73, 99, 75, 135, 142, 147, 118, 133, 125, 118, 193, 229, 191, 212, 202, 197, 201, 216, 213, 248, 239, 209, 248, 279, 279, 277, 277, 333, 325, 350, 327, 299, 308, 264, 309, 314, 322, 297, 281, 363, 374, 461, 488, 484, 482
Offset: 1

Views

Author

Jonathan Vos Post, Oct 23 2006

Keywords

Examples

			a(1) = prime(3almostprime(1)) - 3almostprime(prime(1)) = prime(8) - 3almostprime(2) = 19 - 12 = 7.
a(2) = prime(3almostprime(2)) - 3almostprime(prime(2)) = prime(12) - 3almostprime(3) = 37 - 18 = 19.
a(3) = prime(3almostprime(3)) - 3almostprime(prime(3)) = prime(18) - 3almostprime(5) = 61 - 27 = 34.
		

Crossrefs

Cf. A000040 (primes), A014612 (3-almost primes).
Cf. A124268 (prime(3-almost prime(n))), A124269 (3-almost prime(prime(n))).
Cf. A106349 (prime(semiprime(n))), A106350 (semiprime(prime(n))), A122824 (prime(semiprime(n)) - semiprime(prime(n))).

Programs

  • PARI
    lista(nn) = {p = primes(nn); pp = select(x->bigomega(x)==3, vector(nn, n, n)); for (n=1, nn, print1(p[pp[n]] - pp[p[n]], ", "););} \\ Michel Marcus, Oct 15 2014

Formula

a(n) = A000040(A014612(n)) - A014612(A000040(n)).
a(n) = A124268(n) - A124269(n).

A130650 a(n) = smallest k such that A014612(n+1) = A014612(n) + (A014612(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 4, 13, 2, 13, 18, 4, 43, 8, 3, 41, 4, 4, 3, 13, 2, 37, 16, 43, 97, 4, 9, 10, 53, 4, 5, 10, 3, 6, 61, 43, 2, 11, 2, 12, 163, 8, 13, 2, 5, 173, 8, 89, 4, 3, 37, 61, 101, 101, 107, 229, 113
Offset: 1

Views

Author

Rémi Eismann, Aug 16 2007 - Jan 21 2011

Keywords

Comments

a(n) is the "weight" of 3-almost primes.
The decomposition of 3-almost primes into weight * level + gap is A014612(n) = a(n) * A184753(n) + A114403(n) if a(n) > 0.

Examples

			For n = 1 we have A014612(1) = 8, A014612(2) = 12; there is no k such that 12 - 8 = 4 = (8 mod k), hence a(1) = 0.
For n = 3 we have A014612(3) = 18, A014612(4) = 20; 4 is the smallest k such that 20 - 18 = 2 = (18 mod k), hence a(3) = 4.
For n = 21 we have A014612(21) = 98, A014612(22) = 99; 97 is the smallest k such that 99 - 98 = 1 = (97 mod k), hence a(21) = 97.
		

Crossrefs

A072114 Number of 3-almost primes (A014612) <= n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, 16, 16, 16, 16, 17, 18, 18, 19, 19, 19, 19, 19, 19, 19
Offset: 0

Views

Author

Benoit Cloitre, Jun 19 2002

Keywords

Comments

Number of k <= n such that bigomega(k) = 3.
Let A be a positive integer then card{ x <= n : bigomega(x) = A } ~ (n/Log(n))*Log(Log(n))^(A-1)/(A-1)!. For which n, card{ x <= n : bigomega(x) = 3 } >= card{ x <= n : bigomega(x) = 2 } ?
15530 is the first number for which there are more 3-almost primes than 2-almost primes. See A125149.

References

  • E. Landau, Handbuch der Lehre von der Verteilung der Primzahlen, vol. 1, Teubner, Leipzig; third edition : Chelsea, New York (1974).
  • G. Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, p. 203, Publications de l'Institut Cartan, 1990.

Crossrefs

Partial sums of A101605.
Cf. A125149.

Programs

  • Mathematica
    Table[Sum[KroneckerDelta[PrimeOmega[i], 3], {i, n}], {n, 0, 50}] (* Wesley Ivan Hurt, Oct 07 2014 *)
  • PARI
    for(n=1,100,print1(sum(i=1,n,bigomega(i)==3),","))
    
  • PARI
    a(n)=my(j,s);forprime(p=2,(n+.5)^(1/3),j=primepi(p)-2;forprime(q=p,sqrtint(n\p),s+=primepi(n\(p*q))-j++));s \\ Charles R Greathouse IV, Mar 21 2012
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A072114(n): return int(sum(primepi(n//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(n,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(n//k)+1),a))) # Chai Wah Wu, Aug 17 2024

Formula

a(n) = card{ x <= n : bigomega(x) = 3 }, asymptotically : a(n) ~ (n/log(n))*log(log(n))^2/2 [Landau, p. 211].

A162361 Central prime factor of A014612(n).

Original entry on oeis.org

2, 2, 3, 2, 3, 2, 3, 3, 2, 3, 5, 2, 3, 3, 2, 5, 5, 2, 3, 2, 7, 3, 3, 5, 5, 3, 2, 3, 2, 5, 5, 3, 7, 2, 3, 7, 2, 5, 5, 3, 2, 3, 5, 7, 3, 2, 5, 5, 3, 2, 3, 5, 7, 2, 7, 11, 2, 7, 3, 5, 3, 3, 7, 2, 7, 5, 3, 3, 2, 5, 11, 5, 2, 5, 2, 3, 7, 5, 2, 3, 13, 7, 5, 3, 2, 7, 11, 3, 3, 5, 11, 7, 3, 2, 7, 3, 2, 7, 5, 2, 11, 3, 5
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 02 2009

Keywords

Examples

			a(1)=2 since A014612(1) =  8 = 2*2*2.
a(2)=2 since A014612(2) = 12 = 2*2*3.
a(3)=3 since A014612(3) = 18 = 2*3*3.
a(4)=2 since A014612(4) = 20 = 2*2*5.
a(5)=3 since A014612(5) = 27 = 3*3*3.
a(6)=2 since A014612(6) = 28 = 2*2*7.
a(7)=3 since A014612(7) = 30 = 2*3*5.
		

Crossrefs

Cf. A014612, A020639 (Lpf), A006530 (Gpf).

Programs

  • Maple
    A014612 := proc(n) option remember ; if n = 1 then 8 ; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 3 then RETURN(a) ; fi; od: fi; end:
    A162361 := proc(n) tpr := A014612(n) ; pf := sort(convert(numtheory[factorset](tpr),list)) ; tpr/op(1,pf)/op(-1,pf) ; end:
    seq(A162361(n),n=1..120) ; # R. J. Mathar, Jul 06 2009
  • Mathematica
    f[n_] := With[{fi = FactorInteger[n][[All, 1]]}, n/(fi[[1]] fi[[-1]])];
    f /@ Select[Range[500], PrimeOmega[#] == 3&] (* Jean-François Alcover, Aug 05 2022 *)
  • PARI
    isok(n) = bigomega(n)==3;
    lista(nn) = {for (n=1, nn, if (isok(n), my(f=factor(n)[,1]); print1(n/(vecmin(f)*vecmax(f)), ", ")););} \\ Michel Marcus, Feb 25 2019

Formula

a(n) = m/(A020639(m)*A006530(m)) where m = A014612(n). - Michel Marcus, Feb 25 2019

Extensions

Edited (but not checked) by N. J. A. Sloane, Jul 05 2009
Corrected and extended by R. J. Mathar and Ray Chandler, Jul 06 2009

A184752 a(n) = largest k such that A014612(n+1) = A014612(n) + (A014612(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 16, 13, 26, 26, 18, 40, 43, 40, 48, 41, 60, 64, 66, 65, 74, 74, 64, 86, 97, 96, 99, 100, 106, 112, 115, 110, 123, 120, 122, 129, 146, 143, 152, 144, 163, 160, 169, 170, 170, 173, 168, 178, 184, 186, 185, 183, 202, 202, 214
Offset: 1

Views

Author

Rémi Eismann, Jan 21 2011

Keywords

Comments

From the definition, a(n) = A014612(n) - A114403(n) if A014612(n) - A114403(n) > A114403(n), 0 otherwise where A014612 are the 3-almost primes and A114403 are the gaps between 3-almost primes.

Examples

			For n = 1 we have A014612(1) = 8, A014612(2) = 12; there is no k such that 12 - 8 = 4 = (8 mod k), hence a(1) = 0.
For n = 3 we have A014612(3) = 18, A014612(4) = 20; 16 is the largest k such that 20 - 18 = 2 = (18 mod k), hence a(3) = 16.
For n = 21 we have A014612(21) = 98, A014612(22) = 99; 97 is the largest k such that 99 - 98 = 1 = (97 mod k), hence a(21) = 97.
		

Crossrefs

A109988 3-almost primes (A014612) ordered alphabetically by where they occur in A000052.

Original entry on oeis.org

8, 18, 50, 52, 45, 44, 42, 98, 99, 92, 70, 78, 75, 76
Offset: 1

Views

Author

Jonathan Vos Post, Jul 07 2005

Keywords

Comments

A109986 is primes ordered alphabetically by where they occur in A000052. A109987 is semiprimes ordered alphabetically by where they occur in A000052. A109989 is 4-almost primes ordered alphabetically by where they occur in A000052.

Examples

			a(1) = 8 because eight is the first 3-almost prime in alphabetical order.
a(4) = 18 because eighteen is the first 2-digit 3-almost prime in alphabetical order.
		

Crossrefs

A123073 Number of ordered triples of primes (p,q,r) such that pqr = n-th 3-almost prime A014612(n).

Original entry on oeis.org

1, 3, 3, 3, 1, 3, 6, 6, 3, 3, 3, 3, 3, 6, 3, 6, 3, 3, 6, 3, 3, 3, 6, 6, 6, 6, 3, 3, 3, 1, 6, 6, 3, 3, 3, 6, 3, 6, 6, 3, 3, 6, 3, 6, 6, 3, 6, 6, 3, 3, 6, 6, 6, 3, 6, 3, 3, 3, 6, 6, 6, 3, 6, 3, 6, 3, 3, 6, 3, 6, 6, 6, 3, 6, 3, 6, 6, 3, 3, 3, 3, 1, 6, 6, 3, 6, 3, 6, 3, 6, 6, 6, 3, 3, 6, 6, 3, 6, 6, 3, 6, 3, 3, 6, 3
Offset: 1

Views

Author

N. J. A. Sloane and T. D. Noe, Sep 29 2006

Keywords

Comments

The nonzero subsequence of A123074.

Crossrefs

Programs

  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot, primefactors
    def A123073(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+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)))
        return (1,3,6)[len(primefactors(bisection(f,n,n)))-1] # Chai Wah Wu, Oct 20 2024

Extensions

More terms from T. D. Noe, Sep 29 2006

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
Showing 1-10 of 304 results. Next