cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A168152 a(n) = prime(prime(n)) - prime(n).

Original entry on oeis.org

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
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 19 2009

Keywords

Crossrefs

Programs

  • Magma
    [NthPrime(NthPrime(n))-NthPrime(n): n in [1..60]]; // Vincenzo Librandi, Jul 15 2016
    
  • 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 *)
  • PARI
    a(n) = my(p=prime(n)); prime(p) - p; \\ Michel Marcus, Mar 08 2022

Formula

a(n) = A006450(n) - A000040(n).
a(n) ~ n (log n)^2. -Charles R Greathouse IV, May 25 2011

Extensions

a(10) corrected by R. J. Mathar, Nov 19 2009