login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
A249012 := proc(n)
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
print(A249012(n)) ;
end do: # R. J. Mathar, Nov 17 2014
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)
a(n)=forprime(p=3, , if(test(p, n), return(p))) \\ Charles R Greathouse IV, Oct 21 2014
CROSSREFS
Cf. A249011 (similar but with exactly the same prime gaps).
Sequence in context: A094466 A134771 A080349 * A249908 A195418 A366857
KEYWORD
nonn,more
AUTHOR
Abhiram R Devesh, Oct 18 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 15:34 EDT 2024. Contains 374584 sequences. (Running on oeis4.)