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

A374830 Decimal expansion of 17*(5 - 3*A136141)/100.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Jul 21 2024

Keywords

Comments

Lower bound of Product_{p prime} (1 - (1/(p*(p - 1)))*p^2/(p^2 + 1)) = A374831.

Examples

			0.45569009878460448478917259547346937823444191859757511536...
		

Crossrefs

Programs

  • PARI
    17*(5 - 3*sumeulerrat(1/(p*(p-1))))/100 \\ Amiram Eldar, Aug 20 2024

Formula

Equals (3/5)*(17/20)*(1 - (A136141 - (1/2 + 1/6))) (see Jakimczuk).
Equals (125/153)*A374829.

A374829 Decimal expansion of 5*(5 - 3*A136141)/36.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Jul 21 2024

Keywords

Comments

Lower bound of Artin's constant A005596.

Examples

			0.3722958323403631411676246695044684462699688877431169243...
		

Crossrefs

Programs

  • PARI
    5*(5 - 3*sumeulerrat(1/(p*(p-1))))/36 \\ Amiram Eldar, Aug 20 2024

Formula

Equals (1/2)*(5/6)*(1 - (A136141 - (1/2 + 1/6))) (see Jakimczuk).
Equals (153/125)*A374830.

A000961 Powers of primes. Alternatively, 1 and the prime powers (p^k, p prime, k >= 1).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227
Offset: 1

Views

Author

Keywords

Comments

