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!)
A238362 Primes p such that A000120(p - 1) = A000120(p + 1) = 2^k for some k. 1
3, 11, 19, 59, 67, 107, 131, 179, 211, 227, 283, 307, 331, 419, 563, 587, 659, 787, 1019, 1051, 1123, 1163, 1171, 1187, 1291, 1531, 1571, 1667, 1787, 1979, 2011, 2027, 2099, 2131, 2243, 2339, 2371, 2579, 2819, 2939, 3083, 3203, 3323, 3331, 3547, 3571, 3803 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
3 is in this sequence because A000120(3-1) = A000120(3+1) = 2^0 = 1.
MATHEMATICA
Select[Prime[Range[500]], (s = DigitCount[#-1, 2, 1]) == DigitCount[#+1, 2, 1] && s == 2^IntegerExponent[s, 2] &] (* Amiram Eldar, Jul 16 2023 *)
PROG
(PARI) ispow2(n)=n>>=valuation(n, 2); n==1
is(n)=my(h=hammingweight(n-1)); ispow2(h) && h==hammingweight(n+1) && isprime(n) \\ Charles R Greathouse IV, Mar 05 2014
CROSSREFS
Cf. A000120.
Sequence in context: A336790 A163851 A213051 * A116945 A048270 A183459
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
2311 removed by Giovanni Resta, Mar 01 2014
STATUS
approved

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 April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)