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 485 results. Next

A338899 Concatenated sequence of prime indices of squarefree semiprimes (A006881).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 16 2020

Keywords

Comments

This is a triangle with two columns and strictly increasing rows, namely {A270650(n), A270652(n)}.
A squarefree semiprime is a product of any two distinct prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The sequence of terms together with their prime indices begins:
      6: {1,2}     57: {2,8}     106: {1,16}    155: {3,11}
     10: {1,3}     58: {1,10}    111: {2,12}    158: {1,22}
     14: {1,4}     62: {1,11}    115: {3,9}     159: {2,16}
     15: {2,3}     65: {3,6}     118: {1,17}    161: {4,9}
     21: {2,4}     69: {2,9}     119: {4,7}     166: {1,23}
     22: {1,5}     74: {1,12}    122: {1,18}    177: {2,17}
     26: {1,6}     77: {4,5}     123: {2,13}    178: {1,24}
     33: {2,5}     82: {1,13}    129: {2,14}    183: {2,18}
     34: {1,7}     85: {3,7}     133: {4,8}     185: {3,12}
     35: {3,4}     86: {1,14}    134: {1,19}    187: {5,7}
     38: {1,8}     87: {2,10}    141: {2,15}    194: {1,25}
     39: {2,6}     91: {4,6}     142: {1,20}    201: {2,19}
     46: {1,9}     93: {2,11}    143: {5,6}     202: {1,26}
     51: {2,7}     94: {1,15}    145: {3,10}    203: {4,10}
     55: {3,5}     95: {3,8}     146: {1,21}    205: {3,13}
		

Crossrefs

A270650 is the first column.
A270652 is the second column.
A320656 counts multiset partitions using these rows, or factorizations into squarefree semiprimes.
A338898 is the version including squares, with columns A338912 and A338913.
A338900 gives row differences.
A338901 gives the row numbers for first appearances.
A001221 and A001222 count distinct/all prime indices.
A001358 lists semiprimes.
A004526 counts 2-part partitions, with strict case shifted right once.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes.
A046315 and A100484 list odd and even semiprimes.
A046388 lists odd squarefree semiprimes.
A166237 gives first differences of squarefree semiprimes.

Programs

  • Mathematica
    Join@@Cases[Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]==2&],k_:>PrimePi/@First/@FactorInteger[k]]

A270650 Min(i, j), where p(i)*p(j) is the n-th term of A006881.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Apr 25 2016

Keywords

Examples

			A006881 = (6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, ... ), the increasing sequence of all products of distinct primes.  The first 4 factorizations are 2*3, 2*5, 2*7, 3*5, so that (a(1), a(2), a(3), a(4)) = (1,1,1,2).
		

Crossrefs

