OFFSET
1,1
COMMENTS
Lengths of runs of equal terms in A025549. That sequence begins with: 1,1,1,1,3,3,3,45,45,45,..., that is 4 ones, 3 threes, 3 forty-fives, ... - Michel Marcus, Dec 02 2014
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
MATHEMATICA
With[{nn=401}, Differences[Complement[Range[1, nn, 2], Prime[Range[ PrimePi[ nn]]]]]/2] (* Harvey P. Dale, May 06 2012 *)
PROG
(PARI) L=1; forstep(n=3, 299, 2, isprime(n)&next; print1((n-L)/2", "); L=n)
(Python)
from sympy import primepi, isprime
def A196274(n):
if n == 1: return 4
m, k = n-1, primepi(n) + n - 1 + (n>>1)
while m != k:
m, k = k, primepi(k) + n - 1 + (k>>1)
for d in range(1, 4):
if not isprime(m+(d<<1)):
return d # Chai Wah Wu, Jul 31 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Sep 30 2011
EXTENSIONS
More terms from Harvey P. Dale, May 06 2012
STATUS
approved