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.

A379154 Prime numbers p such that the interval from p to the next prime number contains a unique perfect power.

This page as a plain text file.
%I A379154 #19 Jan 19 2025 00:34:48
%S A379154 3,13,47,61,79,97,127,139,167,193,211,223,241,251,283,317,337,359,397,
%T A379154 439,479,509,523,571,619,673,727,773,839,887,953,997,1021,1087,1153,
%U A379154 1223,1291,1327,1367,1439,1511,1597,1669,1723,1759,1847,1933,2017,2039,2113
%N A379154 Prime numbers p such that the interval from p to the next prime number contains a unique perfect power.
%C A379154 Perfect powers (A001597) are 1 and numbers with a proper integer root.
%H A379154 Robert Israel, <a href="/A379154/b379154.txt">Table of n, a(n) for n = 1..10000</a>
%F A379154 a(n) = A151799(A378364(n+1)).
%e A379154 The prime after 13 is 17, and the interval (13,14,15,16,17) contains only one perfect power 16, so 13 is in the sequence.
%p A379154 N:= 10^4: # to get all entries <= N
%p A379154 S:={seq(seq(a^b, b = 2 .. floor(log[a](N))), a = 2 .. floor(sqrt(N)))}:
%p A379154 S:= sort(convert(S,list)):
%p A379154 J:= select(i -> nextprime(S[i]) < S[i+1] and prevprime(S[i]) > S[i-1], [$2..nops(S)-1]):
%p A379154 J:= [1,op(J)]:
%p A379154 map(prevprime, S[J]); # _Robert Israel_, Jan 19 2025
%t A379154 perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
%t A379154 Select[Range[1000],PrimeQ[#]&&Length[Select[Range[#,NextPrime[#]],perpowQ]]==1&]
%o A379154 (PARI) is_a379154(n) = isprime(n) && #select(x->ispower(x), [n+1..nextprime(n+1)-1])==1 \\ _Hugo Pfoertner_, Dec 19 2024
%Y A379154 The indices of these primes are one plus the positions of 1 in A377432.
%Y A379154 For zero instead of one perfect power we have the primes indexed by A377436.
%Y A379154 The indices of these primes are A377434.
%Y A379154 Swapping "prime" with "perfect power" gives A378355, indices A378368.
%Y A379154 For previous instead of next prime we have A378364.
%Y A379154 A000040 lists the primes, differences A001223.
%Y A379154 A001597 lists the perfect powers, differences A053289.
%Y A379154 A007916 lists the non perfect powers, differences A375706.
%Y A379154 A081676 gives the greatest perfect power <= n.
%Y A379154 A116086 gives perfect powers with no primes between them and the next perfect power.
%Y A379154 A366833 counts prime powers between primes, see A053607, A304521.
%Y A379154 A377468 gives the least perfect power > n.
%Y A379154 Cf. A023055, A045542, A052410, A069623, A376560, A377283, A377287, A377466, A378374.
%K A379154 nonn
%O A379154 1,1
%A A379154 _Gus Wiseman_, Dec 18 2024