login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115210 a(0)=0. a(n) = number of earlier terms of the sequence which when added to n produce a composite number. 4

%I

%S 0,0,0,0,4,1,5,2,7,7,7,6,7,7,13,13,8,11,13,14,19,19,14,15,13,23,23,23,

%T 20,21,16,25,28,27,21,32,24,29,30,31,24,32,34,33,38,37,29,35,34,43,41,

%U 43,38,43,35,47,46,49,44,44,35,54,52,52,49,52,42,55,56,55,56,57,54,59

%N a(0)=0. a(n) = number of earlier terms of the sequence which when added to n produce a composite number.

%H G. C. Greubel, <a href="/A115210/b115210.txt">Table of n, a(n) for n = 0..10000</a>

%e Adding 6 to the first 6 terms (terms 0 through 5) of the sequence gives [6,6,6,6,10,7]. Of these terms, five are composite, so a(6) = 5.

%t a = {0, 0, 0, 0}; For[n = 4, n < 10001, n++, in = 0; For[j = 1, j < Length[a] + 1, j++, If[! PrimeQ[n + a[[j]]], in++]]; AppendTo[a, in]];

%t a (* _G. C. Greubel_, Feb 05 2016 *)

%o (PARI) seq=vector(200);print1(0,",");for(j=1,190,count=0;for(k=0,j-1,if(isprime(j+seq[k+1])==0 && (j+seq[k+1])>1,count=count+1;));seq[j+1]=count;print1(seq[j+1],",")) \\ _Matthew Conroy_, Feb 07 2006

%Y Cf. A115207, A115208, A115209.

%K nonn

%O 0,5

%A _Leroy Quet_, Jan 16 2006

%E More terms from _Matthew Conroy_, Feb 07 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 27 11:57 EDT 2021. Contains 347689 sequences. (Running on oeis4.)