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

A067871 Number of primes between consecutive terms of A246547 (prime powers p^k, k >= 2).

Original entry on oeis.org

2, 0, 2, 3, 0, 2, 4, 3, 4, 8, 0, 1, 8, 14, 1, 7, 7, 4, 25, 2, 15, 15, 17, 16, 10, 45, 2, 44, 20, 26, 18, 0, 2, 28, 52, 36, 42, 32, 45, 45, 47, 19, 30, 106, 36, 35, 4, 114, 28, 135, 89, 42, 87, 42, 34, 66, 192, 106, 56, 23, 39, 37, 165, 49, 37, 262, 58, 160, 22
Offset: 1

Views

Author

Jon Perry, Mar 07 2002

Keywords

Comments

Does this sequence have any terms appearing infinitely often? In particular, are {2, 5, 11, 32, 77} the only zeros? As an example, {121, 122, 123, 124, 125} is an interval containing no primes, corresponding to a(11) = 0. - Gus Wiseman, Dec 02 2024

Examples

			The first few prime powers A246547 are 4, 8, 9, 16. The first few primes are 2, 3, 5, 7, 11, 13. We have (4), 5, 7, (8), (9), 11, 13, (16) and so the sequence begins with 2, 0, 2.
The initial terms count the following sets of primes: {5,7}, {}, {11,13}, {17,19,23}, {}, {29,31}, {37,41,43,47}, ... - _Gus Wiseman_, Dec 02 2024
		

Crossrefs

For primes between nonsquarefree numbers we have A236575.
For composite instead of prime we have A378456.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A080101 counts prime powers between primes.
A246547 lists the non prime prime powers, differences A053707.
A246655 lists the prime powers not including 1, complement A361102.

Programs

  • Mathematica
    t = {}; cnt = 0; Do[If[PrimePowerQ[n], If[FactorInteger[n][[1, 2]] == 1, cnt++, AppendTo[t, cnt]; cnt = 0]], {n, 4 + 1, 30000}]; t (* T. D. Noe, May 21 2013 *)
    nn = 2^20; Differences@ Map[PrimePi, Select[Union@ Flatten@ Table[a^2*b^3, {b, nn^(1/3)}, {a, Sqrt[nn/b^3]}], PrimePowerQ] ] (* Michael De Vlieger, Oct 26 2023 *)

Formula

a(n) = A000720(A025475(n+3)) - A000720(A025475(n+2)). - David Wasserman, Dec 20 2002

Extensions

More terms from David Wasserman, Dec 20 2002
Definition clarified by N. J. A. Sloane, Oct 27 2023

A025476 Prime root of n-th nontrivial prime power (A025475, A246547).

Original entry on oeis.org

