A218047
Numbers n such that n^2+1, (n+2)^2+1, (n+6)^2+1, (n+10)^2+1 and (n+12)^2+1 are prime.
Original entry on oeis.org
4, 14, 31464, 37684, 65664, 202034, 287414, 300174, 430044, 630734, 791834, 809244, 885274, 1230334, 1347834, 1411654, 1424674, 1475744, 1635134, 1721844, 1914514, 2391364, 2536414, 2855194, 3151704, 3386994, 3421844, 4010614, 4121494, 4186664, 4566484
Offset: 1
4 is in the sequence because 4^2+1 = 5; 6^2+1 = 37; 10^2+1 = 101; 14^2+1 = 197 and 16^2+1 = 257 are prime.
-
with(numtheory):f:=n->n^2+1: for n from 1 to 460000 do:if type(f(n),prime) and type(f(n+2),prime) and type(f(n+6),prime) and type(f(n+10),prime) and type(f(n+12),prime) then printf(`%d, `,n):else fi:od:
-
lst={}; Do[p1=n^2+1; p2=(n+2)^2+1; p3=(n+6)^2+1; p4=(n+10)^2+1; p5=(n+12)^2+1;If[PrimeQ[p1] && PrimeQ[p2] && PrimeQ[p3] && PrimeQ[p4]&& PrimeQ[p5], AppendTo[lst, n]], {n, 0, 460000}];lst
Select[Range[457*10^4],AllTrue[(#+{0,2,6,10,12})^2+1,PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 30 2019 *)
-
is_A218047(n,d=[0,2,6,10,12])=!for(i=1,#d,isprime(1+(n+d[i])^2) || return)
forstep(n=4,9e9,10,is_A218047(n) & print1(n",")) \\ M. F. Hasler, Oct 21 2012
Given terms a(1..31) double checked by
M. F. Hasler, Oct 21 2012
A316189
Decimal expansion of Sum(1/p + 1/q) as (p, q) runs through the twin m^2 + 1 primes.
Original entry on oeis.org
3, 5, 7, 7, 4, 5, 1, 4, 7
Offset: 0
0.3577451... = (1/5 + 1/17) + (1/17 + 1/37) + (1/197 + 1/257) + ...
- Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, pp. 94-98.
- J. W. L. Glaisher, On the Sums of Inverse Powers of the Prime Numbers, Quart. J. Math. 25, 347-362, 1891.
-
s=N[1/5+1/17,20];Do[p=(10*k+4)^2+1;q=(10*k+6)^2+1;If[PrimeQ[p]&&PrimeQ[q],s=s+1/p+1/q],{k,0,10^7}];Print[N[s,20]]
A351141
Pairs of primes (p,q) = (A002496(m), A002496(m+1)) such that q-p is a power r of the product of its prime factors for some m.
Original entry on oeis.org
37, 101, 577, 677, 15877, 16901, 57601, 62501, 33988901, 34035557, 113209601, 113507717, 121528577, 121572677, 345960001, 346332101, 635040001, 635544101, 7821633601, 7823402501, 17748634177, 17749167077, 24343488577, 24344112677, 97958984257, 97962740101
Offset: 1
The pair (257, 401) = (16^2+1, 20^2+1) is not in the sequence because 401 - 257 = 144 = 2^4*3^2.
The pair (577, 677) = (24^2+1, 26^2+1) is in the sequence because 577 - 677 = 100 = 2^2*5^2.
The pair (33988901, 34035557) = (5830^2+1, 5834^2+1) is in the sequence because 33988901 - 34035557 = 46656 = 2^6*3^6.
-
with(numtheory):
T:=array(1..26):nn:=350000:q:=5:j:=1:
for n from 4 by 2 to nn do:
p:=n^2+1:
if type(p, prime)=true
then
x:=p-q:r:=q:q:=p:
u:=factorset(x):n0:=nops(u):ii:=0:d:=product(u[i],i=1..n0):
for k from 2 to 20 while(ii=0) do:
if d^k=x
then ii=1:T[j]:=r:T[j+1]:=q:j:=j+2:
else
fi:
od:
fi:
od:
print(T):
-
lista(nn) = my(lastp=2); forprime(p=nextprime(lastp+1), nn, if (issquare(p-1), if (ispowerful(p-lastp), my(f=factor(p-lastp)[,2]); if (vecmin(f) == vecmax(f), print1(lastp, ", ", p, ", "));); lastp = p;);); \\ Michel Marcus, Feb 03 2022
Comments