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.

A164556 Primes expressible as the sum of (at least two) consecutive primes in at least 5 ways.

This page as a plain text file.
%I A164556 #11 Dec 25 2021 20:40:04
%S A164556 34421,229841,235493,271919,345011,358877,414221,442019,488603,532823,
%T A164556 621937,655561,824099,888793,896341,935791,954623,963173,988321,
%U A164556 1055969,1083371,1083941,1115911,1170857,1261763,1338823,1352863,1409299,1444957,1598953,1690597
%N A164556 Primes expressible as the sum of (at least two) consecutive primes in at least 5 ways.
%C A164556 Subsequence of A067380.
%H A164556 Jon E. Schoenfield, <a href="/A164556/b164556.txt">Table of n, a(n) for n = 1..3000</a>
%F A164556 A067375 INTERSECT A000040.
%e A164556 a(1) = 34421 = Sum_{i=57..127} prime(i) = Sum_{i=226..248} prime(i) = Sum_{i=527..535} prime(i) = Sum_{i=654..660} prime(i) = Sum_{i=1382..1384} prime(i) and
%e A164556 a(3) = 235493 = Sum_{i=50..284} prime(i) = Sum_{i=120..300} prime(i) = Sum_{i=123..301} prime(i) = Sum_{i=334..424} prime(i) = Sum_{i=7701..7703} prime(i)
%e A164556 are expressible in 5 ways as the sum of two or more consecutive primes.
%t A164556 m=3*7!;lst={};Do[p=Prime[a];Do[p+=Prime[b];If[PrimeQ[p]&&p<Prime[m]*3+8, AppendTo[lst,p]],{b,a+1,m,1}],{a,m}]; lst1=Sort[lst]; lst={};
%t A164556 Do[If[lst1[[n]]==lst1[[n+1]]&&lst1[[n]]==lst1[[n+2]]&&lst1[[n]]==lst1[[n+3]]&&lst1[[n]]==lst1[[n+4]], AppendTo[lst, lst1[[n]]]],{n,Length[lst1]-4}];Union[lst]
%o A164556 (Magma) M:=1695000; P:=PrimesUpTo(M); S:=[0]; for p in P do t:=S[#S]+p; if #S ge 3 then if t-S[#S-2] gt M then break; end if; end if; S[#S+1]:=t;end for; c:=[0:j in [1..M]]; for C in [2..#S-1] do if IsEven(C) then L:=1; else L:=#S-C; end if; for j in [1..L] do s:=S[j+C]-S[j]; if s gt M then break; end if; if IsPrime(s) then c[s]+:=1; end if; end for; end for; [j:j in [1..M]|c[j] ge 5]; // _Jon E. Schoenfield_, Dec 25 2021
%Y A164556 Cf. A067377, A067378, A067379, A067380, A067381.
%K A164556 nonn
%O A164556 1,1
%A A164556 _Vladimir Joseph Stephan Orlovsky_, Aug 15 2009
%E A164556 Examples added by _R. J. Mathar_, Aug 19 2009
%E A164556 a(10)-a(28) from _Donovan Johnson_, Sep 16 2009
%E A164556 a(29)-a(31) from _Jon E. Schoenfield_, Dec 25 2021