The term "prime power" is ambiguous. To a mathematician it means any number p^k, p prime, k >= 0, including p^0 = 1.
Any nonzero integer is a product of primes and units, where the units are +1 and -1. This is tied to the Fundamental Theorem of Arithmetic which proves that the factorizations are unique up to order and units. (So, since 1 = p^0 does not have a well defined prime base p, it is sometimes not regarded as a prime power. See A246655 for the sequence without 1.)
These numbers are (apart from 1) the numbers of elements in finite fields. - Franz Vrabec, Aug 11 2004
Numbers whose divisors form a geometrical progression. The divisors of p^k are 1, p, p^2, p^3, ..., p^k. - Amarnath Murthy, Jan 09 2002
These are also precisely the orders of those finite affine planes that are known to exist as of today. (The order of a finite affine plane is the number of points in an arbitrarily chosen line of that plane. This number is unique for all lines comprise the same number of points.) - Peter C. Heinig (algorithms(AT)gmx.de), Aug 09 2006
Except for first term, the index of the second number divisible by n in A002378, if the index equals n. - Mats Granvik, Nov 18 2007
These are precisely the numbers such that lcm(1,...,m-1) < lcm(1,...,m) (=A003418(m) for m>0; here for m=1, the l.h.s. is taken to be 0). We have a(n+1)=a(n)+1 if a(n) is a Mersenne prime or a(n)+1 is a Fermat prime; the converse is true except for n=7 (from Catalan's conjecture) and n=1, since 2^1-1 and 2^0+1 are not considered as Mersenne resp. Fermat prime. - M. F. Hasler, Jan 18 2007, Apr 18 2010
The sequence is A000015 without repetitions, or more formally, A000961=Union[A000015]. - Zak Seidov, Feb 06 2008
Except for a(1)=1, indices for which the cyclotomic polynomial Phi[k] yields a prime at x=1, cf. A020500. - M. F. Hasler, Apr 04 2008
Also, {A138929(k) ; k>1} = {2*A000961(k) ; k>1} = {4,6,8,10,14,16,18,22,26,32,34,38,46,50,54,58,62,64,74,82,86,94,98,...} are exactly the indices for which Phi[k](-1) is prime. - M. F. Hasler, Apr 04 2008
A143201(a(n)) = 1. - Reinhard Zumkeller, Aug 12 2008
Number of distinct primes dividing n=omega(n) < 2. - Juri-Stepan Gerasimov, Oct 30 2009
Numbers n such that Sum_{p-1|p is prime and divisor of n} = Product_{p-1|p is prime and divisor of n}. A055631(n) = A173557(n-1). - Juri-Stepan Gerasimov, Dec 09 2009, Mar 10 2010
Numbers n such that A028236(n) = 1. Klaus Brockhaus, Nov 06 2010
A188666(k) = a(k+1) for k: 2*a(k) <= k < 2*a(k+1), k > 0; notably a(n+1) = A188666(2*a(n)). - Reinhard Zumkeller, Apr 25 2011
A003415(a(n)) = A192015(n); A068346(a(n)) = A192016(n); a(n)=A192134(n) + A192015(n). - Reinhard Zumkeller, Jun 26 2011
A089233(a(n)) = 0. - Reinhard Zumkeller, Sep 04 2013
The positive integers n such that every element of the symmetric group S_n which has order n is an n-cycle. - W. Edwin Clark, Aug 05 2014
Conjecture: these are numbers m such that Sum_{k=0..m-1} k^phi(m) == phi(m) (mod m), where phi(m) = A000010(m). - Thomas Ordowski and Giovanni Resta, Jul 25 2018
Numbers whose (increasingly ordered) divisors are alternatingly squares and nonsquares. - Michel Marcus, Jan 16 2019
Possible numbers of elements in a finite vector space. - Jianing Song, Apr 22 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • M. Koecher and A. Krieg, Ebene Geometrie, Springer, 1993.
  • R. Lidl and H. Niederreiter, Introduction to Finite Fields and Their Applications, Cambridge 1986, Theorem 2.5, p. 45.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. Also A001597 is the sequence of nontrivial powers n^k, n >= 1, k >= 2. - N. J. A. Sloane, Mar 24 2018
Cf. indices of record values of A003418; A000668 and A019434 give a member of twin pairs a(n+1)=a(n)+1.
A138929(n) = 2*a(n).
A028236 (if n = Product (p_j^k_j), a(n) = numerator of Sum 1/p_j^k_j). - Klaus Brockhaus, Nov 06 2010
A000015(n) = Min{term : >= n}; A031218(n) = Max{term : <= n}.
Complementary (in the positive integers) to sequence A024619. - Jason Kimberley, Nov 10 2015

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a000961 n = a000961_list !! (n-1)
    a000961_list = 1 : g (singleton 2) (tail a000040_list) where
    g s (p:ps) = m : g (insert (m * a020639 m) $ insert p s') ps
    where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 01 2012, Apr 25 2011
    
  • Magma
    [1] cat [ n : n in [2..250] | IsPrimePower(n) ]; // corrected by Arkadiusz Wesolowski, Jul 20 2012
    
  • Maple
    readlib(ifactors): for n from 1 to 250 do if nops(ifactors(n)[2])=1 then printf(`%d,`,n) fi: od:
    # second Maple program:
    a:= proc(n) option remember; local k; for k from
          1+a(n-1) while nops(ifactors(k)[2])>1 do od; k
        end: a(1):=1: A000961:= a:
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 08 2013
  • Mathematica
    Select[ Range[ 2, 250 ], Mod[ #, # - EulerPhi[ # ] ] == 0 & ]
    Select[ Range[ 2, 250 ], Length[FactorInteger[ # ] ] == 1 & ]
    max = 0; a = {}; Do[m = FactorInteger[n]; w = Sum[m[[k]][[1]]^m[[k]][[2]], {k, 1, Length[m]}]; If[w > max, AppendTo[a, n]; max = w], {n, 1, 1000}]; a (* Artur Jasinski *)
    Join[{1}, Select[Range[2, 250], PrimePowerQ]] (* Jean-François Alcover, Jul 07 2015 *)
  • PARI
    A000961(n,l=-1,k=0)=until(n--<1,until(lA000961(lim=999,l=-1)=for(k=1,lim, l==lcm(l,k) && next; l=lcm(l,k); print1(k,",")) \\ M. F. Hasler, Jan 18 2007
    
  • PARI
    isA000961(n) = (omega(n) == 1 || n == 1) \\ Michael B. Porter, Sep 23 2009
    
  • PARI
    nextA000961(n)=my(m,r,p);m=2*n;for(e=1,ceil(log(n+0.01)/log(2)),r=(n+0.01)^(1/e);p=prime(primepi(r)+1);m=min(m,p^e));m \\ Michael B. Porter, Nov 02 2009
    
  • PARI
    is(n)=isprimepower(n) || n==1 \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    list(lim)=my(v=primes(primepi(lim)),u=List([1])); forprime(p=2,sqrtint(lim\1),for(e=2,log(lim+.5)\log(p),listput(u,p^e))); vecsort(concat(v,Vec(u))) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import primerange
    def A000961_list(limit): # following Python style, list terms < limit
        L = [1]
        for p in primerange(1, limit):
            pe = p
            while pe < limit:
                L.append(pe)
                pe *= p
        return sorted(L) # Chai Wah Wu, Sep 08 2014, edited by M. F. Hasler, Jun 16 2022
    
  • Python
    from sympy import primepi
    from sympy.ntheory.primetest import integer_nthroot
    def A000961(n):
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024
  • Sage
    def A000961_list(n):
        R = [1]
        for i in (2..n):
            if i.is_prime_power(): R.append(i)
        return R
    A000961_list(227) # Peter Luschny, Feb 07 2012
    

Formula

a(n) = A025473(n)^A025474(n). - David Wasserman, Feb 16 2006
a(n) = A117331(A117333(n)). - Reinhard Zumkeller, Mar 08 2006
Panaitopol (2001) gives many properties, inequalities and asymptotics, including a(n) ~ prime(n). - N. J. A. Sloane, Oct 31 2014, corrected by M. F. Hasler, Jun 12 2023 [The reference gives pi*(x) = pi(x) + pi(sqrt(x)) + ... where pi*(x) counts the terms up to x, so it is the inverse function to a(n).]
m=a(n) for some n <=> lcm(1,...,m-1) < lcm(1,...,m), where lcm(1...0):=0 as to include a(1)=1. a(n+1)=a(n)+1 <=> a(n+1)=A019434(k) or a(n)=A000668(k) for some k (by Catalan's conjecture), except for n=1 and n=7. - M. F. Hasler, Jan 18 2007, Apr 18 2010
A001221(a(n)) < 2. - Juri-Stepan Gerasimov, Oct 30 2009
A008480(a(n)) = 1 for all n >= 1. - Alois P. Heinz, May 26 2018
Sum_{k=1..n} 1/a(k) ~ log(log(a(n))) + 1 + A077761 + A136141. - François Huppé, Jul 31 2024

Extensions

Description modified by Ralf Stephan, Aug 29 2014

A003415 a(n) = n' = arithmetic derivative of n: a(0) = a(1) = 0, a(prime) = 1, a(m*n) = m*a(n) + n*a(m).

Original entry on oeis.org

0, 0, 1, 1, 4, 1, 5, 1, 12, 6, 7, 1, 16, 1, 9, 8, 32, 1, 21, 1, 24, 10, 13, 1, 44, 10, 15, 27, 32, 1, 31, 1, 80, 14, 19, 12, 60, 1, 21, 16, 68, 1, 41, 1, 48, 39, 25, 1, 112, 14, 45, 20, 56, 1, 81, 16, 92, 22, 31, 1, 92, 1, 33, 51, 192, 18, 61, 1, 72, 26, 59, 1, 156, 1, 39, 55, 80, 18, 71
Offset: 0

Views

Author

Keywords

Comments

Can be extended to negative numbers by defining a(-n) = -a(n).
Based on the product rule for differentiation of functions: for functions f(x) and g(x), (fg)' = f'g + fg'. So with numbers, (ab)' = a'b + ab'. This implies 1' = 0. - Kerry Mitchell, Mar 18 2004
The derivative of a number x with respect to a prime number p as being the number "dx/dp" = (x-x^p)/p, which is an integer due to Fermat's little theorem. - Alexandru Buium, Mar 18 2004
The relation (ab)' = a'b + ab' implies 1' = 0, but it does not imply p' = 1 for p a prime. In fact, any function f defined on the primes can be extended uniquely to a function on the integers satisfying this relation: f(Product_i p_i^e_i) = (Product_i p_i^e_i) * (Sum_i e_i*f(p_i)/p_i). - Franklin T. Adams-Watters, Nov 07 2006
See A131116 and A131117 for record values and where they occur. - Reinhard Zumkeller, Jun 17 2007
Let n be the product of a multiset P of k primes. Consider the k-dimensional box whose edges are the elements of P. Then the (k-1)-dimensional surface of this box is 2*a(n). For example, 2*a(25) = 20, the perimeter of a 5 X 5 square. Similarly, 2*a(18) = 42, the surface area of a 2 X 3 X 3 box. - David W. Wilson, Mar 11 2011
The arithmetic derivative n' was introduced, probably for the first time, by the Spanish mathematician José Mingot Shelly in June 1911 with "Una cuestión de la teoría de los números", work presented at the "Tercer Congreso Nacional para el Progreso de las Ciencias, Granada", cf. link to the abstract on Zentralblatt MATH, and L. E. Dickson, History of the Theory of Numbers. - Giorgio Balzarotti, Oct 19 2013
a(A235991(n)) odd; a(A235992(n)) even. - Reinhard Zumkeller, Mar 11 2014
Sequence A157037 lists numbers with prime arithmetic derivative, i.e., indices of primes in this sequence. - M. F. Hasler, Apr 07 2015
Maybe the simplest "natural extension" of the arithmetic derivative, in the spirit of the above remark by Franklin T. Adams-Watters (2006), is the "pi based" version where f(p) = primepi(p), see sequence A258851. When f is chosen to be the identity map (on primes), one gets A066959. - M. F. Hasler, Jul 13 2015
When n is composite, it appears that a(n) has lower bound 2*sqrt(n), with equality when n is the square of a prime, and a(n) has upper bound (n/2)*log_2(n), with equality when n is a power of 2. - Daniel Forgues, Jun 22 2016
If n = p1*p2*p3*... where p1, p2, p3, ... are all the prime factors of n (not necessarily distinct), and h is a real number (we assume h nonnegative and < 1), the arithmetic derivative of n is equivalent to n' = lim_{h->0} ((p1+h)*(p2+h)*(p3+h)*... - (p1*p2*p3*...))/h. It also follows that the arithmetic derivative of a prime is 1. We could assume h = 1/N, where N is an integer; then the limit becomes {N -> oo}. Note that n = 1 is not a prime and plays the role of constant. - Giorgio Balzarotti, May 01 2023

Examples

			6' = (2*3)' = 2'*3 + 2*3' = 1*3 + 2*1 = 5.
Note that, for example, 2' + 3' = 1 + 1 = 2, (2+3)' = 5' = 1. So ' is not linear.
G.f. = x^2 + x^3 + 4*x^4 + x^5 + 5*x^6 + x^7 + 12*x^8 + 6*x^9 + 7*x^10 + ...
		

References

  • G. Balzarotti, P. P. Lava, La derivata aritmetica, Editore U. Hoepli, Milano, 2013.
  • E. J. Barbeau, Problem, Canad. Math. Congress Notes, 5 (No. 8, April 1973), 6-7.
  • L. E. Dickson, History of the Theory of Numbers, Vol. 1, Chapter XIX, p. 451, Dover Edition, 2005. (Work originally published in 1919.)
  • A. M. Gleason et al., The William Lowell Putnam Mathematical Competition: Problems and Solutions 1938-1964, Math. Assoc. America, 1980, p. 295.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A086134 (least prime factor of n').
Cf. A086131 (greatest prime factor of n').
Cf. A068719 (derivative of 2n).
Cf. A068720 (derivative of n^2).
Cf. A068721 (derivative of n^3).
Cf. A001787 (derivative of 2^n).
Cf. A027471 (derivative of 3^(n-1)).
Cf. A085708 (derivative of 10^n).
Cf. A068327 (derivative of n^n).
Cf. A024451 (derivative of p#).
Cf. A068237 (numerator of derivative of 1/n).
Cf. A068238 (denominator of derivative of 1/n).
Cf. A068328 (derivative of squarefree numbers).
Cf. A068311 (derivative of n!).
Cf. A168386 (derivative of n!!).
Cf. A260619 (derivative of hyperfactorial(n)).
Cf. A260620 (derivative of superfactorial(n)).
Cf. A068312 (derivative of triangular numbers).
Cf. A068329 (derivative of Fibonacci(n)).
Cf. A096371 (derivative of partition number).
Cf. A099301 (derivative of d(n)).
Cf. A099310 (derivative of phi(n)).
Cf. A342925 (derivative of sigma(n)).
Cf. A349905 (derivative of prime shift).
Cf. A327860 (derivative of primorial base exp-function).
Cf. A369252 (derivative of products of three odd primes), A369251 (same sorted).
Cf. A068346 (second derivative of n).
Cf. A099306 (third derivative of n).
Cf. A258644 (fourth derivative of n).
Cf. A258645 (fifth derivative of n).
Cf. A258646 (sixth derivative of n).
Cf. A258647 (seventh derivative of n).
Cf. A258648 (eighth derivative of n).
Cf. A258649 (ninth derivative of n).
Cf. A258650 (tenth derivative of n).
Cf. A185232 (n-th derivative of n).
Cf. A258651 (A(n,k) = k-th arithmetic derivative of n).
Cf. A085731 (gcd(n,n')), A083345 (n'/gcd(n,n')), A057521 (gcd(n, (n')^k) for k>1).
Cf. A342014 (n' mod n), A369049 (n mod n').
Cf. A341998 (A003557(n')), A342001 (n'/A003557(n)).
Cf. A098699 (least x such that x' = n, antiderivative of n).
Cf. A098700 (n such that x' = n has no integer solution).
Cf. A099302 (number of solutions to x' = n).
Cf. A099303 (greatest x such that x' = n).
Cf. A051674 (n such that n' = n).
Cf. A083347 (n such that n' < n).
Cf. A083348 (n such that n' > n).
Cf. A099304 (least k such that (n+k)' = n' + k').
Cf. A099305 (number of solutions to (n+k)' = n' + k').
Cf. A328235 (least k > 0 such that (n+k)' = u * n' for some natural number u).
Cf. A328236 (least m > 1 such that (m*n)' = u * n' for some natural number u).
Cf. A099307 (least k such that the k-th arithmetic derivative of n is zero).
Cf. A099308 (k-th arithmetic derivative of n is zero for some k).
Cf. A099309 (k-th arithmetic derivative of n is nonzero for all k).
Cf. A129150 (n-th derivative of 2^3).
Cf. A129151 (n-th derivative of 3^4).
Cf. A129152 (n-th derivative of 5^6).
Cf. A189481 (x' = n has a unique solution).
Cf. A190121 (partial sums).
Cf. A258057 (first differences).
Cf. A229501 (n divides the n-th partial sum).
Cf. A165560 (parity).
Cf. A235991 (n' is odd), A235992 (n' is even).
Cf. A327863, A327864, A327865 (n' is a multiple of 3, 4, 5).
Cf. A157037 (n' is prime), A192192 (n'' is prime), A328239 (n''' is prime).
Cf. A328393 (n' is squarefree), A328234 (squarefree and > 1).
Cf. A328244 (n'' is squarefree), A328246 (n''' is squarefree).
Cf. A328303 (n' is not squarefree), A328252 (n' is squarefree, but n is not).
Cf. A328248 (least k such that the (k-1)-th derivative of n is squarefree).
Cf. A328251 (k-th arithmetic derivative is never squarefree for any k >= 0).
Cf. A256750 (least k such that the k-th derivative is either 0 or has a factor p^p).
Cf. A327928 (number of distinct primes p such that p^p divides n').
Cf. A342003 (max. exponent k for any prime power p^k that divides n').
Cf. A327929 (n' has at least one divisor of the form p^p).
Cf. A327978 (n' is primorial number > 1).
Cf. A328243 (n' is a partial sum of primorial numbers and larger than one).
Cf. A328310 (maximal prime exponent of n' minus maximal prime exponent of n).
Cf. A328320 (max. prime exponent of n' is less than that of n).
Cf. A328321 (max. prime exponent of n' is >= that of n).
Cf. A328383 (least k such that the k-th derivative of n is either a multiple or a divisor of n, but not both).
Cf. A263111 (the ordinal transform of a).
Cf. A300251, A319684 (Möbius and inverse Möbius transform).
Cf. A305809 (Dirichlet convolution square).
Cf. A349133, A349173, A349394, A349380, A349618, A349619, A349620, A349621 (for miscellaneous Dirichlet convolutions).
Cf. A069359 (similar formula which agrees on squarefree numbers).
Cf. A258851 (the pi-based arithmetic derivative of n).
Cf. A328768, A328769 (primorial-based arithmetic derivatives of n).
Cf. A328845, A328846 (Fibonacci-based arithmetic derivatives of n).
Cf. A302055, A327963, A327965, A328099 (for other variants and modifications).
Cf. A038554 (another sequence using "derivative" in its name, but involving binary expansion of n).
Cf. A322582, A348507 (lower and upper bounds), also A002620.

Programs

  • GAP
    A003415:= Concatenation([0,0],List(List([2..10^3],Factors),
    i->Product(i)*Sum(i,j->1/j))); # Muniru A Asiru, Aug 31 2017
    (APL, Dyalog dialect) A003415 ← { ⍺←(0 1 2) ⋄ ⍵≤1:⊃⍺ ⋄ 0=(3⊃⍺)|⍵:((⊃⍺+(2⊃⍺)×(⍵÷3⊃⍺)) ((2⊃⍺)×(3⊃⍺)) (3⊃⍺)) ∇ ⍵÷3⊃⍺ ⋄ ((⊃⍺) (2⊃⍺) (1+(3⊃⍺))) ∇ ⍵} ⍝ Antti Karttunen, Feb 18 2024
  • Haskell
    a003415 0 = 0
    a003415 n = ad n a000040_list where
      ad 1 _             = 0
      ad n ps'@(p:ps)
         | n < p * p     = 1
         | r > 0         = ad n ps
         | otherwise     = n' + p * ad n' ps' where
           (n',r) = divMod n p
    -- Reinhard Zumkeller, May 09 2011
    
  • Magma
    Ad:=func; [n le 1 select 0 else Ad(n): n in [0..80]]; // Bruno Berselli, Oct 22 2013
    
  • Maple
    A003415 := proc(n) local B,m,i,t1,t2,t3; B := 1000000000039; if n<=1 then RETURN(0); fi; if isprime(n) then RETURN(1); fi; t1 := ifactor(B*n); m := nops(t1); t2 := 0; for i from 1 to m do t3 := op(i,t1); if nops(t3) = 1 then t2 := t2+1/op(t3); else t2 := t2+op(2,t3)/op(op(1,t3)); fi od: t2 := t2-1/B; n*t2; end;
    A003415 := proc(n)
            local a,f;
            a := 0 ;
            for f in ifactors(n)[2] do
                    a := a+ op(2,f)/op(1,f);
            end do;
            n*a ;
    end proc: # R. J. Mathar, Apr 05 2012
  • Mathematica
    a[ n_] := If[ Abs @ n < 2, 0, n Total[ #2 / #1 & @@@ FactorInteger[ Abs @ n]]]; (* Michael Somos, Apr 12 2011 *)
    dn[0] = 0; dn[1] = 0; dn[n_?Negative] := -dn[-n]; dn[n_] := Module[{f = Transpose[FactorInteger[n]]}, If[PrimeQ[n], 1, Total[n*f[[2]]/f[[1]]]]]; Table[dn[n], {n, 0, 100}] (* T. D. Noe, Sep 28 2012 *)
  • PARI
    A003415(n) = {local(fac);if(n<1,0,fac=factor(n);sum(i=1,matsize(fac)[1],n*fac[i,2]/fac[i,1]))} /* Michael B. Porter, Nov 25 2009 */
    
  • PARI
    apply( A003415(n)=vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]), [0..99]) \\ M. F. Hasler, Sep 25 2013, updated Nov 27 2019
    
  • PARI
    A003415(n) = { my(s=0, m=1, spf); while(n>1, spf = A020639(n); n /= spf; s += m*n; m *= spf); (s); }; \\ Antti Karttunen, Mar 10 2021
    
  • PARI
    a(n) = my(f=factor(n), r=[1/(e+!e)|e<-f[,1]], c=f[,2]); n*r*c; \\ Ruud H.G. van Tol, Sep 03 2023
    
  • Python
    from sympy import factorint
    def A003415(n):
        return sum([int(n*e/p) for p,e in factorint(n).items()]) if n > 1 else 0
    # Chai Wah Wu, Aug 21 2014
    
  • Sage
    def A003415(n):
        F = [] if n == 0 else factor(n)
        return n * sum(g / f for f, g in F)
    [A003415(n) for n in range(79)] # Peter Luschny, Aug 23 2014
    

Formula

If n = Product p_i^e_i, a(n) = n * Sum (e_i/p_i).
a(m*p^p) = (m + a(m))*p^p, p prime: a(m*A051674(k))=A129283(m)*A051674(k). - Reinhard Zumkeller, Apr 07 2007
For n > 1: a(n) = a(A032742(n)) * A020639(n) + A032742(n). - Reinhard Zumkeller, May 09 2011
a(n) = n * Sum_{p|n} v_p(n)/p, where v_p(n) is the largest power of the prime p dividing n. - Wesley Ivan Hurt, Jul 12 2015
For n >= 2, Sum_{k=2..n} floor(1/a(k)) = pi(n) = A000720(n) (see K. T. Atanassov article). - Ivan N. Ianakiev, Mar 22 2019
From A.H.M. Smeets, Jan 17 2020: (Start)
Limit_{n -> oo} (1/n^2)*Sum_{i=1..n} a(i) = A136141/2.
Limit_{n -> oo} (1/n)*Sum_{i=1..n} a(i)/i = A136141.
a(n) = n if and only if n = p^p, where p is a prime number. (End)
Dirichlet g.f.: zeta(s-1)*Sum_{p prime} 1/(p^s-p), see A136141 (s=2), A369632 (s=3) [Haukkanen, Merikoski and Tossavainen]. - Sebastian Karlsson, Nov 25 2021
From Antti Karttunen, Nov 25 2021: (Start)
a(n) = Sum_{d|n} d * A349394(n/d).
For all n >= 1, A322582(n) <= a(n) <= A348507(n).
If n is not a prime, then a(n) >= 2*sqrt(n), or in other words, for all k >= 1 for which A002620(n)+k is not a prime, we have a(A002620(n)+k) > n. [See Ufnarovski and Åhlander, Theorem 9, point (3).]
(End)

Extensions

More terms from Michel ten Voorde, Apr 11 2001

A246655 Prime powers: numbers of the form p^k where p is a prime and k >= 1.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211
Offset: 1

Views

Author

Keywords

Comments

The elements are called prime powers in contrast to the powers of primes which are the numbers of the same form but with k >= 0, cf. A000961.
Every nonzero integer is the product of elements of this sequence which are relatively prime and an element of {-1, 1}. This product is up to a rearrangement of the factors unique. (This statement is the fundamental theorem of arithmetic.)
These numbers are the numbers such that the von Mangoldt function is nonzero.
These numbers are the numbers of elements in finite fields. - Franz Vrabec, Aug 11 2004
A positive integer n is a prime power if and only if nZ is a primary ideal of Z. - John Cremona, Sep 02 2014
Also, numbers n divisible by their cototients A051953(n). - Ivan Neretin, May 29 2016
Numbers n such that (theta_3(q) - theta_3(q^n)) / 2 is the g.f. of a multiplicative sequence. - Michael Somos, Oct 17 2016
Numbers that are evenly divisible by exactly one prime number. - Lee A. Newberg, May 07 2018
Ram proved that these are precisely the numbers n such that the binomial coefficients n!/(m!(n-m)!) for m = 1..n-1 have a common factor greater than 1 (which is the unique prime dividing n). See Joris, Oestreicher & Steinig for a generalization. - Charles R Greathouse IV, Apr 24 2019
Blagojević & Ziegler prove that for these n and for any convex polygon in the plane, the polygon can be partitioned into n polygons with equal area and equal perimeter. The result is conjectured (by Nandakumar & Rao, who proved the case n = 2) to hold for all n. - Charles R Greathouse IV, Apr 24 2019
Numbers n such that A367064(n) < 0. - Chai Wah Wu, Nov 06 2023
This sequence represents all positive high amplitude peaks of the inverse Riemann spectrum R(x)= Sum_{k=1..oo} -cos(log(x)*Im(z_k)) going over the imaginary part of the nontrivial zeros "Im(z_k)" in the Riemann zeta function. - Marc Morgenegg, Jul 29 2025

Crossrefs

There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. Also A001597 is the sequence of nontrivial powers n^k, n >= 1, k >= 2. - N. J. A. Sloane, Mar 24 2018
Partial sums of A275120.

Programs

  • Maple
    select(t -> nops(numtheory:-factorset(t))=1, [$1..1000]); # Robert Israel, Sep 01 2014
    A246655 := proc(n) A000961(n+1) end proc: # R. J. Mathar, Jan 09 2017
    isprimepower := n -> nops(NumberTheory:-PrimeFactors(n)) = 1: # Peter Luschny, Oct 09 2022
  • Mathematica
    Select[Range[222], PrimePowerQ]
  • PARI
    [p| p <- [1..222], isprimepower(p)]
    
  • PARI
    list(lim)=my(v=List(primes([2,lim\=1]))); for(e=2,logint(lim,2), forprime(p=2,sqrtnint(lim,e), listput(v,p^e))); Set(v) \\ Charles R Greathouse IV, Feb 03 2023
    
  • Python
    from sympy import primerange
    m = 10**5
    A246655 = []
    for p in primerange(1,m):
        pe = p
        while pe < m:
            A246655.append(pe)
            pe *= p
    A246655 = sorted(A246655) # Chai Wah Wu, Sep 04 2014
    
  • Python
    from sympy import primepi, integer_nthroot
    def A246655(n):
        def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 20 2024
  • Sage
    [n for n in (1..222) if sloane.A001221(n) == 1]
    

Formula

a(n) is characterized by A001221(a(n)) = 1.
a(n) is characterized by A014963(a(n)) != 1.
Euler's A000010(a(n)) = a(n)*(1 - 1/A014963(a(n))).
All three relations above are not true for A000961(n) instead of a(n).
Sum_{k=1..n} 1/a(k) ~ log(log(a(n))) + A077761 + A136141. - François Huppé, Jul 31 2024

A025475 1 and the prime powers p^m where m >= 2, thus excluding the primes.

Original entry on oeis.org

1, 4, 8, 9, 16, 25, 27, 32, 49, 64, 81, 121, 125, 128, 169, 243, 256, 289, 343, 361, 512, 529, 625, 729, 841, 961, 1024, 1331, 1369, 1681, 1849, 2048, 2187, 2197, 2209, 2401, 2809, 3125, 3481, 3721, 4096, 4489, 4913, 5041, 5329, 6241, 6561, 6859, 6889, 7921, 8192
Offset: 1

Views

Author

Keywords

Comments

Also nonprime n such that sigma(n)*phi(n) > (n-1)^2. - Benoit Cloitre, Apr 12 2002
If p is a term of the sequence, then the index n for which a(n) = p is given by n := b(p) := 1 + Sum_{k>=2} PrimePi(p^(1/k)). Here, the sum has floor(log_2(p)) positive terms. For any m > 0, the greatest number n such that a(n) <= m is also given by b(m), thus, b(m) is the number of such prime powers <= m. - Hieronymus Fischer, May 31 2013
That 8 and 9 are the only two consecutive integers in this sequence is known as Catalan's Conjecture and was proved in 2002 by Preda Mihăilescu. - Geoffrey Critzer, Nov 15 2015

Crossrefs

Subsequence of A000961. - Reinhard Zumkeller, Jun 22 2011
Differences give A053707.
Cf. A076048 (number of terms < 10^n).
There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. Also A001597 is the sequence of nontrivial powers n^k, n >= 1, k >= 2. - N. J. A. Sloane, Mar 24 2018

Programs

  • Haskell
    a025475 n = a025475_list !! (n-1)
    a025475_list = filter ((== 0) . a010051) a000961_list
    -- Reinhard Zumkeller, Jun 22 2011
    
  • Maple
    isA025475 := proc(n)
        if n < 1 then
            false;
        elif n = 1 then
            true;
        elif isprime(n) then
            false;
        elif nops(numtheory[factorset](n)) = 1 then
            true;
        else
            false;
        end if;
    end proc:
    A025475 := proc(n)
        option remember;
        local a;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA025475(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    # R. J. Mathar, Jun 06 2013
    # alternative:
    N:= 10^5: # to get all terms <= N
    Primes:= select(isprime, [2,(2*i+1 $ i = 1 .. floor((sqrt(N)-1)/2))]):
    sort([1,seq(seq(p^i, i=2..floor(log[p](N))),p=Primes)]); # Robert Israel, Jul 27 2015
  • Mathematica
    A025475 = Select[ Range[ 2, 10000 ], ! PrimeQ[ # ] && Mod[ #, # - EulerPhi[ # ] ] == 0 & ]
    A025475 = Sort[ Flatten[ Table[ Prime[n]^i, {n, 1, PrimePi[ Sqrt[10^4]]}, {i, 2, Log[ Prime[n], 10^4]}]]]
    {1}~Join~Select[Range[10^4], And[! PrimeQ@ #, PrimePowerQ@ #] &] (* Michael De Vlieger, Jul 04 2016 *)
    Join[{1},Select[Range[100000],PrimePowerQ[#]&&!PrimeQ[#]&]] (* Harvey P. Dale, Oct 29 2023 *)
  • PARI
    for(n=1,10000,if(sigma(n)*eulerphi(n)*(1-isprime(n))>(n-1)^2,print1(n,",")))
    
  • PARI
    is_A025475(n)={ ispower(n,,&p) && isprime(p) || n==1 }  \\ M. F. Hasler, Sep 25 2011
    
  • PARI
    list(lim)=my(v=List([1]),L=log(lim+.5));forprime(p=2,(lim+.5)^(1/3),for(e=3,L\log(p),listput(v,p^e))); vecsort(concat(Vec(v), apply(n->n^2,primes(primepi(sqrtint(lim\1)))))) \\ Charles R Greathouse IV, Nov 12 2012
    
  • PARI
    list(lim)=my(v=List([1])); for(m=2,logint(lim\=1,2), forprime(p=2,sqrtnint(lim,m), listput(v, p^m))); Set(v) \\ Charles R Greathouse IV, Aug 26 2015
    
  • Python
    from sympy import primerange
    A025475_list, m = [1], 10*2
    m2 = m**2
    for p in primerange(1,m):
        a = p**2
        while a < m2:
            A025475_list.append(a)
            a *= p
    A025475_list = sorted(A025475_list) # Chai Wah Wu, Sep 08 2014
    
  • Python
    from sympy import primepi, integer_nthroot
    def A025475(n):
        if n==1: return 1
        def f(x): return int(n-2+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 13 2024

Formula

The number of terms <= N is O(sqrt(N)*log N). [See Weisstein link] - N. J. A. Sloane, May 27 2022
A005171(a(n))*A010055(a(n)) = 1. - Reinhard Zumkeller, Nov 01 2009
A192280(a(n)) = 0 for n > 1. - Reinhard Zumkeller, Aug 26 2011
A014963(a(n)) - A089026(a(n)) = A014963(a(n)) - 1. - Eric Desbiaux, May 18 2013
From Hieronymus Fischer, May 31 2013: (Start)
The greatest number n such that a(n) <= m is given by 1 + Sum_{k>=2} A000720(floor(m^(1/k))).
Example 1: m = 10^10 ==> n = 10085;
Example 2: m = 10^11 ==> n = 28157;
Example 3: m = 10^12 ==> n = 80071;
Example 4: m = 10^15 ==> n = 1962690. (End)
Sum_{n>=2} 1/a(n) = Sum_{p prime} 1/(p*(p-1)) = A136141. - Amiram Eldar, Oct 11 2020
From Amiram Eldar, Jan 28 2021: (Start)
Product_{n>=2} (1 + 1/a(n)) = Product_{k>=2} zeta(k)/zeta(2*k) = 2.0729553047...
Product_{n>=2} (1 - 1/a(n)) = A068982. (End)

Extensions

Edited by Daniel Forgues, Aug 18 2009

A046660 Excess of n = number of prime divisors (with multiplicity) - number of prime divisors (without multiplicity).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3 * 3 and 375 = 3 * 5^3 both have prime signature (3, 1).
a(n) = 0 for squarefree n.
A162511(n) = (-1)^a(n). - Reinhard Zumkeller, Jul 08 2009
a(n) = the number of divisors of n that are each a composite power of a prime. - Leroy Quet, Dec 02 2009
a(A005117(n)) = 0; a(A060687(n)) = 1; a(A195086(n)) = 2; a(A195087(n)) = 3; a(A195088(n)) = 4; a(A195089(n)) = 5; a(A195090(n)) = 6; a(A195091(n)) = 7; a(A195092(n)) = 8; a(A195093(n)) = 9; a(A195069(n)) = 10. - Reinhard Zumkeller, Nov 29 2015

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, pp. 51-52.

Crossrefs

Programs

  • Haskell
    import Math.NumberTheory.Primes.Factorisation (factorise)
    a046660 n = sum es - length es where es = snd $ unzip $ factorise n
    -- Reinhard Zumkeller, Nov 28 2015, Jan 09 2013
    
  • Maple
    with(numtheory); A046660 := n -> bigomega(n)-nops(factorset(n)):
    seq(A046660(k), k=1..100); # Wesley Ivan Hurt, Oct 27 2013
    # Or:
    with(NumberTheory): A046660 := n -> NumberOfPrimeFactors(n) - NumberOfPrimeFactors(n, 'distinct'):  # Peter Luschny, Jul 14 2023
  • Mathematica
    Table[PrimeOmega[n] - PrimeNu[n], {n, 50}] (* or *) muf[n_] := Module[{fi = FactorInteger[n]}, Total[Transpose[fi][[2]]] - Length[fi]]; Array[muf, 50] (* Harvey P. Dale, Sep 07 2011. The second program is several times faster than the first program for generating large numbers of terms. *)
  • PARI
    a(n)=bigomega(n)-omega(n) \\ Charles R Greathouse IV, Nov 14 2012
    
  • PARI
    a(n)=my(f=factor(n)[,2]); vecsum(f)-#f \\ Charles R Greathouse IV, Aug 01 2016
    
  • Python
    from sympy import factorint
    def A046660(n): return sum(e-1 for e in factorint(n).values()) # Chai Wah Wu, Jul 18 2023

Formula

a(n) = Omega(n) - omega(n) = A001222(n) - A001221(n).
Additive with a(p^e) = e - 1.
a(n) = Sum_{k = 1..A001221(n)} (A124010(n,k) - 1). - Reinhard Zumkeller, Jan 09 2013
G.f.: Sum_{p prime, k>=2} x^(p^k)/(1 - x^(p^k)). - Ilya Gutkovskiy, Jan 06 2017
Asymptotic mean: lim_{m->oo} (1/m) Sum_{k=1..m} a(k) = Sum_{p prime} 1/(p*(p-1)) = 0.773156... (A136141). - Amiram Eldar, Jul 28 2020
a(n) = Sum_{p|n} A286563(n/p,p), where p is prime. - Ridouane Oudra, Sep 13 2023
a(n) = A275812(n) - A056170(n). - Amiram Eldar, Jan 09 2024
a(n) = A001222(A003557(n)). - Peter Munn, Feb 06 2024

Extensions

More terms from David W. Wilson

A246547 Prime powers p^e where p is a prime and e >= 2 (prime powers without the primes or 1).

Original entry on oeis.org

4, 8, 9, 16, 25, 27, 32, 49, 64, 81, 121, 125, 128, 169, 243, 256, 289, 343, 361, 512, 529, 625, 729, 841, 961, 1024, 1331, 1369, 1681, 1849, 2048, 2187, 2197, 2209, 2401, 2809, 3125, 3481, 3721, 4096, 4489, 4913, 5041, 5329, 6241, 6561, 6859, 6889, 7921, 8192, 9409, 10201, 10609, 11449, 11881, 12167, 12769, 14641
Offset: 1

Views

Author

Joerg Arndt, Aug 29 2014

Keywords

Comments

These are sometimes called the proper prime powers.
A proper subset of A001597.
Equals A000961 \ A008578 = { x in A001597 | A001221(x)=1 }. - M. F. Hasler, Aug 29 2014

Crossrefs

Essentially the same as A025475.
There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. Also A001597 is the sequence of nontrivial powers n^k, n >= 1, k >= 2. - N. J. A. Sloane, Mar 24 2018

Programs

  • Maple
    isA246547 := proc(n)
        local ifs;
        ifs := ifactors(n)[2] ;
        if nops(ifs) <> 1 then
            false;
        else
            is(op(2, op(1, ifs)) > 1);
        end if;
    end proc:
    for n from 2 do
        if isA246547(n) then
            print(n) ;
        end if;
    end do: # R. J. Mathar, Feb 01 2016 # Or:
    isA246547 := n -> not isprime(n) and nops(numtheory:-factorset(n)) = 1:
    select(isA246547, [$1..10000]); # Peter Luschny, May 01 2018
  • Mathematica
    With[{upto=15000},Complement[Select[Range[upto],PrimePowerQ],Prime[ Range[ PrimePi[ upto]]]]] (* Harvey P. Dale, Nov 28 2014 *)
    Select[ Range@ 15000, PrimePowerQ@# && !SquareFreeQ@# &] (* Robert G. Wilson v, Dec 01 2014 *)
    With[{n = 15000}, Union@ Flatten@ Table[Array[p^# &, Floor@ Log[p, n] - 1, 2], {p, Prime@ Range@ PrimePi@ Sqrt@ n}] ] (* Michael De Vlieger, Jul 06 2018, faster program *)
  • PARI
    for(n=1,10^5,if(isprimepower(n)>=2,print1(n,", ")));
    
  • PARI
    m=10^5; v=[]; forprime(p=2, sqrtint(m), e=2; while(p^e<=m, v=concat(v, p^e); e++)); v=vecsort(v) \\ Faster program. Jens Kruse Andersen, Aug 29 2014
    
  • Python
    from sympy import primepi, integer_nthroot
    def A246547(n):
        def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 14 2024
  • SageMath
    def A246547List(n):
        return [p for p in srange(2, n) if p.is_prime_power() and not p.is_prime()]
    print(A246547List(14642))  # Peter Luschny, Sep 16 2023
    

Formula

a(n) = A025475(n+1). - M. F. Hasler, Aug 29 2014
Sum_{n>=1} 1/a(n) = Sum_{p prime} 1/(p*(p-1)) = A136141. - Amiram Eldar, Dec 21 2020

A286708 Powerful numbers (A001694) that are not prime powers (A000961).

Original entry on oeis.org

36, 72, 100, 108, 144, 196, 200, 216, 225, 288, 324, 392, 400, 432, 441, 484, 500, 576, 648, 675, 676, 784, 800, 864, 900, 968, 972, 1000, 1089, 1125, 1152, 1156, 1225, 1296, 1323, 1352, 1372, 1444, 1521, 1568, 1600, 1728, 1764, 1800, 1936, 1944, 2000, 2025, 2116, 2304, 2312, 2500, 2592, 2601, 2700, 2704, 2744
Offset: 1

Views

Author

Ilya Gutkovskiy, May 13 2017

Keywords

Comments

If a prime p divides a(n) then p^2 must also divide a(n) and number of distinct primes dividing a(n) > 1.
Intersection of A001694 and A024619.

Examples

			-------------------------------
| n | a(n) | prime            |
|   |      | factorization    |
|------------------------------
| 1 | 36   | {{2, 2}, {3, 2}} |
| 2 | 72   | {{2, 3}, {3, 2}} |
| 3 | 100  | {{2, 2}, {5, 2}} |
| 4 | 108  | {{2, 2}, {3, 3}} |
| 5 | 144  | {{2, 4}, {3, 2}} |
| 6 | 196  | {{2, 2}, {7, 2}} |
| 7 | 200  | {{2, 3}, {5, 2}} |
| 8 | 216  | {{2, 3}, {3, 3}} |
| 9 | 225  | {{3, 2}, {5, 2}} |
-------------------------------
a(n) = p_1^e_1*p_2^e_2*... : {{p_1, e_1}, {p_2, e_2}, ...}.
		

Crossrefs

Programs

  • Maple
    N:= 10000:
    S:= {1}: P:= {1}:
    p:= 1:
    do
      p:= nextprime(p);
      if p^2 > N then break fi;
      S:= map(s -> (s, seq(s*p^k, k = 2 .. floor(log[p](N/s)))), S);
      P:= P union {seq(p^k, k=2..floor(log[p](N)))}:
    od:
    sort(convert(S minus P, list)); # Robert Israel, May 14 2017
  • Mathematica
    Select[Range@2750, Min@FactorInteger[#][[All, 2]] > 1 && ! PrimePowerQ[#] &]
    (* Second program *)
    nn = 2^25; Select[Rest@ Union@ Flatten@ Table[a^2*b^3, {b, nn^(1/3)}, {a, Sqrt[nn/b^3]}], ! PrimePowerQ[#] &] (* Michael De Vlieger, Jun 22 2022 *)
  • Python
    from sympy import primefactors, factorint
    print([n for n in range(4,2745) if len(primefactors(n)) > 1 and min(list(factorint(n).values())) > 1]) # Karl-Heinz Hofmann, Feb 07 2023
    
  • Python
    from math import isqrt
    from sympy import integer_nthroot, primepi, mobius
    def A286708(n):
        def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
        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):
            c, l = n+x, 0
            j = isqrt(x)
            while j>1:
                k2 = integer_nthroot(x//j**2,3)[0]+1
                w = squarefreepi(k2-1)
                c -= j*(w-l)
                l, j = w, isqrt(x//k2**3)
            c -= squarefreepi(integer_nthroot(x,3)[0])-l
            return c+1+sum(primepi(integer_nthroot(x, k)[0]) for k in range(2, x.bit_length()))
        return bisection(f,n,n) # Chai Wah Wu, Sep 10 2024

Formula

Sum_{n>=1} 1/a(n) = zeta(2)*zeta(3)/zeta(6) - Sum_{p prime} 1/(p*(p-1)) - 1 = A082695 - A136141 - 1 = 0.17043976777096407719... - Amiram Eldar, Feb 12 2021

A083345 Numerator of r(n) = Sum(e/p: n=Product(p^e)); a(n) = n' / gcd(n,n'), where n' is the arithmetic derivative of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 5, 1, 3, 2, 7, 1, 4, 1, 9, 8, 2, 1, 7, 1, 6, 10, 13, 1, 11, 2, 15, 1, 8, 1, 31, 1, 5, 14, 19, 12, 5, 1, 21, 16, 17, 1, 41, 1, 12, 13, 25, 1, 7, 2, 9, 20, 14, 1, 3, 16, 23, 22, 31, 1, 23, 1, 33, 17, 3, 18, 61, 1, 18, 26, 59, 1, 13, 1, 39, 11, 20, 18, 71, 1, 11, 4, 43, 1, 31, 22
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 25 2003

Keywords

Comments

Least common multiple of n and its arithmetic derivative, divided by n, i.e. a(n) = lcm(n,n')/n = A086130(n)/A000027(n). - Giorgio Balzarotti, Apr 14 2011
From Antti Karttunen, Nov 12 2024: (Start)
Positions of multiples of any natural number in this sequence (like A369002, A369644, A369005, or A369007) form always a multiplicative semigroup: if m and n are in that sequence, then so is m*n.
Proof: a(x) = x' / gcd(x,x') = A003415(x) / A085731(x) by definition. Let v_p(x) be the p-adic valuation of x, with p prime. Let e = v_p(c), the p-adic valuation of natural number c whose multiples we are searching for. For v_p(a(x)) >= e > 0 and v_p(a(y)) >= e > 0 to hold we must have v_p(x') = v_p(x)+h and v_p(y') = v_p(y)+k, for some h >= e, k >= e for p^e to divide a(x) and a(y).
Then, as a(xy) = (xy)' / gcd(xy,(xy)') = (x'y + y'x) / gcd(xy, (x'y + y'x)), we have, for the top side, v_p((xy)') = min(v_p(x')+v_p(y), v_p(y')+v_p(x)) = min(v_p(x) + h + v_p(y), v_p(y) + k + v_p(x)) = v_p(xy) + min(h,k), and for the bottom side we get v_p(gcd(xy, (x'y + y'x))) = min(v_p(xy), v_p(xy) + min(h,k)) = v_p(xy), so v_p(a(xy)) = min(h,k) >= e, thus p^e | a(xy). For a composite c that is not a prime power, c | a(xy) holds if the above equations hold for all p^e || c.
(End)

Examples

			Fractions begin with 0, 1/2, 1/3, 1, 1/5, 5/6, 1/7, 3/2, 2/3, 7/10, 1/11, 4/3, ...
For n = 12, 2*2*3 = 2^2 * 3^1 --> r(12) = 2/2 + 1/3 = (6+2)/6, therefore a(12) = 4, A083346(12) = 3.
For n = 18, 2*3*3 = 2^1 * 3^2 --> r(18) = 1/2 + 2/3 = (3+4)/6, therefore a(18) = 7, A083346(18) = 6.
		

Crossrefs

Cf. A369001 (anti-parity), A377874 (parity).
Cf. A369002 (positions of even terms), A369003 (of odd terms), A369644 (of multiples of 3), A369005 (of multiples of 4), A373265 (of terms of the form 4m+2), A369007 (of multiples of 27), A369008, A369068 (Möbius transform), A369069.

Programs

  • Mathematica
    Array[Numerator@ Total[FactorInteger[#] /. {p_, e_} /; e > 0 :> e/p] - Boole[# == 1] &, 85] (* Michael De Vlieger, Feb 25 2018 *)
  • PARI
    A083345(n) = { my(f=factor(n)); numerator(vecsum(vector(#f~,i,f[i,2]/f[i,1]))); }; \\ Antti Karttunen, Feb 25 2018

Formula

The fraction a(n)/A083346(n) is totally additive with a(p) = 1/p. - Franklin T. Adams-Watters, May 17 2006
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A083346(k) = Sum_{p prime} 1/(p*(p-1)) = 0.773156... (A136141). - Amiram Eldar, Sep 29 2023
a(n) = A003415(n) / A085731(n) = A342001(n) / A369008(n). - Antti Karttunen, Jan 16 2024

Extensions

Secondary definition added by Antti Karttunen, Nov 12 2024
Showing 1-10 of 86 results. Next