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!)
A031166 a(n) = prime(n+4) - prime(n). 11
9, 10, 12, 12, 12, 16, 14, 18, 18, 14, 16, 16, 18, 18, 20, 18, 14, 18, 16, 18, 24, 22, 20, 18, 12, 12, 24, 24, 28, 26, 22, 20, 20, 24, 18, 22, 22, 18, 24, 20, 18, 18, 20, 30, 30, 30, 22, 16, 14, 22, 24, 24, 28, 20, 20, 18, 14, 22, 30, 30, 30, 24, 24, 26, 34, 32, 22 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = A031131(n) + A031131(n+2) = A001223(n) + A031165(n+1) and obvious variants. - M. F. Hasler, Dec 03 2018
MAPLE
A031166 := n -> ithprime(n+4)-ithprime(n);
MATHEMATICA
a=4; t=Array[Prime, 123]; Drop[t, a]-Drop[t, -a] (* Vladimir Joseph Stephan Orlovsky, Aug 13 2009 *)
PROG
(Magma) [NthPrime(n+4)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 23 2011
(Haskell) a031166_list = zipWith (-) (drop 4 a000040_list) a000040_list
a031166 n = a031166_list !! (n-1) -- Reinhard Zumkeller, Aug 23 2015
(PARI) A031166(n)=prime(n+4)-prime(n) \\ M. F. Hasler, Dec 03 2018
CROSSREFS
Sequence in context: A048013 A048048 A136835 * A202706 A104627 A188057
KEYWORD
nonn
AUTHOR
EXTENSIONS
Offset changed from 2 to 1, and a(1)=9 added, by Vincenzo Librandi, Apr 23 2011
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 April 25 13:12 EDT 2024. Contains 371969 sequences. (Running on oeis4.)