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!)
A056892 a(n) = square excess of the n-th prime. 20

%I #26 Oct 19 2018 16:59:37

%S 1,2,1,3,2,4,1,3,7,4,6,1,5,7,11,4,10,12,3,7,9,15,2,8,16,1,3,7,9,13,6,

%T 10,16,18,5,7,13,19,23,4,10,12,22,24,1,3,15,27,2,4,8,14,16,26,1,7,13,

%U 15,21,25,27,4,18,22,24,28,7,13,23,25,29,35,6,12,18,22,28,36,1,9,19,21

%N a(n) = square excess of the n-th prime.

%H M. F. Hasler, <a href="/A056892/b056892.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A053186(A000040(n)).

%F a(n) = A000040(n) - A000006(n)^2. - _M. F. Hasler_, Oct 04 2009

%e a(5) = 2 since the 5th prime is 11 = 3^2 + 2.

%e From _M. F. Hasler_, Oct 19 2018: (Start)

%e Written as a table, starting a new row when a square is reached, the sequence reads:

%e 1, 2, // = 2 - 1, 3 - 1 = {primes between 1^2 = 1 and 2^2 = 4} - 1

%e 1, 3, // = 5 - 4, 7 - 4 = {primes between 2^2 = 4 and 3^2 = 9} - 4

%e 2, 4, // = 11 - 9, 13 - 9 = {primes between 3^2 = 9 and 4^2 = 16} - 9

%e 1, 3, 7, // = 17 - 16, 19 - 16, 23 - 16 = {primes between 16 and 25} - 16

%e 4, 6, // = 29 - 25, 31 - 25 = {primes between 5^2 = 25 and 6^2 = 36} - 25

%e 1, 5, 7, 11, // = {37, 41, 43, 47: primes between 6^2 = 36 and 7^2 = 49} - 36

%e 4, 10, 12, // = {53, 59, 61: primes between 7^2 = 49 and 8^2 = 64} - 49

%e 3, 7, 9, 15, // = {67, 71, 73, 79: primes between 8^2 = 64 and 9^2 = 81} - 64

%e 2, 8, 16, // = {83, 89, 97: primes between 9^2 = 81 and 10^2 = 100} - 81

%e etc. (End)

%t lst={};Do[p=Prime[n];s=p^(1/2);f=Floor[s];a=f^2;d=p-a;AppendTo[lst,d],{n,6!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Mar 11 2009 *)

%t #-Floor[Sqrt[#]]^2&/@Prime[Range[90]] (* _Harvey P. Dale_, Jul 06 2014 *)

%o (PARI) A056892(n)={my(p=prime(n));p-sqrtint(p)^2} \\ _M. F. Hasler_, Oct 04 2009

%Y Cf. A000040, A000196, A002496, A048760, A053186, A056893 .. A056898.

%Y When written as a table, row lengths are A014085, and row sums are A108314 - A014085 * A000290 = A320688.

%K nonn

%O 1,2

%A _Henry Bottomley_, Jul 05 2000

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 24 11:01 EDT 2024. Contains 371936 sequences. (Running on oeis4.)