Programs

  • Mathematica
    mx = 350; t = Sort@Flatten@Table[Prime[n]*Prime[m], {n, Log[2, mx/3]}, {m, n + 1, PrimePi[mx/Prime[n]]}]; (* A006881, Robert G. Wilson v, Feb 07 2012 *)
    u = Table[FactorInteger[t[[k]]][[1]], {k, 1, Length[t]}];
    u1 = Table[u[[k]][[1]], {k, 1, Length[t]}]  (* A096916 *)
    PrimePi[u1]  (* A270650 *)
    v = Table[FactorInteger[t[[k]]][[2]], {k, 1, Length[t]}];
    v1 = Table[v[[k]][[1]], {k, 1, Length[t]}]  (* A070647 *)
    PrimePi[v1]  (* A270652 *)
    d = v1 - u1  (* A176881 *)
    Map[PrimePi[FactorInteger[#][[1, 1]]] &, Select[Range@ 240, And[SquareFreeQ@ #, PrimeOmega@ # == 2] &]] (* Michael De Vlieger, Apr 25 2016 *)

A270652 Max(i,j), where p(i)*p(j) is the n-th term of A006881.

Original entry on oeis.org

2, 3, 4, 3, 4, 5, 6, 5, 7, 4, 8, 6, 9, 7, 5, 8, 10, 11, 6, 9, 12, 5, 13, 7, 14, 10, 6, 11, 15, 8, 16, 12, 9, 17, 7, 18, 13, 14, 8, 19, 15, 20, 6, 10, 21, 11, 22, 16, 9, 23, 17, 24, 18, 12, 7, 25, 19, 26, 10, 13, 27, 8, 20, 28, 14, 11, 29, 21, 7, 30, 15, 22
Offset: 1

Views

Author

Clark Kimberling, Apr 25 2016

Keywords

Examples

			A006881 = (6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, ... ), the increasing sequence of all products of distinct primes.  The first 4 factorizations are 2*3, 2*5, 2*7, 3*5, so that (a(1), a(2), a(3), a(4)) = (2,3,4,3).
		

Crossrefs

Programs

  • Mathematica
    mx = 350; t = Sort@Flatten@Table[Prime[n]*Prime[m], {n, Log[2, mx/3]}, {m, n + 1, PrimePi[mx/Prime[n]]}]; (* A006881, Robert G. Wilson v, Feb 07 2012 *)
    u = Table[FactorInteger[t[[k]]][[1]], {k, 1, Length[t]}];
    u1 = Table[u[[k]][[1]], {k, 1, Length[t]}]  (* A096916 *)
    PrimePi[u1]  (* A270650 *)
    v = Table[FactorInteger[t[[k]]][[2]], {k, 1, Length[t]}];
    v1 = Table[v[[k]][[1]], {k, 1, Length[t]}]  (* A070647 *)
    PrimePi[v1]  (* A270652 *)
    d = v1 - u1  (* A176881 *)
    Map[PrimePi[FactorInteger[#][[-1, 1]]] &, Select[Range@ 240, And[SquareFreeQ@ #, PrimeOmega@ # == 2] &]] (* Michael De Vlieger, Apr 25 2016 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, primefactors
    def A270652(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+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        return primepi(max(primefactors(bisection(f,n,n)))) # Chai Wah Wu, Oct 23 2024

A168472 Partial sums of products of two distinct primes (A006881).

Original entry on oeis.org

6, 16, 30, 45, 66, 88, 114, 147, 181, 216, 254, 293, 339, 390, 445, 502, 560, 622, 687, 756, 830, 907, 989, 1074, 1160, 1247, 1338, 1431, 1525, 1620, 1726, 1837, 1952, 2070, 2189, 2311, 2434, 2563, 2696, 2830, 2971, 3113, 3256, 3401, 3547, 3702, 3860, 4019
Offset: 1

Views

Author

Keywords

Programs

  • Maple
    N:= 1001: # to get all a(n) where A006881(n) < N
    Primes:= select(isprime, [2, seq(2*k+1, k=1..floor(N/2))]):
    L:= sort(convert({seq(seq(p*q, q=Primes[1..ListTools:-BinaryPlace(Primes, N/p)]), p=Primes)} minus {seq(p^2, p=Primes)},list)):
    ListTools:-PartialSums(L); # Robert Israel, Apr 29 2018
  • Mathematica
    f[n_]:=Last/@FactorInteger[n]=={1,1}; s=0;lst={};Do[If[f[n],AppendTo[lst,s+=n]],{n,6!}];lst
    With[{nn=50},Take[Accumulate[Union[Times@@@Subsets[Prime[Range[nn]],{2}]]],nn]] (* Harvey P. Dale, Aug 08 2013 *)

A166237 Differences between consecutive products of two distinct primes: a(n) = A006881(n+1) - A006881(n).

Original entry on oeis.org

4, 4, 1, 6, 1, 4, 7, 1, 1, 3, 1, 7, 5, 4, 2, 1, 4, 3, 4, 5, 3, 5, 3, 1, 1, 4, 2, 1, 1, 11, 5, 4, 3, 1, 3, 1, 6, 4, 1, 7, 1, 1, 2, 1, 9, 3, 1, 2, 5, 11, 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, 4, 4, 3, 1, 2, 1, 1, 2, 4, 5, 5, 2, 2, 3, 1, 2, 5, 1, 4, 2, 5, 9, 3
Offset: 1

Views

Author

Keywords

Comments

Goldston, Graham, Pintz & Yıldırım (2005) prove that a(n+1) - a(n) <= 26 infinitely often. - Charles R Greathouse IV, Dec 26 2020

Crossrefs

Cf. A006881 (products of two distinct primes), A001358 (semiprimes: products of two primes), A065516 (differences between products of two primes), A001223 (differences between consecutive primes).

Programs

  • Magma
    T:=[ n: n in [1..360] | #PrimeDivisors(n) eq 2 and &*[ d[2]: d in Factorization(n) ] eq 1 ]; [ T[j+1]-T[j]: j in [1..#T-1] ]; // Klaus Brockhaus, Oct 13 2009
  • Mathematica
    f[n_]:=Last/@FactorInteger[n]=={1,1}; a=6;lst={};Do[If[f[n],AppendTo[lst,n-a];a=n],{n,9,6!}];lst
  • PARI
    {m=106; v=vector(m); n=0; c=0; while(cKlaus Brockhaus, Oct 13 2009
    

Extensions

Edited by Klaus Brockhaus, Oct 13 2009
Added formula to clarify the definition. - N. J. A. Sloane, Jul 19 2022

A048639 Binary encoding of A006881, numbers with two distinct prime divisors.

Original entry on oeis.org

3, 5, 9, 6, 10, 17, 33, 18, 65, 12, 129, 34, 257, 66, 20, 130, 513, 1025, 36, 258, 2049, 24, 4097, 68, 8193, 514, 40, 1026, 16385, 132, 32769, 2050, 260, 65537, 72, 131073, 4098, 8194, 136, 262145, 16386, 524289, 48, 516, 1048577, 1028, 2097153, 32770
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Crossrefs

Permutation of A018900. Cf. A048640, A048623.

Programs

  • Maple
    encode_A006881 := proc(upto_n) local b,i; b := [ ]; for i from 1 to upto_n do if((0 <> mobius(i)) and (4 = tau(i))) then b := [ op(b), bef(i) ]; fi; od: RETURN(b); end; # see A048623 for bef
  • Mathematica
    Total[2^PrimePi@ # &@ (Map[First, FactorInteger@ #] - 1)] & /@ Select[Range@ 160, SquareFreeQ@ # && PrimeOmega@ # == 2 &] (* Michael De Vlieger, Oct 01 2015 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (issquarefree(n) && bigomega(n)==2, f = factor(n); x = sum(k=1, #f~, 2^(primepi(f[k,1])-1)); print1(x, ", ");););} \\ Michel Marcus, Oct 01 2015
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, primefactors
    def A048639(n):
        def f(x): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return sum(1<Chai Wah Wu, Feb 22 2025

Formula

a(n) = 2^(i-1) + 2^(j-1), where A006881(n) = p_i*p_j (p_i and p_j stand for the i-th and j-th primes respectively, where the first prime is 2).

A228578 Sum of the distinct prime factors of the squarefree semiprimes (A006881).

Original entry on oeis.org

5, 7, 9, 8, 10, 13, 15, 14, 19, 12, 21, 16, 25, 20, 16, 22, 31, 33, 18, 26, 39, 18, 43, 22, 45, 32, 20, 34, 49, 24, 55, 40, 28, 61, 24, 63, 44, 46, 26, 69, 50, 73, 24, 34, 75, 36, 81, 56, 30, 85, 62, 91, 64, 42, 28, 99, 70, 103, 36, 46, 105, 30, 74, 109, 48, 38, 111
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 28 2013

Keywords

Comments

Sum of the distinct prime factors of A006881(n). If A006881(n) is even then a(n) = A006881(n)/2 + 2. If A006881(n) is odd then a(n) is even.

Examples

			a(1) = 5, since 6 is the first squarefree semiprime and the sum of the distinct prime factors of 6 is 2 + 3 = 5. a(2) = 7 since 10 is the second squarefree semiprime and the sum of the distinct prime factors of 10 is 2 + 5 = 7.
		

Crossrefs

Programs

  • Mathematica
    Total[First /@ FactorInteger@ #] & /@ Select[Range@ 240, PrimeNu@ # == 2 && SquareFreeQ@ # &] (* Michael De Vlieger, Oct 28 2015 *)
  • PARI
    do(x)=my(v=List()); forprime(p=3,x\2, forprime(q=2,min(x\p,p-1), listput(v,[p*q,p+q]))); v=vecsort(Vec(v),1); apply(u->u[2],v) \\ Charles R Greathouse IV, Nov 05 2017
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, primefactors
    def A228578(n):
        def f(x): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return sum(primefactors(m)) # Chai Wah Wu, Aug 16 2024

Formula

a(n) = sopf(A006881(n)) = A008472(A006881(n)).
Also, a(n) = sopfr(A006881(n)) = A001414(A006881(n)) because A006881 are squarefree. - Zak Seidov, Oct 28 2015

Extensions

a(61)-a(67) corrected by Michael De Vlieger, Oct 28 2015

A324333 Numbers d such that A324331(x) = d^2 only when x is a squarefree semiprime (A006881).

Original entry on oeis.org

1, 2, 4, 6, 11, 12, 14, 16, 18, 20, 21, 22, 24, 25, 27, 29, 30, 32, 34, 35, 36, 38, 39, 41, 42, 43, 44, 45, 47, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 100
Offset: 1

Views

Author

Michel Marcus, Feb 23 2019

Keywords

Comments

Problem posed by Albert A. Mullin, who asks if this sequence is infinite.

Crossrefs

Cf. A324331, A324334 (complement).

A324334 Numbers d such that A324331(x)=d^2 not only for squarefree semiprimes x (A006881) but also for x in A324333.

Original entry on oeis.org

3, 5, 7, 8, 9, 10, 13, 15, 17, 19, 23, 26, 28, 31, 33, 37, 40, 46, 48, 49, 55, 61, 62, 63, 65, 78, 80, 82, 96, 99, 118, 122, 126, 127, 129, 142, 144, 145, 148, 157, 159, 163, 166, 172, 176, 179, 185, 226, 228, 230, 240, 242, 244, 246, 249, 255, 257, 258, 288, 296, 303, 320, 321, 328, 342, 354, 357, 358, 360
Offset: 1

Views

Author

Michel Marcus, Feb 23 2019

Keywords

Examples

			A324331(45) = 64, a square, even though 45 is not squarefree semiprime, so 8 is a term, and 45 is in A324332.
		

Crossrefs

Cf. A324331, A324332, A324333 (complement).

A154932 Decimal expansion of Sum_{q in A006881} 1/(q(q-1)) over the squarefree semiprimes q.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Jan 17 2009

Keywords

Comments

A variant of A152447.

Examples

			Equals 0.071606015364062950... = 1/(6*5) + 1/(10*9) + 1/(14*13) + 1/(15*14) + ...
		

Formula

Equals Sum_{j>=1} 1/(A006881(j)*(A006881(j)-1)) = A152447 - Sum_{p in A000040} 1/(p^2*(p^2-1)) = A152447 + A085548 - Sum_{p in A000040} 1/(p^2-1).
Showing 1-10 of 485 results. Next