login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A329595 Numbers k such that either (a) k-1=i^m for some i and m >= 3 and k+1 is a prime, or (b) k-1 is a prime and k+1 = i^m for some i and m >= 3. 2

%I #34 Jan 26 2020 12:42:36

%S 1,2,28,80,82,126,242,728,2400,3374,6562,6858,14640,19682,24390,28560,

%T 29790,50626,50652,59050,91126,161052,194480,194482,250048,274626,

%U 300762,328510,357912,371292,571788,707280,753570,759376,823542,970298,1157626,1295028,1442898,1771560,1860868,2146688,2146690

%N Numbers k such that either (a) k-1=i^m for some i and m >= 3 and k+1 is a prime, or (b) k-1 is a prime and k+1 = i^m for some i and m >= 3.

%C If 0 or 1 are not counted as powers, then this sequence starts with 28.

%C All terms other than 1 are even and follow or precede an odd power.

%H S. Brunner, <a href="/A329595/b329595.txt">Table of n, a(n) for n = 1..1100</a>

%e The first 20 terms with their neighbors:

%e n k-1 k k+1 | n k-1 k k+1

%e 1 0^3 1 2 | 11 3^8 6562 6563

%e 2 1^3 2 3 | 12 6857 6858 19^3

%e 3 3^3 28 29 | 13 14639 14640 11^4

%e 4 79 80 3^4 | 14 19681 19682 3^9

%e 5 3^4 82 83 | 15 29^3 24390 24391

%e 6 5^3 126 127 | 16 28559 28560 13^4

%e 7 241 242 3^5 | 17 29789 29790 31^3

%e 8 727 728 3^6 | 18 15^4 50626 50627

%e 9 2399 2400 7^4 | 19 50651 50652 37^3

%e 10 3373 3374 15^3 | 20 3^10 59050 59051

%t {1, 2}~Join~Flatten@ Map[Which[AllTrue[{#2, #3}, # > 2 &], #1 + {-1, 1}, #2 > 2, #1 - 1, #3 > 2, #1 + 1, True, Nothing] & @@ Prepend[Map[GCD @@ FactorInteger[#][[All, -1]] &, {# - 2, # + 2}], #] &, Prime@ Range[160000]] (* _Michael De Vlieger_, Dec 27 2019 *)

%o (PARI) isok(k) = (k==1) || (k==2) || ((ispower(k-1) >= 3) && isprime(k+1)) || (isprime(k-1) && (ispower(k+1) >= 3)); \\ _Michel Marcus_, Nov 18 2019

%Y Cf. A163492, A329582.

%K nonn

%O 1,2

%A _S. Brunner_, Nov 17 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 14 07:30 EDT 2024. Contains 375146 sequences. (Running on oeis4.)