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.

A060697 The sum of the first a(n) composite numbers plus 1 is a prime.

This page as a plain text file.
%I A060697 #15 Dec 19 2022 16:54:50
%S A060697 1,2,3,8,10,16,21,29,34,45,49,52,84,104,114,123,130,161,165,170,181,
%T A060697 185,192,202,216,227,228,240,245,246,265,266,271,281,287,295,301,325,
%U A060697 331,355,390,395,400,406,410,416,429,498,502,517,522,527,529,538,539
%N A060697 The sum of the first a(n) composite numbers plus 1 is a prime.
%H A060697 Robert G. Wilson v, <a href="/A060697/b060697.txt">Table of n, a(n) for n = 1..1000</a>
%t A060697 Composite[n_Integer] := Block[{k = n + 1 + PrimePi@ n}, While[k - 1 - PrimePi@ k != n, k++]; k]; lst = 1 + Accumulate@ Array[ Composite, 600]; Select[ Range@ 600, PrimeQ@ lst[[#]] &] (* _Robert G. Wilson v_, Nov 29 2014 *)
%t A060697 Position[Accumulate[Select[Range[900],CompositeQ]],_?(PrimeQ[ #+1]&)]// Flatten (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jan 04 2020 *)
%Y A060697 Cf. A000040, A002808, A051349.
%K A060697 nonn
%O A060697 1,2
%A A060697 _Robert G. Wilson v_, Apr 20 2001