OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..255 from Zak Seidov)
FORMULA
a(n) = sqrt(prime(i) + prime(i+1) + prime(i+2)) where i = A076305(n). [Corrected by M. F. Hasler, Jan 03 2020]
EXAMPLE
7 is in this sequence because 7^2 = 49 = p(6) + p(7) + p(8) = 13 + 17 + 19.
MATHEMATICA
Select[Table[Sqrt[Sum[Prime[k], {k, n, n + 2}]], {n, 100000}], IntegerQ] (* Ray Chandler, Sep 29 2006 *)
Select[Sqrt[#]&/@(Total/@Partition[Prime[Range[90000]], 3, 1]), IntegerQ] (* Harvey P. Dale, Feb 23 2011 *)
PROG
(PARI) is(n, p=precprime(n^2/3), q=nextprime(p+1), t=n^2-p-q)=isprime(t) && t==if(t>q, nextprime(q+1), precprime(p-1)) \\ Charles R Greathouse IV, May 26 2013; edited by M. F. Hasler, Jan 03 2020
(PARI) A76304=[7]; apply( A076304(n)={if(n>#A76304, my(i=#A76304, N=A76304[i]); A76304=concat(A76304, vector(n-i, i, until( is(N+=2), ); N))); A76304[n]}, [1..99]) \\ M. F. Hasler, Jan 03 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Oct 05 2002
STATUS
approved