A181490
Numbers k such that 3*2^k-1 and 3*2^k+1 are twin primes (A001097).
Original entry on oeis.org
-
Filtered([1..300],k->IsPrime(3*2^k-1) and IsPrime(3*2^k+1)); # Muniru A Asiru, Mar 11 2018
-
a:=k->`if`(isprime(3*2^k-1) and isprime(3*2^k+1),k,NULL); seq(a(k),k=1..1000); # Muniru A Asiru, Mar 11 2018
-
fQ[n_] := PrimeQ[3*2^n - 1] && PrimeQ[3*2^n + 1]; k = 1; lst= {}; While[k < 15001, If[fQ@k, AppendTo[lst, k]; Print@k]; k++ ] (* Robert G. Wilson v, Nov 05 2010 *)
Select[Range[20],AllTrue[3*2^#+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 24 2014 *)
-
for( k=1,999, ispseudoprime(3<
A181492
Primes of the form p=3*2^k+1 such that p-2 is also a prime.
Original entry on oeis.org
7, 13, 193, 786433
Offset: 1
-
Select[3 2^Range[100]+1,And@@PrimeQ[{#,#-2}]&] (* Harvey P. Dale, Jun 19 2013 *)
-
for( k=1,999, ispseudoprime(3<
A181493
Numbers of the form 3*2^k which are the average of twin primes, i.e., a(n)-1 and a(n)+1 are both prime.
Original entry on oeis.org
6, 12, 192, 786432
Offset: 1
-
Select[3 2^Range[500],PrimeQ[#-1]&&PrimeQ[#+1]&] (* Harvey P. Dale, Jan 18 2011 *)
-
for( k=1,999, ispseudoprime(3<
A276136
Numbers m > 1 such that the largest odd divisors of m-1, m, and m+1 are prime.
Original entry on oeis.org
6, 11, 12, 13, 23, 47, 192, 193, 383, 786432
Offset: 1
6 is in this sequence because the largest odd divisor of 5 is 5, the largest odd divisor of 6 is 3 and the largest odd divisor of 7 is 7, and all three are prime.
-
[n: n in [2..3000000] | NumberOfDivisors(2*(n-1))- NumberOfDivisors(n-1)eq 2 and NumberOfDivisors(2(n))-NumberOfDivisors(n) eq 2 and NumberOfDivisors(2*(n+1))- NumberOfDivisors(n+1) eq 2];
-
Res:= 6:
for k from 2 while length(3*2^k-1)<1000 do
if (isprime(3*2^k-1) and isprime(3*2^(k-1)-1)) then Res:= Res, 3*2^k-1
fi;
if (isprime(3*2^k-1) and isprime(3*2^k+1)) then Res:= Res, 3*2^k;
fi;
if (isprime(3*2^k+1) and isprime(3*2^(k-1)+1)) then Res:= Res, 3*2^k+1;
fi;
od:
Res; # Robert Israel, Apr 27 2020
-
Select[Range[2, 10^6], Function[n, Times @@ Boole@ PrimeQ@ Map[First@ Reverse@ DeleteCases[Divisors@ #, d_ /; EvenQ@ d] &, n + Range[-1, 1]] == 1]] (* Michael De Vlieger, Aug 22 2016 *)
SequencePosition[Table[If[PrimeQ[Max[Select[Divisors[n],OddQ]]],1,0],{n,800000}],{1,1,1}][[;;,1]]+1 (* Harvey P. Dale, Jun 27 2023 *)
-
isA038550(n)=isprime(n>>valuation(n,2))
is(n)=isA038550(n-1) && isA038550(n) && isA038550(n+1) \\ Charles R Greathouse IV, Aug 22 2016
-
forprime(p=2,1e11, my(a=isA038550(p-1),b=isA038550(p+1)); if(a && isA038550(p-2), print1(p-1", ")); if(a && b, print1(p", ")); if(b && isA038550(p+2), print1(p+1", "))) \\ may print numbers several times, but won't skip numbers; Charles R Greathouse IV, Aug 22 2016
A092680
Numbers of the form 3*2^k with a single anti-divisor.
Original entry on oeis.org
3, 6, 96, 393216
Offset: 1
-
from itertools import count, islice
from sympy.ntheory.factor_ import antidivisor_count
def A092680_gen(): return filter(lambda n: antidivisor_count(n)==1,(3*2**k for k in count(0)))
A092680_list = list(islice(A092680_gen(),4)) # Chai Wah Wu, Jan 04 2022
A181494
Twin primes (A001097) of the form 3*2^k +- 1.
Original entry on oeis.org
5, 7, 11, 13, 191, 193, 786431, 786433
Offset: 1
Showing 1-6 of 6 results.
Comments