A090686
Primes of the form 6n^2 - 1.
Original entry on oeis.org
5, 23, 53, 149, 293, 383, 599, 863, 1013, 1733, 2399, 2903, 4373, 4703, 5399, 6143, 7349, 8663, 11093, 12149, 16223, 18149, 20183, 21599, 23063, 23813, 25349, 27743, 29399, 31973, 33749, 35573, 40343, 41333, 45413, 51893, 56453, 59999, 62423
Offset: 1
-
[a: n in [0..500] | IsPrime(a) where a is 6*n^2-1]; // Vincenzo Librandi, Dec 05 2011
-
lst={};Do[p=6*n^2-1;If[PrimeQ[p],AppendTo[lst,p]],{n,0,3*5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jan 27 2009 *)
Select[Table[6n^2-1,{n,0,700}],PrimeQ] (* Vincenzo Librandi, Dec 05 2011 *)
-
mx2pmp(n) = { for(x=1,n, y = 6*x^2-1; if(isprime(y),print1(y",")) ) }
A247965
a(n) is the smallest number k such that m*k^2+1 is prime for all m = 1 to n.
Original entry on oeis.org
1, 1, 6, 3240, 113730, 30473520, 3776600100, 16341921960, 3332396388090
Offset: 1
a(3)=6 because 6^2+1 = 37, 2*6^2+1 = 73 and 3*6^2+1 = 109 are prime numbers.
The resulting primes begin like this:
2;
2, 3;
37, 73, 109;
10497601, 20995201, 31492801, 41990401;
... - _Michel Marcus_, Sep 29 2014
-
for n from 1 to 6 do:
ii:=0:
for k from 1 to 10^10 while(ii=0) do:
ind:=0:
for m from 1 to n do:
p:=m*k^2+1:
if type(p,prime) then
ind:=ind+1:
fi:
od:
if ind=n then
ii:=1:printf ( "%d %d \n",n,k):
fi:
od:
od:
-
a(n)=k=1;while(k,c=0;for(i=1,n,if(!ispseudoprime(i*k^2+1),c++;break));if(!c,return(k));if(c,k++))
n=1;while(n<10,print1(a(n),", ");n++) \\ Derek Orr, Sep 28 2014
A346948
Isolated single primes enclosed by six composites on hexagonal spiral board of odd numbers.
Original entry on oeis.org
211, 257, 277, 331, 509, 563, 587, 647, 653, 673, 683, 709, 751, 757, 839, 853, 919, 983, 997, 1087, 1117, 1123, 1163, 1283, 1433, 1447, 1493, 1531, 1579, 1637, 1733, 1777, 1889, 1913, 1973, 1993, 2179, 2207, 2251, 2273, 2287, 2333, 2357, 2399, 2447, 2467
Offset: 1
3 is not a term because four of the six neighbors (1, 5, 13, 15, 17 and 19) are primes.
211 is a term because 211 is a prime and all six neighbors (145, 147, 209, 213, 287 and 289) are composites.
-
from sympy import isprime; from math import sqrt, ceil
def neib(m):
if m == 1: return [3, 5, 7, 9, 11, 13]
if m == 3: return [17, 19, 5, 1, 13, 15]
L = [m for i in range(6)]; n = int(ceil((3+sqrt(6*m + 3))/6)); x=6*n*n; y=12*n
a0 = x-18*n+15; a1 =x-16*n+11; a2 =x-14*n+9
a3 = x-y+7; a4 =x-10*n+5; a5 =x-8*n+3; a6 =x-6*n+1
p = 0 if m==a0 else 1 if m>a0 and ma1 and ma2 and ma3 and ma4 and ma5 and m
Showing 1-3 of 3 results.
Comments