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

A025528 Number of prime powers <= n with exponents > 0 (A246655).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) is the sum of the exponents in the prime factorization of lcm{1,2,...,n}.
Larger than but analogous to Pi(n).
Counts A000961 without 1=prime^0: a(n)=A065515(n)-1. - Reinhard Zumkeller, Jul 03 2003
Equally, number of finite fields of order <= n. - Neven Juric, Feb 05 2010

Examples

			Below 100 there are 25 primes and 25 + 10 = 35 prime powers.
		

References

  • G. Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, p. 203, Publications de l'Institut Cartan, 1990.

Crossrefs

Cf. A000961, A000040, A000720, A001221, A003418, A141228, A246655, A276781 (ordinal transform).
One less than A065515.

Programs

  • Mathematica
    primePowerPi[n_] := Sum[PrimePi[n^(1/k)], {k, Log[2, n]}]; Table[primePowerPi[n], {n, 75}] (* Geoffrey Critzer, Jan 07 2012 *) (* and modified by Robert G. Wilson v, Jan 07 2012 *)
    Table[Sum[Boole[1 < Cyclotomic[n, 1]], {n, 1, m}], {m, 1, 75}] (* Fred Daniel Kline, Oct 03 2016 *)
  • PARI
    for(n=1,100,print1(sum(k=1,n,logint(n,prime(k))),",")) \\ corrected by Luc Rousseau, Jan 04 2018
    
  • PARI
    a(n)=sum(i=1,n,if(omega(i)-1,0,1))
    
  • PARI
    a(n)=n+=.5;sum(e=1,log(n)\log(2),primepi(n^(1/e))) \\ Charles R Greathouse IV, Apr 30 2012
    
  • Python
    from sympy import primepi, integer_nthroot
    def A025528(n): return sum(primepi(integer_nthroot(n,k)[0]) for k in range(1,n.bit_length())) # Chai Wah Wu, Aug 15 2024
  • SageMath
    def A025528(n) : return sum([1 for k in (0..n) if is_prime_power(k)])
    print([A025528(n)  for n in (1..74)]) # Peter Luschny, Nov 18 2019
    

Formula

a(n) = Cardinality[{1..n}|A001221(i)=1].
a(n) = Sum_{p prime <= n} floor(log(n)/log(p)). - Benoit Cloitre, Apr 30 2002
a(n) ~ n/log(n). - Benoit Cloitre, May 30 2003
a(n) = A069637(n) + A000720(n). - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Feb 24 2004 [Corrected by Franklin T. Adams-Watters, Jun 08 2008]
a(n) = A000720(n) + A000720(floor(n^(1/2))) + A000720(floor(n^(1/3))) + ... - Max Alekseyev, May 11 2009
Partial sums of A069513. - Enrique Pérez Herrero, May 30 2011
a(n) = A001222(A003418(n)). - Luc Rousseau, Jan 05 2018
From Steven Foster Clark, Sep 26 2018: (Start)
a(n) = Sum_{m=1..n} A001222(m) * A002321(floor(n/m)) where A001222() is the Omega function and A002321() is the Mertens function.
a(n) = Sum_{m=1..floor(log_2(n))} A000010(m)/m * J(floor(n^(1/m))) where A000010() is Euler's totient function and J(n) = Sum_{m=1..floor(log_2(n))} 1/m * A000720(floor(n^(1/m))) is Riemann's prime-power counting function.
(End)

Extensions

New description from Labos Elemer, Nov 09 2000

A085501 Number of prime powers p^k <= n that are not prime (k = 0 or k > 1).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 03 2003

Keywords

Comments

a(n) = Max{k: A025475(k)<=n};
a(n)=A065515(n)-A000720(n)=A069637(n)+1;
for n<36=(2*3)^2: a(n) = A069623(n).

Programs

  • PARI
    a(n)=sum(k=2,logint(n,2), primepi(sqrtnint(n,k)))+1 \\ Charles R Greathouse IV, Jul 21 2017
    
  • PARI
    first(n)=my(v=vector(n),s=1); for(e=2,logint(n,2), forprime(p=2,sqrtnint(n,e), v[p^e]=1)); for(i=1,n, s+=v[i]; v[i]=s); v \\ Charles R Greathouse IV, Jul 21 2017
    
  • Python
    from sympy import primepi, integer_nthroot
    def A085501(n): return 1+sum(primepi(integer_nthroot(n,k)[0]) for k in range(2,n.bit_length())) # Chai Wah Wu, Aug 15 2024

