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.

A089228 Numbers m such that 1 + Sum_{k=1..m} prime(k) is prime.

This page as a plain text file.
%I A089228 #22 Aug 10 2023 03:33:28
%S A089228 1,3,5,7,9,13,19,25,29,31,49,51,57,97,99,103,109,119,123,127,163,169,
%T A089228 179,185,195,207,209,211,213,217,221,223,233,235,239,251,261,269,273,
%U A089228 289,295,297,303,325,329,333,347,369,371,375,409,439,449,453,455,467
%N A089228 Numbers m such that 1 + Sum_{k=1..m} prime(k) is prime.
%C A089228 Also numbers n such that the sum of the first n "primes", as defined in A008578, is prime. Analogous to A013916. - _Robert G. Wilson v_, May 19 2015
%C A089228 Integers k such that A007504(k) + 1 is prime. - _Michel Marcus_, Aug 10 2023
%H A089228 Robert Israel, <a href="/A089228/b089228.txt">Table of n, a(n) for n = 1..10000</a>
%e A089228 25 is a term: 1 + Sum_{k=1..25} prime(k) = 1061 is prime.
%p A089228 a:=proc(n) if isprime(1+add(ithprime(k),k=1..n))=true then n else fi end: seq(a(n),n=1..600); # _Emeric Deutsch_, Jul 02 2005
%p A089228 # alternative
%p A089228 Primes:= select(isprime,[2,seq(2*i+1,i=1..10^5)]):
%p A089228 PS:= ListTools:-PartialSums(Primes):
%p A089228 select(t -> isprime(PS[t]+1), [$1..nops(PS)]); # _Robert Israel_, May 19 2015
%t A089228 Position[1 + Accumulate@ Prime@ Range@ 600, _?(PrimeQ@# &)] // Flatten (* after Harvey P. Dale from A013916 *) (* _Robert G. Wilson v_, May 19 2015 *)
%o A089228 (PARI) for(n=1,10^3,if(isprime(1+sum(i=1,n,prime(i))),print1(n,", "))) \\ _Derek Orr_, May 19 2015
%Y A089228 Cf. A007504, A008578, A013916, A014284.
%K A089228 nonn
%O A089228 1,2
%A A089228 _Yalcin Aktar_, Dec 10 2003
%E A089228 Corrected and extended by _Emeric Deutsch_, Jul 02 2005