A238086
Square array A(n,k), n>=1, k>=1, read by antidiagonals, where column k is the increasing list of all primes p such that (p+k)^2+k is prime but (p+j)^2+j is not prime for all 0
Original entry on oeis.org
3, 7, 5, 11, 31, 13, 29, 47, 37, 19, 193, 41, 59, 43, 23, 139, 331, 113, 61, 79, 53, 107, 523, 409, 163, 67, 97, 73, 181, 293, 563, 457, 173, 71, 103, 83, 101, 277, 359, 769, 487, 199, 127, 241, 89, 17, 191, 541, 389, 853, 787, 211, 131, 271, 109
Offset: 1
Column k=3 contains prime 47 because (47+3)^2+3 = 2503 is prime and (47+2)^2+2 = 2403 = 3^3*89 and (47+1)^2+1 = 2305 = 5*461 are composite.
Square array A(n,k) begins:
: 3, 7, 11, 29, 193, 139, 107, 181, ...
: 5, 31, 47, 41, 331, 523, 293, 277, ...
: 13, 37, 59, 113, 409, 563, 359, 541, ...
: 19, 43, 61, 163, 457, 769, 389, 937, ...
: 23, 79, 67, 173, 487, 853, 397, 1381, ...
: 53, 97, 71, 199, 787, 1019, 401, 1741, ...
: 73, 103, 127, 211, 829, 1489, 433, 2551, ...
: 83, 241, 131, 251, 991, 1553, 461, 2617, ...
-
A:= proc() local h, p, q; p, q:= proc() [] end, 2;
proc(n, k)
while nops(p(k))
-
nmax = 12;
col[k_] := col[k] = Reap[For[cnt = 0; p = 2, cnt < nmax, p = NextPrime[p], If[PrimeQ[(p+k)^2+k] && AllTrue[Range[k-1], !PrimeQ[(p+#)^2+#]&], cnt++; Sow[p]]]][[2, 1]];
A[n_, k_] := col[k][[n]];
Table[A[n-k+1, k], {n, 1, nmax}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, May 03 2019 *)
A246748
Numbers n such that A242719(n) = (prime(n))^2+1 and A242720(n) - A242719(n) = 2*(prime(n)+1).
Original entry on oeis.org
3, 52, 104, 209, 343, 373, 398, 473, 628, 2633, 3273, 7538, 8060, 8813, 9025, 10847, 12493, 13768, 14196, 15486, 16865, 17486, 18362, 18613, 18842, 21175, 23522, 31825, 33537, 34507, 38740, 39603, 41802, 41947, 43314, 45479, 47550, 47668, 47787, 50321, 50682
Offset: 1
A070155
Numbers k such that k-1, k+1 and k^2+1 are prime numbers.
Original entry on oeis.org
4, 6, 150, 180, 240, 270, 420, 570, 1290, 1320, 2310, 2550, 2730, 3360, 3390, 4260, 4650, 5850, 5880, 6360, 6780, 9000, 9240, 9630, 10530, 10890, 11970, 13680, 13830, 14010, 14550, 16230, 16650, 18060, 18120, 18540, 19140, 19380, 21600, 21840
Offset: 1
150 is a term since 149, 151 and 22501 are all primes.
Cf.
A000005,
A000720,
A001359,
A006512,
A014574,
A002496,
A005574,
A070156,
A070689,
A129293,
A157468,
A242720.
-
select(n -> isprime(n-1) and isprime(n+1) and isprime(n^2+1), [seq(2*i,i=1..10000)]); # Robert Israel, Sep 02 2014
-
Do[s=n; If[PrimeQ[s-1]&&PrimeQ[s+1]&&PrimeQ[1+s^2], Print[n]], {n, 1, 1000000}]
Select[Range[22000],AllTrue[{#+1,#-1,#^2+1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 19 2014 *)
-
is(k) = isprime(k-1) && isprime(k+1) && isprime(k^2+1); \\ Amiram Eldar, Apr 15 2024
A246824
Numbers k for which A242720(k) = (prime(k)+1)^2 + 2.
Original entry on oeis.org
3, 35, 41, 52, 57, 81, 104, 209, 215, 343, 373, 398, 473, 477, 584, 628, 768, 774, 828, 872, 1117, 1145, 1189, 1287, 1324, 1435, 1615, 1634, 1653, 1704, 1886, 1925, 2070, 2075, 2123, 2171, 2193, 2425, 2449, 2605, 2633, 2934, 2948, 3019, 3194, 3273, 3533, 3552, 3685, 3758
Offset: 1
-
lpf[n_] := FactorInteger[n][[1, 1]]; aQ[n_] := Module[{k=6}, While[PrimeQ[k-3] && PrimeQ[k-1] || lpf[k-1]<=lpf[k-3] || lpf[k-3]Amiram Eldar, Dec 10 2018 *)
-
lpf(k) = factorint(k)[1, 1];
f(n) = my(k=6); while((isprime(k-3) && isprime(k-1)) || lpf(k-1)<=lpf(k-3) || lpf(k-3)A242720
isok(n) = f(n) == (prime(n)+1)^2 + 2; \\ Michel Marcus, Dec 10 2018
-
from sympy import prime, isprime, factorint
A246824_list = [a for a, b in ((n, prime(n)+1) for n in range(3,10**3)) if (not (isprime(b**2-1) and isprime(b**2+1)) and (min(factorint(b**2+1)) > min(factorint(b**2-1)) >= b-1))] # Chai Wah Wu, Jun 03 2019
A238048
Square array A(n,k), n>=1, k>=1, read by antidiagonals, where column k is the increasing list of all primes p such that (p+k)^2+k is also prime.
Original entry on oeis.org
3, 7, 5, 5, 13, 13, 3, 7, 19, 19, 7, 11, 11, 31, 23, 5, 31, 13, 19, 37, 53, 3, 13, 43, 23, 47, 43, 73, 7, 5, 19, 67, 29, 59, 79, 83, 11, 13, 11, 29, 73, 31, 61, 97, 89, 3, 23, 43, 19, 59, 109, 41, 67, 103, 109, 13, 17, 29, 73, 23, 73, 157, 43, 71, 109, 149
Offset: 1
Column k=3 contains prime 47 because (47+3)^2+3 = 2503 is prime.
Square array A(n,k) begins:
3, 7, 5, 3, 7, 5, 3, 7, ...
5, 13, 7, 11, 31, 13, 5, 13, ...
13, 19, 11, 13, 43, 19, 11, 43, ...
19, 31, 19, 23, 67, 29, 19, 73, ...
23, 37, 47, 29, 73, 59, 23, 79, ...
53, 43, 59, 31, 109, 73, 29, 103, ...
73, 79, 61, 41, 157, 83, 31, 109, ...
83, 97, 67, 43, 163, 103, 41, 127, ...
-
A:= proc(n, k) option remember; local p;
p:= `if`(n=1, 1, A(n-1, k));
do p:= nextprime(p);
if isprime((p+k)^2+k) then return p fi
od
end:
seq(seq(A(n, 1+d-n), n=1..d), d=1..11);
-
A[n_, k_] := A[n, k] = Module[{p}, For[p = If[n == 1, 1, A[n-1, k]] // NextPrime, True, p = NextPrime[p], If[PrimeQ[(p+k)^2+k], Return[p]]]]; Table[Table[A[n, 1+d-n], {n, 1, d}], {d, 1, 11}] // Flatten (* Jean-François Alcover, Jan 19 2015, after Alois P. Heinz *)
A343148
Numbers k such that A083266(k) is prime.
Original entry on oeis.org
2, 6, 10, 15, 21, 26, 28, 30, 35, 38, 39, 40, 42, 44, 45, 46, 51, 55, 60, 63, 68, 69, 70, 78, 84, 93, 95, 96, 102, 105, 106, 116, 123, 124, 126, 130, 135, 136, 138, 143, 146, 150, 153, 155, 166, 174, 176, 178, 201, 203, 205, 218, 219, 221, 222, 231, 232, 234, 236, 240, 244, 245, 246, 248, 249
Offset: 1
a(3) = 10 is a term because A083266(10) = 37 is prime.
-
f:= n -> numtheory:-sigma(n) + n*numtheory:-phi(n)/2 - 1:
select(t -> isprime(f(t)), [$2..1000]);
-
Select[Range[250], PrimeQ[DivisorSigma[1, #] + # EulerPhi[#]/2 - 1] &] (* Michael De Vlieger, Apr 07 2021 *)
A359185
Numbers k such that for any positive integers x,y, if x*y=k then (x+y)^2+1 is a prime number.
Original entry on oeis.org
1, 3, 5, 9, 13, 19, 23, 25, 39, 53, 55, 73, 83, 89, 109, 119, 133, 149, 155, 159, 169, 179, 203, 223, 229, 239, 263, 269, 283, 299, 305, 313, 339, 349, 383, 395, 419, 439, 443, 463, 469, 473, 543, 569, 593, 643, 653, 673, 689, 699, 703, 713, 739, 763, 859, 863, 889, 909
Offset: 1
909 is in the sequence because 909 = 3^2*101 with 3 decompositions:
909 = 1*909 and (1+909)^2+1 = 910^2+1 = 828101 is prime;
909 = 3*303 and (3+303)^2+1 = 306^2+1 = 93637 is prime;
909 = 9*101 and (9+101)^2+1 = 110^2+1 = 12101 is prime.
-
filter:= proc(n) local F;
F:= select(t -> t^2 <= n, numtheory:-divisors(n));
andmap(t -> isprime((t + n/t)^2+1), F)
end proc:
select(filter, [seq(i,i=1..1000,2)]); # Robert Israel, Mar 05 2024
-
t={};Do[ds=Divisors[n];k=1;While[k<=(Length[ds]+1)/2&&(ok=PrimeQ[(ds[[k]]+ds[[-k]])^2+1]),k++];If[ok,AppendTo[t,n]],{n,1,2000}];t
-
isok(k) = fordiv(k, d, if ((d<=k/d) && !isprime((d+k/d)^2+1), return(0));); return(1); \\ Michel Marcus, Dec 19 2022
A157473
Primes p such that (p-2)^(1/3) -+ 2 are also primes.
Original entry on oeis.org
2, 127, 91127, 328511, 1157627, 2146691, 12326393, 125751503, 693154127, 751089431, 1033364333, 2102071043, 2222447627, 2893640627, 3314613773, 3951805943, 6591796877, 9063964127, 13464285941, 16406426423, 19880486831
Offset: 1
(127-2)^(1/3) - 2 = 3 and (127-2)^(1/3) + 2 = 7, so 127 is in the sequence.
-
q=2;lst={};Do[p=Prime[n];r=(p-q)^(1/3)-q;u=(p-q)^(1/3)+q;If[PrimeQ[r]&&PrimeQ[u],AppendTo[lst,p]],{n,4*9!}];lst
lst = {}; p = 0; While[p < 2955, If[ PrimeQ[p - 2] && PrimeQ[p + 2] && PrimeQ[p^3 + 2], AppendTo[lst, p^3 + 2]]; p++ ]; lst (* Robert G. Wilson v, Mar 08 2009 *)
Select[Prime[Range[10^6]],AllTrue[Surd[#-2,3]+{2,-2},PrimeQ]&] (* The program generates the first 7 terms of the sequence. *) (* Harvey P. Dale, Aug 31 2024 *)
Showing 1-8 of 8 results.
Comments