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.

A080380 Least n such that n consecutive values in A080378 equal 0; i.e., exactly n differences between consecutive primes are divisible by 4.

This page as a plain text file.
%I A080380 #12 Oct 17 2014 21:20:17
%S A080380 4,24,46,153,1480,90,3875,1395,16591,61457,240748,21355,772038,613491,
%T A080380 804584,6067263,16791134,16138563,37593808,250379098,73857828,
%U A080380 124789332,56307979,3295708683,3511121443,27497699943,64430269615,26284355567,118413975572,225822728018,4645422093,118027458557
%N A080380 Least n such that n consecutive values in A080378 equal 0; i.e., exactly n differences between consecutive primes are divisible by 4.
%e A080380 n=2: a(2)=24, p(24)=89, followed by {4, 4} consecutive prime differences, surrounded by 6=89-83 and 2=103-101 also as p-differences, both congruent to 2 modulo 4.
%t A080380 dp[x_] := Mod[Prime[x+1]-Prime[x], 4] pat[x_, h_] := Table[dp[x+j], {j, 0, h-1}] up[x_, h_] := Union[pat[x, h]] Table[fa=1; k=0; Do[s=up[n, h]; s1=Length[s]; s2=Part[u=pat[n+1, h], Length[u]]; s3=Part[w=pat[n-1, h], 1]; If[Equal[s, {0}]&&Equal[fa, 1]&&Equal[s2, 2]&&Equal[s3, 2], k=k+1; Print[{k, h, n, Prime[n], s, s1}]; fa=0], {n, 2, 720000}], {h, 1, 14}]
%Y A080380 Cf. A001223, A080378, A080379.
%K A080380 nonn
%O A080380 1,1
%A A080380 _Labos Elemer_, Mar 06 2003
%E A080380 a(15)-a(32) from _Donovan Johnson_, Nov 16 2010