OFFSET
1,1
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..30000
MAPLE
A002144 := proc(n) option remember ; if n = 1 then RETURN(5) ; fi; for a from procname(n-1)+2 do if isprime(a) and (a mod 4 = 1 ) then RETURN(a) ; fi; od: end; A002145 := proc(n) option remember ; if n = 1 then RETURN(3) ; fi; for a from procname(n-1)+2 do if isprime(a) and (a mod 4 = 3 ) then RETURN(a) ; fi; od: end; A102261 := proc(n) A002144(n)-A002145(n) ; end: seq(A102261(n), n=1..120) ; # R. J. Mathar, Feb 07 2009
MATHEMATICA
nmax = 70; a1 = Select[Range[1, Prime[3*nmax], 4], PrimeQ]; a3 = Select[Range[3, Prime[3*nmax], 4], PrimeQ]; a[n_] := a1[[n]] - a3[[n]]; Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Dec 17 2013 *)
CROSSREFS
KEYWORD
sign,look
AUTHOR
Paul Curtz, Sep 06 2008
EXTENSIONS
Edited by N. J. A. Sloane, Sep 06 2008
More terms from R. J. Mathar, Feb 07 2009
STATUS
approved