%I A139312
%S A139312 1,1,1,0,1,0,1,1,0,1,0,0,1,1,1,0,1,0,0,1,0,1,1,0,0,1,0,1,1,0,1,0,1,0,1,
%T A139312 1,0,1,1,0,1,0,1,0,1,1,0,0,1,1,0,1,0,1,1,0,1,0,0,1,1,0,0,1,1,0,1,0,1,1,
%U A139312 1,0,1,0,1,1,0,1,1,0,1,0,1,0,1,1,0,0,1,1,0,0,1,0,1,1,0,1,0
%N A139312 An binary "appearance" or frequency sequence for good and bad primes:
A028388 and A130903: a(n)=If[ Prime[n]^2-Prime[n-1]*Prime[n+1]>=0,
1,0].
%C A139312 When the sequence of gaps repeats, the f[n] function
%C A139312 comes up "ComplexInfinity": those are singularities of a=b in the derivation
of when in the function f[n]:
%C A139312 -Prime[ -1 + n] + 2 Prime[n] - Prime[1 + n] == 0
%C A139312 Those are "bad primes".
%F A139312 Starting at 3: a(n)=If[ Prime[n]^2-Prime[n-1]*Prime[n+1]>=0,1,0]
%t A139312 b0 = Table[If[Prime[n]^2 - Prime[n - 1]*Prime[n + 1] < 0, 1, 0], {n,
2, 100}] (*alternative formula: derived*) Solve[x^2 - (x - a)*(x
+ b) == 0, x] a = -Prime[ -1 + n] + Prime[n] b = -Prime[n] + Prime[1
+ n] f[n_] = If[ -Prime[ -1 + n] + 2 Prime[n] - Prime[1 + n] == 0,
0, -a*b/(a - b)] a0 = Table[If[f[n] > 0, 1, 0], {n, 2, 100}]
%Y A139312 Cf. A028388, A130903.
%Y A139312 Sequence in context: A071023 A132194 A092079 this_sequence A071041 A140074
A090174
%Y A139312 Adjacent sequences: A139309 A139310 A139311 this_sequence A139313 A139314
A139315
%K A139312 nonn,uned
%O A139312 1,1
%A A139312 Roger L. Bagula (rlbagulatftn(AT)yahoo.com), Jun 07 2008
|