login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A233443 Primes that are exactly between the nearest square and the nearest triangular number. 0
2, 5, 23, 47, 193, 389, 1667, 8807, 9431, 10177, 10597, 10847, 11831, 13411, 17183, 22433, 29201, 33893, 36073, 38321, 40093, 42461, 48991, 50131, 54287, 54851, 57037, 63347, 65183, 67121, 71917, 87803, 88607, 91291, 94847, 104491, 108293, 112163, 116101, 117167, 122033 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

A subsequence of A233074.

LINKS

Table of n, a(n) for n=1..41.

MATHEMATICA

nearestTri[n_] := Block[{a = Floor@ Sqrt[ 2n - 1]}, If[ 4n < a (a + 3), a (a - 1)/2, a (a + 1)/2]]; nearestSq[n_] :=  Block[{a = Floor@ Sqrt@ n}, If[a^2 + a + 1/2 > n, a^2, a^2 + 2 a + 1]]; Select[ Prime@ Range@ 12000, 2# == nearestSq@# + nearestTri@# &] (* Robert G. Wilson v, Aug 01 2014 *)

PROG

(PARI) lista(nn) = {forprime(p=2, nn, sqp = sqrtint(p); ps = sqp^2; ns = (sqp+1)^2; sqt = floor((sqrt(8*p+1) - 1)/2); pt = sqt*(sqt+1)/2; nt = (sqt+2)*(sqt+1)/2; if (((ds=p-ps) < (ns-p)) && ((dt=(nt-p)) <= p-pt) && (ds == dt), print1(p, ", "), if (((ds=ns-p) < (p-ps)) && ((dt=(p-pt)) < nt-p) && (ds == dt), print1(p, ", ")); ); ); } \\ Michel Marcus, Aug 11 2014

CROSSREFS

Cf. A000040, A000217, A000290, A233074.

Sequence in context: A215278 A126975 A175444 * A156314 A308055 A173396

Adjacent sequences:  A233440 A233441 A233442 * A233444 A233445 A233446

KEYWORD

nonn

AUTHOR

Alex Ratushnyak, Dec 09 2013

EXTENSIONS

Corrected by Alex Ratushnyak, Jun 08 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 12 23:19 EDT 2020. Contains 336440 sequences. (Running on oeis4.)