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!)
A168152 a(n) = prime(prime(n)) - prime(n). 3
1, 2, 6, 10, 20, 28, 42, 48, 60, 80, 96, 120, 138, 148, 164, 188, 218, 222, 264, 282, 294, 322, 348, 372, 412, 446, 460, 480, 490, 504, 582, 608, 636, 658, 710, 726, 762, 804, 824, 858, 884, 906, 962, 978, 1004, 1018, 1086, 1186, 1206, 1218, 1238, 1260, 1282 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A006450(n) - A000040(n).
a(n) ~ n (log n)^2. -Charles R Greathouse IV, May 25 2011
MAPLE
A168152 := proc(n) local p; p := ithprime(n) ; ithprime(p)-p ; end proc: seq(A168152(n), n=1..120) ; # R. J. Mathar, Nov 19 2009
MATHEMATICA
Table[Prime[Prime[n]] - Prime[n], {n, 1, 100}] (* G. C. Greubel, Jul 14 2016 *)
Prime[#]-#&/@Prime[Range[100]] (* Harvey P. Dale, Nov 16 2022 *)
PROG
(Magma) [NthPrime(NthPrime(n))-NthPrime(n): n in [1..60]]; // Vincenzo Librandi, Jul 15 2016
(PARI) a(n) = my(p=prime(n)); prime(p) - p; \\ Michel Marcus, Mar 08 2022
CROSSREFS
Sequence in context: A239542 A007926 A320942 * A211982 A096338 A198381
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(10) corrected by R. J. Mathar, Nov 19 2009
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 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)