cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A132955 Smallest prime in a sequence of n consecutive primes which add to a perfect square.

This page as a plain text file.
%I A132955 #15 Sep 06 2015 14:15:04
%S A132955 17,13,5,181,587,13,163,2,13789,1013,163,653,11,3931,397,2039,439,
%T A132955 4447,1217,269,1733,3,5,2239,197,3,1061,14563,1901,3,149,359,2137,67,
%U A132955 433,11,907,2339,673,19181,11593,89,6883,3,28571,997,43,3559,2287,1931,911
%N A132955 Smallest prime in a sequence of n consecutive primes which add to a perfect square.
%C A132955 Essentially the same as A073887.
%H A132955 Zak Seidov, <a href="/A132955/b132955.txt">Table of n, a(n) for n = 2..1000</a>
%F A132955 a(n)={ min prime(k): [ sum(j=k..k+n-1) prime(j)] in A000290}. - _R. J. Mathar_, Nov 27 2007
%e A132955 a(2)=17, because it is the smallest prime in a sequence of n=2 consecutive primes, which add to a perfect square, namely 17+19=36=6^2. The sums of earlier pairs, 2+3, 3+5, 5+7, 7+11 etc. fail to produces sums which are any perfect square.
%t A132955 Module[{prs=Prime[Range[3200]]},Table[First[SelectFirst[Partition[ prs, n,1],IntegerQ[ Sqrt[Total[#]]]&]],{n,2,52}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* _Harvey P. Dale_, Sep 06 2015 *)
%o A132955 (PARI) a(n) = {ip = 1; while (! issquare(sum(i=ip, ip+n-1, prime(i))), ip++); prime(ip);} \\ _Michel Marcus_, Jun 08 2014
%Y A132955 Cf. A132956, A132957.
%K A132955 easy,nonn
%O A132955 2,1
%A A132955 _Enoch Haga_, Sep 06 2007
%E A132955 Edited by _R. J. Mathar_, Nov 27 2007