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

A086971 Number of semiprime divisors of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 22 2003

Keywords

Comments

Inverse Moebius transform of A064911. - Jonathan Vos Post, Dec 08 2004

References

  • G. H. Hardy and E. M. Wright, Section 17.10 in An Introduction to the Theory of Numbers, 5th ed., Oxford, England: Clarendon Press, 1979.

Crossrefs

Programs

  • Haskell
    a086971 = sum . map a064911 . a027750_row
    -- Reinhard Zumkeller, Dec 14 2012
  • Maple
    a:= proc(n) local l, m; l:=ifactors(n)[2]; m:=nops(l);
           m*(m-1)/2 +add(`if`(i[2]>1, 1, 0), i=l)
        end:
    seq(a(n), n=1..120);  # Alois P. Heinz, Jul 18 2013
  • Mathematica
    semiPrimeQ[n_] := PrimeOmega@ n == 2; f[n_] := Length@ Select[Divisors@ n, semiPrimeQ@# &]; Array[f, 105] (* Zak Seidov, Mar 31 2011 and modified by Robert G. Wilson v, Dec 08 2012 *)
    a[n_] := Count[e = FactorInteger[n][[;; , 2]], ?(# > 1 &)] + (o = Length[e])*(o - 1)/2; Array[a, 100] (* _Amiram Eldar, Jun 30 2022 *)
  • PARI
    /* The following definitions of a(n) are equivalent. */
    a(n) = sumdiv(n,d,bigomega(d)==2)
    a(n) = f=factor(n); j=matsize(f)[1]; sum(m=1,j,f[m,2]>=2) + binomial(j,2)
    a(n) = f=factor(n); j=omega(n); sum(m=1,j,f[m,2]>=2) + binomial(j,2)
    a(n) = omega(n/core(n)) + binomial(omega(n),2)
    /* Rick L. Shepherd, Mar 06 2006 */
    

Formula

a(n) = A106404(n) + A106405(n). - Reinhard Zumkeller, May 02 2005
a(n) = omega(n/core(n)) + binomial(omega(n),2) = A001221(n/A007913(n)) + binomial(A001221(n),2) = A056170(n) + A079275(n). - Rick L. Shepherd, Mar 06 2006
From Reinhard Zumkeller, Dec 14 2012: (Start)
a(n) = Sum_{k=1..A000005(n)} A064911(A027750(n,k)).
a(A220264(n)) = n and a(m) <> n for m < A220264(n); a(A008578(n)) = 0; a(A002808(n)) > 0; for n > 1: a(A102466(n)) <= 1 and a(A102467(n)) > 1; A066247(n) = A057427(a(n)). (End)
G.f.: Sum_{k = p*q, p prime, q prime} x^k/(1 - x^k). - Ilya Gutkovskiy, Jan 25 2017

Extensions

Entry revised by N. J. A. Sloane, Mar 28 2006

A205959 a(n) = n^omega(n)/rad(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 6, 1, 4, 3, 10, 1, 24, 1, 14, 15, 8, 1, 54, 1, 40, 21, 22, 1, 96, 5, 26, 9, 56, 1, 900, 1, 16, 33, 34, 35, 216, 1, 38, 39, 160, 1, 1764, 1, 88, 135, 46, 1, 384, 7, 250, 51, 104, 1, 486, 55, 224, 57, 58, 1, 7200, 1, 62, 189, 32, 65, 4356, 1, 136
Offset: 1

Views

Author

Peter Luschny, Feb 03 2012

Keywords

Comments

a(n) = exp(-Sum_{d in P} moebius(d)*log(n/d)) where P = {d : d divides n and d is prime}. This is a variant of the (exponential of the) von Mangoldt function where the divisors are restricted to prime divisors. The (exponential of the) summatory function is A205957. Apart from n=1 the value is 1 if and only if n is prime; the fixed points are the products of two distinct primes (A006881).

Crossrefs

Programs

  • Haskell
    a205959 n = product $ map (div n) $ a027748_row n
    -- Reinhard Zumkeller, Dec 15 2013
    
  • Maple
    with(numtheory): A205959 := proc(n) select(isprime, divisors(n));
    simplify(exp(-add(mobius(d)*log(n/d), d=%))) end:
    # Alternative:
    a := n -> local p; mul(n/p[1], p in ifactors(n)[2]):
    seq(a(n), n = 1..68); # Peter Luschny, Jul 19 2023
  • Mathematica
    a[n_] := Exp[-Sum[ MoebiusMu[d]*Log[n/d], {d, FactorInteger[n][[All, 1]]}]]; Table[a[n], {n, 1, 68}] (* Jean-François Alcover, Jan 15 2013 *)
  • PARI
    a(n)=my(f=factor(n)[,1]);prod(i=1,#f,n/f[i]) \\ Charles R Greathouse IV, Jun 27 2013
    
  • Python
    from math import prod
    from sympy import primefactors
    def A205959(n): return prod(n//p for p in primefactors(n)) # Chai Wah Wu, Jul 12 2023
  • Sage
    def A205959(n) :
        P = filter(is_prime, divisors(n))
        return simplify(exp(-add(moebius(d)*log(n/d) for d in P)))
    [A205959(n) for n in (1..60)]
    

Formula

a(n) = Product_{p|n} n/p. - Charles R Greathouse IV, Jun 27 2013
a(n) = Product_{k=1..A001221(n)} n/A027748(n,k). - Reinhard Zumkeller, Dec 15 2013
If n is squarefree, then a(n) = n^(omega(n)-1). - Wesley Ivan Hurt, Jun 09 2020
a(p^e) = p^(e-1) for p prime, e > 0. - Bernard Schott, Jun 09 2020

Extensions

New name from Charles R Greathouse IV, Jun 30 2013

A102466 Numbers such that the number of divisors is the sum of numbers of prime factors with and without repetitions.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 64, 65, 67, 69, 71, 73, 74, 77, 79, 81, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 101, 103, 106, 107, 109
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 09 2005

Keywords

Comments

A000005(a(n)) = A001221(a(n)) + A001222(a(n)); prime powers are a subsequence (A000961); complement of A102467; not the same as A085156.
Equals { n | omega(n)=1 or Omega(n)=2 }, that is, these are exactly the prime powers (>1) and semiprimes. - M. F. Hasler, Jan 14 2008
For n > 1: A086971(a(n)) <= 1. - Reinhard Zumkeller, Dec 14 2012

Crossrefs

Programs

  • Haskell
    a102466 n = a102466_list !! (n-1)
    a102466_list = [x | x <- [1..], a000005 x == a001221 x + a001222 x]
    -- Reinhard Zumkeller, Dec 14 2012
    
  • Maple
    with(numtheory):
    q:= n-> is(tau(n)=bigomega(n)+nops(factorset(n))):
    select(q, [$1..200])[];  # Alois P. Heinz, Jul 14 2023
  • Mathematica
    Select[Range[110],DivisorSigma[0,#]==PrimeOmega[#]+PrimeNu[#]&] (* Harvey P. Dale, Mar 09 2016 *)
  • PARI
    is(n)=my(f=factor(n)[,2]); #f==1 || f==[1,1]~ \\ Charles R Greathouse IV, Oct 19 2015
  • Sage
    def is_A102466(n) :
        return bool(sloane.A001221(n) == 1 or sloane.A001222(n) == 2)
    def A102466_list(n) :
        return [k for k in (1..n) if is_A102466(k)]
    A102466_list(109)  # Peter Luschny, Feb 08 2012
    

A322366 Number of integers k in {0,1,...,n} such that k identical test tubes can be balanced in a centrifuge with n equally spaced holes.

Original entry on oeis.org

1, 0, 2, 2, 3, 2, 5, 2, 5, 4, 7, 2, 11, 2, 9, 8, 9, 2, 17, 2, 17, 10, 13, 2, 23, 6, 15, 10, 23, 2, 29, 2, 17, 14, 19, 12, 35, 2, 21, 16, 37, 2, 41, 2, 35, 38, 25, 2, 47, 8, 47, 20, 41, 2, 53, 16, 51, 22, 31, 2, 59, 2, 33, 52, 33, 18, 65, 2, 53, 26, 67, 2, 71, 2, 39, 68, 59, 18, 77, 2, 77, 28, 43, 2, 83, 22, 45, 32, 79
Offset: 0

Views

Author

Alois P. Heinz, Dec 04 2018

Keywords

Comments

Numbers where a(n) + A000010(n) != n + 1: A102467. - Robert G. Wilson v, Aug 23 2021

Examples

			a(6) = |{0,2,3,4,6}| = 5.
a(9) = |{0,3,6,9}| = 4.
a(10) = |{0,2,4,5,6,8,10}| = 7.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local f, b; f, b:=
           map(i-> i[1], ifactors(n)[2]),
           proc(m, i) option remember; m=0 or i>0 and
            (b(m, i-1) or f[i]<=m and b(m-f[i], i))
           end; forget(b); (t-> add(
          `if`(b(j, t) and b(n-j, t), 1, 0), j=0..n))(nops(f))
        end:
    seq(a(n), n=0..100);
  • Mathematica
    $RecursionLimit = 4096;
    a[1] = 0;
    a[n_] := a[n] = Module[{f, b}, f = FactorInteger[n][[All, 1]];
         b[m_, i_] := b[m, i] = m == 0 || i > 0 &&
         (b[m, i - 1] || f[[i]] <= m && b[m - f[[i]], i]);
         With[{t = Length[f]}, Sum[
         If[b[j, t] && b[n - j, t], 1, 0], {j, 0, n}]]];
    Table[a[n], {n, 0, 1000}] (* Jean-François Alcover, Dec 13 2018, after Alois P. Heinz, corrected and updated Aug 07 2021 *)
    f[n_] := Block[{c = 2, k = 2, p = First@# & /@ FactorInteger@ n}, While[k < n, If[ IntegerPartitions[k, All, p, 1] != {} && IntegerPartitions[n - k, All, p, 1] != {}, c++]; k++]; c]; f[0] = 1; f[1] = 0; Array[f, 75] (* Robert G. Wilson v, Aug 22 2021 *)

Formula

a(n) = |{ k : k and n-k can be written as a sum of prime factors of n }|.
a(n) = 2 <=> n is prime (A000040).
a(n) >= n-1 <=> n in {1,2,3,4} union { A008588 }.
a(n) = (n+4)/2 <=> n in { A100484 } minus { 4 }.
a(n) = (n+9)/3 <=> n in { A001748 } minus { 9 }.
a(n) = (n+25)/5 <=> n in { A001750 } minus { 25 }.
a(n) = (n+49)/7 <=> n in { A272470 } minus { 49 }.
a(n^2) = n+1 <=> n = 0 or n is prime <=> n in { A182986 }.
a(A001248(n)) = A008864(n).
a(n) is odd <=> n in { A163300 }.
a(n) is even <=> n in { A004280 }.

A135767 sigma_0(n)-omega(n)-Omega(n) (sigma_0 = A000005 = # divisors, omega = A001221 = # prime factors, Omega = A001222 = # prime factors with multiplicity).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jan 14 2008

Keywords

Comments

A102467 = { n | a(n)>0 } ; A102466 = { n | a(n)=0 } = { n | omega(n)=1 or Omega(n)=2 }: these are exactly the prime powers (>1) and semiprimes. For all other numbers a(n) > 0 since for each of the Omega(n) prime power divisors, other divisors are obtained by multiplying it with another prime factor, which gives more than omega(n) different additional divisors. a(n)>0 is also equivalent to A001037(n) > A107847(n), i.e. there are strictly fewer nonzero sums of non-periodic subsets of U_n (n-th roots of unity) than there are non-periodic binary words of length n. Otherwise stated, a(n)>0 if there is a non-periodic subset of U_n with zero sum. Non-periodic means having no rotational symmetry (except for identity).

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSigma[0, n] - PrimeOmega[n] - PrimeNu[n];
    Array[a, 105] (* Jean-François Alcover, Jun 21 2018 *)
  • PARI
    A135767(n)=numdiv(n)-omega(n)-bigomega(n)

Formula

a(n)=0 <=> omega(n)=1 or Omega(n)=2 <=> n is semiprime or a prime power (>1) <=> A001037(n) = A107847(n) <=> all non-periodic subsets of U_n have nonzero sum

A216153 The partial products of a(n) are the distinct values of the exponential of the von Mangoldt function modified by restricting the divisors to prime divisors (A205957).

Original entry on oeis.org

1, 2, 6, 4, 3, 10, 24, 14, 15, 8, 54, 40, 21, 22, 96, 5, 26, 9, 56, 900, 16, 33, 34, 35, 216, 38, 39, 160, 1764, 88, 135, 46, 384, 7, 250, 51, 104, 486, 55, 224, 57, 58, 7200, 62, 189, 32, 65, 4356, 136, 69, 4900, 864, 74, 375, 152, 77, 6084, 640, 27, 82
Offset: 1

Views

Author

Peter Luschny, Sep 02 2012

Keywords

Comments

The partial products of a(n) are A216152(n) which are the distinct values of the 'prime lcm(n)' A205957.
Let b(n) denote the nonprime numbers A018252(n).
If n = 1 then a(n) = b(n) = 1
else if a(n) < b(n) then
a(n) is a cototient of consecutive pure powers of primes (A053211),
b(n) is a prime power with exponent > 1 (A025475),
b(n)/a(n) is a prime root of n-th nontrivial prime power (A025476);
else if a(n) > b(n) then
b(n) is a number which is neither a prime power nor a semiprime (A102467);
else if a(n) = b(n) then
a(n) is the product of two distinct primes (A006881).

Crossrefs

Programs

  • Mathematica
    A205957[n_] := Exp[-Sum[ MoebiusMu[p]*Log[k/p], {k, 1, n}, {p, FactorInteger[k][[All, 1]]}]]; nonPrime[1] = 1; nonPrime[n_] := Which[k0 = k /. FindRoot[ n + PrimePi[k] == k , {k, n}] // Floor; n+PrimePi[k0] == k0, k0 , n+PrimePi[k0+1] == k0+1, k0+1, n+PrimePi[k0+2] == k0+2, k0+2, True, k0]; a[1] = 1; a[n_] := A205957[nonPrime[n]] / A205957[nonPrime[n-1]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Jun 27 2013 *)
  • Sage
    def A216153(n):
        if n == 1 : return 1
        return A205957(A018252(n))/A205957(A018252(n-1))

Formula

a(n) = A205957(A018252(n))/A205957(A018252(n-1)) for n > 1, a(1) = 1.

A164865 Sum of the distinct semiprime divisors of the n-th number with two or more distinct semiprime divisors.

Original entry on oeis.org

10, 15, 14, 10, 18, 31, 19, 14, 41, 26, 24, 10, 35, 30, 15, 18, 35, 30, 61, 38, 59, 19, 40, 42, 71, 14, 45, 26, 40, 50, 10, 63, 42, 39, 91, 30, 71, 19, 87, 18, 101, 62, 48, 35, 66, 50, 101, 65, 24, 38, 121, 63, 19, 70, 78, 56, 42, 60, 113, 75, 14, 15, 86, 103, 45, 129, 66, 90
Offset: 1

Views

Author

Jonathan Vos Post, Aug 28 2009

Keywords

Comments

The sum of semiprime divisors of all k such that A086971(k) > 1.
This sum is prime for k = 30, 36, 60, 72, and infinitely more values (every prime power of every primitive element).

Examples

			a(1) = 10 because the 1st number with 2 or more distinct semiprime divisors is k=12=A102467(2), as A001358(1) = 4, 4|12, A001358(2) = 6, 6|12, and 4+6 = 10.
a(6) = 31 because the 6th number with multiple distinct semiprime factors is k=30=A102467(7), the semiprimes 6, 10, and 15 divide 30, and 6 + 10 + 15 = 31.
		

Crossrefs

Programs

  • Maple
    isA001358 := proc(n) RETURN( numtheory[bigomega](n) =2 ) ; end:
    A086971 := proc(n) local a,d; a := 0 ; for d in numtheory[divisors](n) do if isA001358(d) then a := a+1; fi; od; a ; end:
    A102467 := proc(n) local a; if n = 1 then 1; else for a from procname(n-1)+1 do if A086971(a) >= 2 then RETURN(a) ; fi; od: fi; end:
    A076290 := proc(n) local a,d; a := 0 ; for d in numtheory[divisors](n) do if isA001358(d) then a := a+d; fi; od; a ; end:
    A164865 := proc(n) A076290( A102467(n+1)) ; end: seq(A164865(n),n=1..120) ; # R. J. Mathar, Aug 31 2009
  • Mathematica
    sdsd[n_]:=Module[{spd=Select[Divisors[n],PrimeOmega[#]==2&]}, If[ Length[ spd]> 1,Total[spd],0]]; DeleteCases[Array[sdsd,200],0] (* Harvey P. Dale, Oct 29 2015 *)

Formula

a(n) = Sum_(k|A102467(n) and k in A001358) k.
a(n) = A076290( A102467(n+1)). - R. J. Mathar, Aug 31 2009

Extensions

Corrected and extended by R. J. Mathar, Aug 31 2009

A180411 Sum of the semiprime divisors (with repetition) of the n-th number with two or more distinct semiprime divisors.

Original entry on oeis.org

16, 21, 24, 30, 32, 31, 37, 42, 41, 48, 39, 48, 45, 56, 45, 54, 51, 51, 61, 72, 59, 57, 55, 80, 71, 64, 65, 78, 61, 96, 70, 77, 75, 69, 91, 90, 71, 67, 87, 80, 101, 120, 87, 75, 128, 77, 101, 93, 72, 114, 121, 87, 81, 91, 152, 81, 126, 111, 113, 107, 90, 78, 168, 103, 93, 129, 123, 176
Offset: 1

Views

Author

Jonathan Vos Post, Sep 02 2010

Keywords

Comments

This is to A164865 [Sum of the distinct semiprime divisors of the n-th number with two or more distinct semiprime divisors], as bigomega [A001222, Number of prime divisors of n (counted with multiplicity)] is to omega [A001221, Number of distinct primes dividing n].
The sum of semiprime divisors (with multiplicity) of all k such that A086971(k) > 1.
This is to A001414 [Integer log of n: sum of primes dividing n (with repetition)], as semiprimes A001358 are to primes A000040.

Examples

			a(1) = 16 because the first number (greater than 1) such that the sum of numbers of prime factors with and without repetitions does not equal the number of divisors, is a(2) = 12 = (2^2)*3 whose semiprime factors are (2^2 = 4) once and (2*3) with multiplicity two hence (4*1)*1 + (3*3)*2 = 4 + 12 = 16.
a(6) = 31 because 30 = 2*3*5 has multiplicity one semiprime factors (2*3), (2*5), (3*5), which sum to 6+10+15 = 31.
		

Crossrefs

Formula

a(n) = A163407(A102467(n+1)).

Extensions

Formula, edits, and more terms from Charles R Greathouse IV, Sep 03 2010
Showing 1-8 of 8 results.