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!)
A056893 Smallest prime with square excess of n. 5

%I #11 Jul 28 2013 17:39:31

%S 2,3,7,13,41,31,23,89,73,59,47,61,113,239,79,97,593,139,163,461,277,

%T 191,167,193,281,251,223,317,353,991,431,761,433,563,359,397,521,479,

%U 439,569,617,571,619,773,829,887,947,673,1493,1571,727,1013,953,1279

%N Smallest prime with square excess of n.

%F a(n) =n+A056894(n).

%F a(n) = min{p in A000040: A053186(p) = n}. - _R. J. Mathar_, Jul 28 2013

%e a(4)=13 since 13=3^2+4, while 2, 3, 5, 7 and 11 have square excesses of 1, 2, 1, 3 and 3 respectively.

%p A056893 := proc(n)

%p local p ;

%p p :=2 ;

%p while A053186(p) <> n do

%p p := nextprime(p) ;

%p end do:

%p return p ;

%p end proc: # _R. J. Mathar_, Jul 28 2013

%o (PARI) A056893(n)={

%o local(p=2) ;

%o while( A053186(p)!=n,

%o p=nextprime(p+1)

%o ) ;

%o return(p)

%o } /* _R. J. Mathar_, Jul 28 2013 */

%Y Cf. A053186, A000196, A002496, A048760, A056892-A056898.

%K nonn

%O 1,1

%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 19 07:26 EDT 2024. Contains 371782 sequences. (Running on oeis4.)