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.

A087338 a(1) = 1, then the smallest number > 1 such that both every partial sum and every partial product + 1 are prime for n > 1.

This page as a plain text file.
%I A087338 #6 May 06 2018 00:44:22
%S A087338 1,2,2,18,6,8,30,4,26,6,6,4,50,4,56,6,22,6,50,40,12,24,138,20,132,70,
%T A087338 78,8,232,2,160,144,32,322,12,44,216,294,60,394,1460,82,54,452,168,
%U A087338 1024,86,76,308,208,104,456,268,396,350,120,10,236,180,402,112,336,530,318,112
%N A087338 a(1) = 1, then the smallest number > 1 such that both every partial sum and every partial product + 1 are prime for n > 1.
%e A087338 Partial sums: 1+2 = 3, 1+2+2 = 5, 1+2+2+18 = 23;
%e A087338 partial products + 1: 1*2 + 1 = 3, 1*2*2 + 1 = 5, 1*2*2*18 + 1 = 73.
%t A087338 a = {1}; s = 1; p = 1; Do[k = 2; While[ !PrimeQ[s + k] || !PrimeQ[p*k + 1], k++ ]; AppendTo[a, k]; s += k; p *= k, {n, 1, 65}]
%K A087338 nonn
%O A087338 1,2
%A A087338 _Amarnath Murthy_, Sep 06 2003
%E A087338 More terms from _Robert G. Wilson v_, Sep 07 2003