|
|
A249012
|
|
Smallest prime such that the multisets of the next n and the following n prime gaps are equal.
|
|
2
|
|
|
3, 5, 3, 23, 11, 13, 23, 263, 304349, 5644939, 151, 5644927, 18068879
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Smallest prime(k) such that the multiset of the n prime gaps after prime(k) equals the multiset of the n prime gaps after prime(n+k).
|
|
LINKS
|
|
|
EXAMPLE
|
a(4)=23 as the prime gaps {2, 4, 6, 6} get repeated for (23, 29, 31, 37, 41) and (41, 43, 47, 53, 59).
a(6)=13 as the prime gaps {4, 2, 4, 6, 6, 2} get repeated for (13, 17, 19, 23, 29, 31, 37) and (37, 41, 43, 47, 53, 59, 61).
|
|
MAPLE
|
local j, gapsetp, gapsetq;
for j from 1 do
gapsetp := [seq(ithprime(j+i)-ithprime(j+i-1), i=1..n)] ;
gapsetq := [seq(ithprime(j+n+i)-ithprime(j+n+i-1), i=1..n)] ;
if sort(gapsetp) = sort(gapsetq) then
return ithprime(j) ;
end if;
end do:
end proc:
for n from 1 do
|
|
PROG
|
(PARI) test(p, n)=my(v=vector(n, i, -p+(p=nextprime(p+1))), u=vector(n, i, -p+(p=nextprime(p+1)))); vecsort(u)==vecsort(v)
|
|
CROSSREFS
|
Cf. A249011 (similar but with exactly the same prime gaps).
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|