2, 2, 3, 2, 5, 3, 2, 7, 2, 3, 11, 5, 2, 13, 3, 2, 17, 7, 19, 2, 23, 5, 3, 29, 31, 2, 11, 37, 41, 43, 2, 3, 13, 47, 7, 53, 5, 59, 61, 2, 67, 17, 71, 73, 79, 3, 19, 83, 89, 2, 97, 101, 103, 107, 109, 23, 113, 11, 5, 127, 2, 7, 131, 137, 139, 3, 149, 151, 29, 157, 163, 167, 13, 31, 173, 179
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    cvm := proc(n, level) local f,opf; if n < 2 then RETURN() fi;
    f := ifactors(n); opf := op(1,op(2,f)); if nops(op(2,f)) > 1 or
    op(2,opf) <= level then RETURN() fi; op(1,opf) end:
    A025476_list := n -> seq(cvm(i,1),i=1..n); # n is search limit
    A025476_list(30000);  # Peter Luschny, Sep 21 2011
    # Alternative:
    isA246547 := n -> n > 1 and not isprime(n) and type(n, 'primepower'):
    seq(ifactors(p)[2][1][1], p in select(isA246547, [$1..30000])); # Peter Luschny, Jul 15 2023
  • Mathematica
    Transpose[ Flatten[ FactorInteger[ Select[ Range[2, 30000], !PrimeQ[ # ] && Mod[ #, # - EulerPhi[ # ]] == 0 &]], 1]][[1]] (* Robert G. Wilson v *)
  • PARI
    forcomposite(n=4,10^5,if( ispower(n, , &p) && isprime(p), print1(p,", "))) \\ Joerg Arndt, Sep 11 2021
    
  • Python
    from sympy import primepi, integer_nthroot, primefactors
    def A025476(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 primefactors(kmax)[0] # Chai Wah Wu, Aug 15 2024

A383295 Positions of proper prime powers (A246547) in EKG-sequence.

Original entry on oeis.org

3, 6, 8, 17, 22, 24, 31, 50, 64, 76, 112, 122, 124, 171, 232, 240, 290, 319, 359, 485, 521, 595, 696, 823, 947, 982, 1279, 1313, 1642, 1810, 1961, 2090, 2096, 2168, 2306, 2736, 3002, 3398, 3638, 3932, 4379, 4733, 4913, 5207, 6072, 6312, 6583, 6710, 7717, 7898, 9165, 9929, 10298, 11144, 11568, 11786, 12430, 14138
Offset: 1

Views

Author

Antti Karttunen, Apr 22 2025

Keywords

Comments

Apparently also numbers k for which A265576(k) > 1 and A064413(k) is neither 2 nor 2*odd prime.

Crossrefs

Setwise difference A383294 \ A064955.
Conjectured to be a subsequence of A383285.

Programs

  • PARI
    isA383295(n) = { my(x=A064413(n)); (isprimepower(x) && !isprime(x)); };

A282550 Perfect powers that are the sum of two distinct proper prime powers (A246547).

Original entry on oeis.org

25, 36, 81, 125, 144, 196, 324, 512, 576, 1089, 2304, 2744, 2916, 5041, 9216, 14884, 16641, 26244, 36864, 51984, 147456, 236196, 589824, 941192, 1196836, 2125764, 2359296, 9437184, 19131876, 37748736, 67125249, 150994944, 172186884, 322828856, 603979776
Offset: 1

Views

Author

Altug Alkan, Feb 18 2017

Keywords

Comments

Intersection of A001597 and A225102. - Michel Marcus, Feb 18 2017
Terms t of A001597 such that A225099(t) > 0. - Felix Fröhlich, Feb 18 2017

Examples

			512 = 2^9 is a term because 2^9 = 7^3 + 13^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Union@ Map[Total, Subsets[With[{nn = 10^6}, Complement[ Select[ Range@ nn, PrimePowerQ], Prime[Range[PrimePi@ nn]]]], {2}]], # == 1 ||
    GCD @@ FactorInteger[#][[All, 2]] > 1 &] (* Michael De Vlieger, Feb 18 2017, after Harvey P. Dale at A246547 *)
  • PARI
    is(n) = if(!ispower(n), return(0), my(x=n-1, y=1); while(y < x, if(isprimepower(x) && isprimepower(y) && !ispseudoprime(x) && !ispseudoprime(y), return(1)); y++; x--)); 0 \\ Felix Fröhlich, Feb 18 2017

Extensions

More terms from Felix Fröhlich, Feb 18 2017
a(28)-a(35) from Giovanni Resta, May 07 2017

A380402 Number of proper prime powers (in A246547) that do not exceed primorial A002110(n).

Original entry on oeis.org

0, 0, 1, 6, 14, 34, 75, 187, 551, 1954, 8317, 38582, 200978, 1125541, 6562122, 40444003, 266832233, 1870169623, 13424553758, 101495825622, 793832121165, 6325729776075, 52616754936494, 450157758564742, 3999323787879764, 37180986240914714, 353667558431662474
Offset: 0

Views

Author

Michael De Vlieger, Jan 23 2025

Keywords

Examples

			Let s = A246547.
a(0) = a(1) = 0 since P(0) = 1 and P(1) = 2, and the smallest number in s is 4.
a(2) = 1 since P(2) = 6, and s(1) = 4 is the only term in s <= 6.
a(3) = 6 since P(3) = 30, and the set s(1..6) = {4, 8, 9, 16, 25, 27} contains k <= 30.
a(4) = 14 since P(4) = 210, and the set s(1..14) = {4, 8, 9, 16, 25, 27, 32, 49, 64, 81, 121, 125, 128, 169} contains k <= 210, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[PrimePi@ Floor[#^(1/k)], {k, 2, Floor@ Log2[#]}] &[Product[Prime[i], {i, n}]], {n, 0, nn}]
  • Python
    from sympy import primorial, primepi, integer_nthroot
    def A380402(n):
        if n == 0: return 0
        m = primorial(n)
        return int(sum(primepi(integer_nthroot(m,k)[0]) for k in range(2,m.bit_length()))) # Chai Wah Wu, Jan 24 2025

Formula

a(n) = Sum_{k=2..floor(log_2(P(n)))} pi(floor(P(n)^(1/k))), where P(n) = A002110(n).

Extensions

a(24) corrected by Chai Wah Wu, Jan 25 2025
a(26) from Jinyuan Wang, Feb 25 2025

A355014 Index of A355012(n) in A246547.

Original entry on oeis.org

1, 3, 2, 5, 4, 6, 8, 11, 7, 14, 12, 17, 10, 19, 21, 9, 24, 18, 25, 13, 28, 29, 30, 34, 15, 36, 39, 41, 43, 44, 27, 45, 48, 38, 16, 53, 54, 55, 22, 57, 49, 51, 52, 33, 71, 76, 77, 60, 63, 64, 65, 67, 23, 68, 70, 88, 20, 89, 90, 72, 75, 96, 97, 98, 42, 79, 80, 81
Offset: 1

Views

Author

Michael De Vlieger, Jun 15 2022

Keywords

Crossrefs

Programs

  • Mathematica
    With[{s = Map[ToExpression@ StringSplit[#][[-1]] &, Import["https://oeis.org/A246547/b246547.txt", "Data"][[2 ;; -1]]]}, Map[FirstPosition[s, #][[1]] &, Select[Import["https://oeis.org/A090252/b090252.txt", "Data"][[1 ;; 8000, -1]], CompositeQ[#] && PrimePowerQ[#] &] ]]

A385379 The maximum possible number of distinct composite prime powers (A246547) in the factorization of n into prime powers.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Amiram Eldar, Jun 27 2025

Keywords

Comments

Differs from A376679 at n = 1, 48, 72, 80, ... .
The factorization includes primes if n is not a powerful number (A001694) that is larger than 1.
a(n) depends only on the prime signature of n (A118914).

Examples

			         n | a(n) | factorization
  ---------+------+----------------------------------------
         4 |  1   | 2^2
        32 |  2   | 2^2 * 2^3
       288 |  3   | 2^2 * 2^3 * 3^2
      4608 |  4   | 2^2 * 2^3 * 3^2 * 2^4
    115200 |  5   | 2^2 * 2^3 * 3^2 * 2^4 * 5^2
   3110400 |  6   | 2^2 * 2^3 * 3^2 * 2^4 * 5^2 * 3^3
  99532800 |  7   | 2^2 * 2^3 * 3^2 * 2^4 * 5^2 * 3^3 * 2^5
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := Floor[(Sqrt[8*e + 9] - 3)/2]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = vecsum(apply(x -> (sqrtint(8*x+9)-1)\2 , factor(n)[, 2]));

Formula

Additive with a(p^e) = A052146(e+1).
a(n) = 0 if and only if n is squarefree (A005117).
a(A385380(n)) = n-1.
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761), C = Sum_{k>=1} P(k*(k+3)/2) = 0.49006911093767425812..., and P is the prime zeta function.

A109314 Numbers n such that prime(n) + n is a prime power (A246547).

Original entry on oeis.org

3, 5, 8, 9, 12, 86, 230, 503, 1170, 2660, 2772, 6288, 6572, 8858, 9590, 14870, 16332, 17708, 53132, 54540, 63890, 64908, 82830, 93068, 98132, 104726, 119298, 136502, 152198, 177918, 187040, 234650, 241682, 253118, 263930, 278970, 376680, 412440, 456110, 469034
Offset: 1

Views

Author

Zak Seidov and Robert G. Wilson v, Jun 25 2005

Keywords

Examples

			2660 is OK because prime(2660) + 2660 = 23909 + 2660 = 26569 = 163^2, 163 is prime.
		

Crossrefs

Cf. A025475 = powers of a prime but not prime, also nonprime n such that sigma(n)*phi(n) > (n-1)2; A107708 = values of q, A107709 = values of k; A107710 = values of prime (A109314(n)).

Programs

  • Maple
    ispp:= n -> not isprime(n) and nops(numtheory:-factorset(n))=1:
    p:= 1: Res:= NULL:
    for n from 1 to 10^6 do
      p:= nextprime(p);
      if ispp(n+p) then Res:= Res, n fi
    od:
    Res; # Robert Israel, Jun 08 2016
  • Mathematica
    lst = {}; fQ[n_] := Block[{pf = FactorInteger[n]}, (2-Length[pf])(pf[[1, 2]]-1) > 0]; Do[ If[ fQ[Prime[n] + n], Print[n]; AppendTo[lst, n]], {n, 456109}]; lst
  • PARI
    isok(n) = isprimepower(n+prime(n)) >= 2; \\ Michel Marcus, Jun 18 2017
  • Sage
    def np(n): return n+nth_prime(n)
    [n for n in (1..10000) if not np(n).is_prime() and np(n).is_prime_power()] # Giuseppe Coppoletta, Jun 08 2016
    

Formula

prime(n) + n = q^k, q is prime and k_Integer >= 2.

A284048 a(n) is the smallest positive integer not already in the sequence such that a(n) + a(n-1) is a proper prime power (A246547), with a(1) = 1.

Original entry on oeis.org

1, 3, 5, 4, 12, 13, 14, 2, 6, 10, 15, 17, 8, 19, 30, 34, 47, 74, 7, 9, 16, 11, 21, 28, 36, 45, 76, 49, 32, 89, 39, 25, 24, 40, 41, 23, 26, 38, 43, 78, 50, 31, 18, 46, 35, 29, 20, 44, 37, 27, 22, 42, 79, 90, 153, 103, 66, 55, 70, 51, 77, 48, 33, 88, 81, 162, 94, 75, 53, 68, 57, 64, 61, 60, 65, 56, 69, 52, 73, 96, 147
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 19 2017

Keywords

Examples

			a(5) = 12 because 1, 3, 4 and 5 have already been used in the sequence, 4 + 2 = 6, 4 + 6 = 10, 4 + 7 = 11, 4 + 8 = 12, 4 + 9 = 13, 4 + 10 = 14 and 4 + 11 = 15 are not proper prime powers while 4 + 12 = 16 is a proper prime power.
		

Crossrefs

Programs

  • Maple
    N:= 2000: # to get all terms before the first where a(n)+a(n-1)>N
    PP:= {seq(seq(p^j, j =2..floor(log[p](N))),p = select(isprime,[2,seq(i,i=3..floor(sqrt(N)),2)]))}:
    PP:= sort(convert(PP,list)):
    V:= Vector(N,datatype=integer[1],1):
    A[1]:= 1; V[1]:= 0;
    for n from 2 do
      for pp in PP do
        t:= pp - A[n-1];
        if t > 0 and V[t] = 1 then
          A[n]:= t; V[t]:= 0; break
        fi;
      od;
      if not assigned(A[n]) then break fi
    od:
    seq(A[i],i=1..n-1); # Robert Israel, Apr 24 2017
  • Mathematica
    f[s_List] := Block[{k = 1, a = s[[-1]]}, While[MemberQ[s, k] || ! (PrimePowerQ[a + k] && PrimeOmega[a + k] > 1), k++];Append[s, k]]; Nest[f, {1}, 80]

A320699 Numbers whose product of prime indices is a nonprime prime power (A246547).

Original entry on oeis.org

7, 9, 14, 18, 19, 21, 23, 25, 27, 28, 36, 38, 42, 46, 49, 50, 53, 54, 56, 57, 63, 72, 76, 81, 84, 92, 97, 98, 100, 103, 106, 108, 112, 114, 115, 121, 125, 126, 131, 133, 144, 147, 152, 159, 162, 168, 171, 184, 189, 194, 196, 200, 206, 212, 216, 224, 227, 228
Offset: 1

Views

Author

Gus Wiseman, Oct 19 2018

Keywords

Comments

First differs from A320325 at a(43) = 152, A320325(43) = 151.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The sequence of all integer partitions whose Heinz numbers belong to the sequence begins: (4), (2,2), (4,1), (2,2,1), (8), (4,2), (9), (3,3), (2,2,2), (4,1,1), (2,2,1,1), (8,1), (4,2,1), (9,1), (4,4), (3,3,1), (16), (2,2,2,1), (4,1,1,1), (8,2), (4,2,2), (2,2,1,1,1), (8,1,1), (2,2,2,2), (4,2,1,1), (9,1,1), (25), (4,4,1), (3,3,1,1).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],With[{x=Times@@Cases[FactorInteger[#],{p_,k_}:>PrimePi[p]^k]},!PrimeQ[x]&&PrimePowerQ[x]]&]
Showing 1-10 of 124 results. Next