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!)
A014692 a(n) = prime(n) - (n-1). 14

%I #54 Oct 19 2017 12:27:31

%S 2,2,3,4,7,8,11,12,15,20,21,26,29,30,33,38,43,44,49,52,53,58,61,66,73,

%T 76,77,80,81,84,97,100,105,106,115,116,121,126,129,134,139,140,149,

%U 150,153,154,165,176,179,180,183,188,189,198,203,208,213,214,219,222,223

%N a(n) = prime(n) - (n-1).

%C Also, number of primes between prime(n) and prime(prime(n)) inclusive. For example, prime(1) = 2, prime(prime(1)) = prime(2) = 3 and there are two primes between 2 and 3 inclusive. - _Zak Seidov_, Sep 22 2003; _N. J. A. Sloane_, Mar 07 2007

%C Since a(n+1) - a(n) = prime(n+1) - prime(n) - 1 >= 1 for n > 1, the sequence is monotonic for n > 1. - _N. J. A. Sloane_, Mar 07 2007

%C a(n) = number of terms < prime(n) in A141468. - _David James Sycamore_, Oct 14 2017

%H David A. Corneth, <a href="/A014692/b014692.txt">Table of n, a(n) for n = 1..10000</a>

%p A014692:=n->ithprime(n)-(n-1): seq(A014692(n), n=1..100); # _Wesley Ivan Hurt_, Oct 15 2017

%t Table[Prime[n] - n + 1, {n, 61}] (* _Geoffrey Critzer_, May 02 2013 *)

%o (PARI) first(n) = {my(t, res = vector(n)); forprime(p=2, , t++; res[t] = p - t + 1; if(t>=n, return(res)))} \\ _David A. Corneth_, Oct 04 2017

%o (PARI) a(n) = prime(n)-n+1; \\ _Altug Alkan_, Oct 05 2017

%Y Cf. A000040, A141468.

%Y Equals A014689 + 1.

%K nonn,easy

%O 1,1

%A _Mohammad K. Azarian_

%E More terms from Andrew J. Gacek (andrew(AT)dgi.net)

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 16 02:41 EDT 2024. Contains 371696 sequences. (Running on oeis4.)