A069837 Smallest prime which is a concatenation of n primes.

Original entry on oeis.org

2, 23, 223, 2237, 22273, 222323, 2222273, 22222223, 222222227, 2222222377, 22222222223, 222222223273, 2222222222273, 22222222222327, 222222222222227, 2222222222222533, 22222222222223557, 222222222222222577, 2222222222222222327, 22222222222222222253, 222222222222222222277, 2222222222222222222273, 22222222222222222222327
Offset: 1

Views

Author

Amarnath Murthy, Apr 16 2002

Keywords

Comments

Conjecture: For every n there exists an n-digit prime which is composed of the digits 2,3,5 and 7. I.e., no prime > 7 is required in this concatenation. I.e., a(n) of A069637 contains exactly n digits. This is a weaker conjecture than the one by Patrick De Geest in A036937.
If the conjecture is true then this also gives the smallest n-digit prime with prime digits. - Amarnath Murthy, Apr 02 2003
Except for the first term, A096506 lists indices n=2,3,8,11,36,95,101,128,... for which a(n) is of the form 2...23. - M. F. Hasler, Apr 25 2008

Crossrefs

Cf. A036937.
Cf. A096506.

Programs

  • Mathematica
    f[n_] := Block[{p = 2(10^n - 1)/9}, While[ !PrimeQ[p] || Union[ PrimeQ[ IntegerDigits[p]]] != {True}, p++ ]; p]; Table[ f[n], {n, 1, 20}]
  • PARI
    A069837(n)={ local( p=(10^n-1)\9*2-1 ); n=Vec("2357"); until( !setminus( Set(Vec(Str(p))), n), p=nextprime(p+1)); p } /* a more efficient version should check digits one by one and skip to the next possible candidate (i.e., add 12...23 - p%10^d) when a nonprime digit is found */ \\ M. F. Hasler, Apr 25 2008

Extensions

Edited, corrected and extended by Robert G. Wilson v, Apr 22 2002

A072292 Number of proper powers b^d <= n (b > 1, d > 1).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 12 2002

Keywords

Comments

Base b = 1 is excluded since 1 would be 1^d for any degree d (degree of power not well defined).

Crossrefs

a(i)=A069637(i) for i<36=6^2. Cf. A001597.
Cf. A075802 (first differences).

Programs

  • Haskell
    a072292 n = a072292_list !! (n-1)
    a072292_list = scanl (+) 0 $ tail a075802_list
    -- Reinhard Zumkeller, May 26 2012
    
  • Mathematica
    a[n_] := (pp = Reap[ Do[ If[b^d <= n, Sow[b^d]], {b, 2, Sqrt[n]}, {d, 2, Log[2, n]}]]; If[pp == {Null, {}}, 0, Length[ Union[ pp[[2, 1]]]]]); Table[a[n], {n, 1, 90}](* Jean-François Alcover, May 16 2012 *)
    Module[{nn=10,pp},pp=Union[Flatten[Table[a^b,{a,2,nn},{b,2,nn}]]];Accumulate[ Table[ If[ MemberQ[pp,n],1,0],{n,2^nn}]]] (* Harvey P. Dale, Nov 14 2022 *)
  • PARI
    A072292(n)=n=floor(n)+.5;-sum(k=2,log(n)\log(2),floor(n^(1/k)-1)*moebius(k))
    \\ Charles R Greathouse IV, Sep 07 2010
    
  • Python
    from sympy import mobius, integer_nthroot
    def A072292(n): return int(-sum(mobius(k)*(integer_nthroot(n,k)[0]-1) for k in range(2,n.bit_length()))) # Chai Wah Wu, Mar 11 2025

Extensions

Edited by Daniel Forgues, Mar 03 2009

A327247 Number of odd prime powers <= n (with exponents > 0).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Sep 14 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Boole[OddQ[k] && PrimePowerQ[k]], {k, 1, n}], {n, 1, 75}]
  • PARI
    a(n) = {sum(k=2, primepi(n), logint(n, prime(k)))} \\ Andrew Howroyd, Sep 14 2019

Formula

a(n) = A025528(n) - A000523(n).
Showing 1-5 of 5 results.