A174144
Primes of the form 2^p*3^q*5^r*7^s + 1.
Original entry on oeis.org
2, 3, 5, 7, 11, 13, 17, 19, 29, 31, 37, 41, 43, 61, 71, 73, 97, 101, 109, 113, 127, 151, 163, 181, 193, 197, 211, 241, 251, 257, 271, 281, 337, 379, 401, 421, 433, 449, 487, 491, 541, 577, 601, 631, 641, 673, 701, 751, 757, 769, 811, 883, 1009, 1051, 1153, 1201
Offset: 1
6301 = 2^2 * 3^2 * 5^2 * 7 + 1.
-
K:=10^7;; # to get all terms <= K.
A:=Filtered([1..K],IsPrime);; I:=[3,5,7];;
B:=List(A,i->Elements(Factors(i-1)));;
C:=List([0..Length(I)],j->List(Combinations(I,j),i->Concatenation([2],i)));
A174144:=Concatenation([2],List(Set(Flat(List([1..Length(C)],i->List([1..Length(C[i])], j->Positions(B,C[i][j]))))),i->A[i])); # Muniru A Asiru, Sep 12 2017
-
[p: p in PrimesUpTo(2000) | forall{d: d in PrimeDivisors(p-1) | d le 7}]; // Bruno Berselli, Sep 24 2012
-
with(numtheory):T:=array(0..50000000):U=array(0..50000000 ):k:=1:for a from 0 to 25 do:for b from 0 to 16 do:for c from 0 to 16 do:for d from 0 to 16 do: p:= 2^a*3^b*5^c*7^d + 1:if type(p, prime)=true then T[k]:=p:k:=k+1: else fi: od :od:od:od:mini:=T[1]:ii:=1:for p from 1 to k-1 do:for n from 1 to k-1 do: if T[n] < mini then mini:= T[n]:ii:=n: indice:=U[n]: else f i:od:print(mini):T[ii]:= 10^30: ii:=1:mini:=T[1] :od:
-
Take[ Select[ Sort[ Flatten[ Table[2^a*3^b*5^c*7^d + 1, {a, 0, 25}, {b, 0, 16},{c, 0, 16},{d, 0, 16}]]], PrimeQ[ # ] &], 100] (* or *) PrimeFactors[n_Integer] := Flatten[ Table[ #[[1]], {1}] & /@ FactorInteger[n]]; f[n_Integer] := Block[{m = n}, If[m == 0, m = 1, While[ IntegerQ[m/2], m /= 2]; While[ IntegerQ[m/3], m /= 3]]; Apply[Times, PrimeFactors[m] - 1]]; ClassMinusNbr[n_] := Length[NestWhileList[f, n, UnsameQ, All]] - 3; Prime[ Select[ Range[3, 6300],
ClassMinusNbr[ Prime[ # ]] == 1 &]] Select[Prime /@ Range[10^5], Max @@ First /@ FactorInteger[ # - 1] < 5 &]
-
list(lim)={
lim\=1;
my(v=List([2]),s,t,p);
for(i=0,log(lim\2+.5)\log(7),
t=2*7^i;
for(j=0,log(lim\t+.5)\log(5),
s=t*5^j;
while(s < lim,
p=s;
while(p < lim,
if(isprime(p+1),listput(v,p+1));
p <<= 1
);
s *= 3;
)
)
);
vecsort(Vec(v))
}; \\ Charles R Greathouse IV, Sep 21 2011
-
A174144 = list(p for p in primes(2000) if set(prime_factors(p-1)) <= set([2,3,5,7]))
A175257
a(n) is the smallest prime p such that 2^(p-1) == 1 (mod a(1)*...*a(n-1)*p).
Original entry on oeis.org
3, 5, 13, 37, 73, 109, 181, 541, 1621, 4861, 9721, 19441, 58321, 87481, 379081, 408241, 2041201, 2449441, 7348321, 14696641, 22044961, 95528161, 382112641, 2292675841, 8024365441, 40121827201, 481461926401, 722192889601, 2888771558401, 7944121785601, 55608852499201, 111217704998401, 889741639987201, 1779483279974401
Offset: 1
-
i=1;Do[p=Prime[n];If[Mod[2^(p-1)-1,p*i]==0,Print[p];i=p*i],{n,2,78498}]
-
findprime(prd) = {forprime(p=2, , if (Mod(2, p*prd)^(p-1) == 1, return (p)););}
lista(nn) = {my(prd = 1, na); for (n=1, nn, na = findprime(prd); print1(na, ", "); prd *= na;);} \\ Michel Marcus, Mar 14 2019
-
{ a175257_first_terms(N=1000) = my(P,L,t); P=[3]; L=2; for(n=#P,N, print(n," ",P[n]); forstep(p=P[n],oo,Mod(1,L), if(p==P[n], if(Mod(2,p^2)^(p-1)==1, error("Wieferich prime!"), next)); if(ispseudoprime(p), P=concat(P,[p]); t=Mod(2,p)^L; fordiv((p-1)\L,d, if(t^d==1, L*=d; break)); break))); P; } \\ Max Alekseyev, Sep 29 2024
Eliminated a(0)=1 in the definition (empty products equal 1). -
R. J. Mathar, Jun 19 2021
A293008
Primes of the form 2^q * 3^r * 7^s + 1.
Original entry on oeis.org
2, 3, 5, 7, 13, 17, 19, 29, 37, 43, 73, 97, 109, 113, 127, 163, 193, 197, 257, 337, 379, 433, 449, 487, 577, 673, 757, 769, 883, 1009, 1153, 1297, 1373, 1459, 2017, 2269, 2593, 2647, 2689, 2917, 3137, 3457, 3529, 3889, 7057, 8233, 10369, 10753, 12097, 12289, 14407, 15877, 17497, 18433
Offset: 1
With n = 1, a(1) = 2^0 * 3^0 * 7^0 + 1 = 2.
With n = 5, a(5) = 2^2 * 3^1 * 7^0 + 1 = 13.
list of (q, r, s): (0, 0, 0), (1, 0, 0), (2, 0, 0), (1, 1, 0), (2, 1, 0), (4, 0, 0), (1, 2, 0), (2, 0, 1), (2, 2, 0), (1, 1, 1), ...
Cf.
A002200 (Primes of the form 2^q * 3^r * 5^s + 1).
-
K:=10^7+1;; # to get all terms <= K.
A:=Filtered([1..K],IsPrime);; I:=[3,7];;
B:=List(A,i->Elements(Factors(i-1)));;
C:=List([0..Length(I)],j->List(Combinations(I,j),i->Concatenation([2],i)));;
A293008:=Concatenation([2],List(Set(Flat(List([1..Length(C)],i->List([1..Length(C[i])],j->Positions(B,C[i][j]))))),i->A[i]));
-
With[{n = 19000}, Union@ Select[Flatten@ Table[2^p1*3^p2*7^p4 + 1, {p1, 0, Log[2, n/(1)]}, {p2, 0, Log[3, n/(2^p1)]}, {p4, 0, Log[7, n/(2^p1*3^p2)]}], PrimeQ]] (* Michael De Vlieger, Sep 30 2017 *)
A293048
Primes of the form 2^q * 3^r * 11^s + 1.
Original entry on oeis.org
2, 3, 5, 7, 13, 17, 19, 23, 37, 67, 73, 89, 97, 109, 163, 193, 199, 257, 353, 397, 433, 487, 577, 727, 769, 1153, 1297, 1409, 1453, 1459, 1783, 2113, 2179, 2377, 2593, 2663, 2917, 3169, 3457, 3889, 4357, 5347, 6337, 7129, 8713, 10369, 11617, 12289, 15973, 17497, 18433, 19009, 19603
Offset: 1
2 = a(1) = 2^0 * 3^0 * 11^0 + 1.
13 = a(5) = 2^2 * 3^1 * 11^0 + 1 = 13.
list of (q, r, s): (0, 0, 0), (1, 0, 0), (2, 0, 0), (1, 1, 0), (2, 1, 0), (4, 0, 0), (1, 2, 0), (2, 0, 1), (2, 2, 0), (1, 1, 1), ...
Cf. Sequences of primes of the form 2^q * 3^r * b^s + 1:
A002200 (b = 5),
A293008 (b = 7).
-
K:=10^5+1;; # to get all terms <= K.
A:=Filtered([1..K],IsPrime);; I:=[3,11];;
B:=List(A,i->Elements(Factors(i-1)));;
C:=List([0..Length(I)],j->List(Combinations(I,j),i->Concatenation([2],i)));;
A293048:=Concatenation([2],List(Set(Flat(List([1..Length(C)],i->List([1..Length(C[i])],j->Positions(B,C[i][j]))))),i->A[i]));
-
With[{n = 20000}, Union@ Select[Flatten@ Table[2^p1*3^p2*11^p5 + 1, {p1, 0, Log[2, n/(1)]}, {p2, 0, Log[3, n/(2^p1)]}, {p5, 0, Log[11, n/(2^p1*3^p2)]}], PrimeQ]] (* Michael De Vlieger, Sep 30 2017 *)
Showing 1-4 of 4 results.
Comments