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!)
A214036 Numbers n such that floor(sqrt(1)) + floor(sqrt(2)) + floor(sqrt(3)) + ... + floor(sqrt(n)) is prime. 1
2, 3, 4, 5, 7, 8, 10, 14, 36, 37, 39, 42, 43, 44, 46, 47 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The sequence is complete. Indeed, let s(n) be the sum of floor(sqrt(k)) for k from 1 to n. It is easy to verify that s(n^2+j), for 0 <= j < (n+1)^2-n^2, is equal to n(j+1) + n(4n+1)(n-1)/6, which is always divisible by n or by n/6 for n > 6. - Giovanni Resta, Mar 26 2014
LINKS
EXAMPLE
2 is a term because floor(sqrt(1))+floor(sqrt(2)) = 1+1 = 2 is prime;
14 is a term because floor(sqrt(1))+ ... +floor(sqrt(14)) = 1+1+1+2+2+2+2+2+3+3+3+3+3+3 = 31 is prime.
MAPLE
A214036:=proc(q) local a, n; a:=0;
for n from 1 to q do a:=a+floor(sqrt(n)); if isprime(a) then print(n); fi; od; end:
A214036(10^10);
Alternative program:
A214036_bis:=proc(q) local a, j, n; a:=0;
for n from 1 to q do for j from 1 to 2*n+1 do
a:=a+n; if isprime(a) then print(n^2+j-1); fi;
od; od; end:
A214036_bis(10^10);
MATHEMATICA
Position[Accumulate[Table[Floor[Sqrt[n]], {n, 50}]], _?PrimeQ]//Flatten (* Harvey P. Dale, Apr 14 2017 *)
PROG
(PARI)
default(realprecision, 66);
sm = 0; /* sum(n>=1, floor(sqrt(n)) */
for (n=1, 10^9, sm+=sqrtint(n); if (isprime(sm), print1(n, ", ")));
/* Joerg Arndt, Mar 07 2013 */
CROSSREFS
Cf. A220953.
Sequence in context: A339279 A034296 A075745 * A100289 A255130 A054021
KEYWORD
nonn,fini,full
AUTHOR
Paolo P. Lava, Mar 06 2013
STATUS
approved

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 19:06 EDT 2024. Contains 371962 sequences. (Running on oeis4.)