A268867 Number of integers of the form m^2+1 between two consecutive pairs of primes of the same form.
0, 7, 7, 27, 67, 77, 177, 77, 167, 7, 67, 377, 47, 27, 67, 27, 37, 57, 187, 47, 57, 7, 277, 87, 27, 7, 307, 47, 77, 127, 167, 87, 207, 167, 227, 217, 17, 247, 127, 17, 187, 237, 7, 117, 47, 7, 157, 57, 37, 197, 217, 87, 17, 137, 147, 287, 67, 547, 37, 187, 787
Offset: 1
Keywords
Examples
a(1)=0 because there exists 0 number of the form m^2+1 between the two consecutive pairs of primes(2^2+1, 4^2+1) and (4^2+1, 6^2+1); a(2) = 7 because there exists 7 numbers of the form m^2+1 between the two consecutive pairs of primes(4^2+1, 6^2+1) and (14^2+1, 16^2+1): 50, 65, 82, 101, 122, 145 and 170.
Links
- Michel Lagneau, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Finite Group
- Wikipedia, Finite group
- Wikipedia, Multiplicative group of integers modulo n
Programs
-
Maple
nn:=10000:T:=array(1..200):kk:=0: for n from 4 by 2 to nn do: p1:=n^2+1:p2:=(n+2)^2+1: if isprime(p1) and isprime(p2) then kk:=kk+1:T[kk]:=n: else fi: od: for m from 1 to kk-1 do: q:=T[m+1]-T[m]-3:printf(`%d, `,q): od:
-
Mathematica
lst={};Do[If[PrimeQ[n^2+1],AppendTo[lst,n]],{n,1,10000}];Module[{tr=Transpose[Select[Partition[lst,2,1],#[[2]]-#[[1]]==2&]],fir,las},fir=Rest[tr[[1]]];las=Most[tr[[2]]];Flatten[Abs[Differences/@Thread[{fir,las}]]]-1/.{-1->0}]
Comments