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.
%I A209287 #30 Mar 18 2019 12:59:48 %S A209287 1,0,0,0,0,0,0,1,0,0,1,1,0,1,0,0,0,1,1,2,1,1,0,0,0,2,1,0,2,0,1,2,0,2, %T A209287 0,1,1,1,0,0,0,2,1,0,3,2,1,1,0,2,0,3,2,2,0,0,0,1,1,2,1,0,4,2,1,0,1,4, %U A209287 0,2,0,0,1,2,2,0,0,1,2,2,2,1,3,2,4,2,0 %N A209287 Minimal m>=0 such that prime(n)+2*m-1 has form 2^k*p, where k>=0 and p is prime. %C A209287 Or, for n>2, a(n) is the minimal m>=0 such that the divided on prime(n) sum of prime(n) consecutive integers beginning with m has form 2^k*p, where k>=0 and p is prime. %C A209287 a(n)=0 if and only if prime(n) is in A074781. - _Robert Israel_, Mar 18 2019 %H A209287 Robert Israel, <a href="/A209287/b209287.txt">Table of n, a(n) for n = 1..10000</a> %e A209287 Let n=7. Then prime(7)=17 and, for m=0, 17+2m-1=16=2^3*p, where p=2. Thus a(7)=0. %p A209287 f:= proc(n) local v,m,p; %p A209287 p:= ithprime(n)-3; %p A209287 for m from 0 do %p A209287 p:= p+2; %p A209287 v:= p/2^padic:-ordp(p,2); %p A209287 if v=1 or isprime(v) then return m fi %p A209287 od; %p A209287 end proc: %p A209287 f(1):= 1: %p A209287 map(f, [$1..100]); # _Robert Israel_, Mar 18 2019 %t A209287 good[n_] := Module[{k = n/2^IntegerExponent[n, 2]}, n > 1 && (k == 1 || PrimeQ[k])]; Table[p = Prime[n]; m = 0; While[! good[p + 2*m - 1], m++]; m, {n, 87}] (* _T. D. Noe_, Feb 26 2013 *) %Y A209287 Cf. A074781. %K A209287 nonn %O A209287 1,20 %A A209287 _Vladimir Shevelev_, Feb 18 2013 %E A209287 More terms from _T. D. Noe_, Feb 26 2013