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 A161165 #12 Feb 01 2019 19:58:00 %S A161165 5,28,44,58,66,84,98,112,120,138,156,186,192,228,236,268,276,318,332, %T A161165 370,390,406,414,456,474,498,510,528,536,580,588,606,614,648,654,670, %U A161165 680,712,722,786,792,868,878,898,912,948,954,1020,1026,1078,1112,1146,1158,1180 %N A161165 The n-th twin prime plus the n-th isolated prime. %F A161165 a(n) = A001097(n) + A007510(n). %e A161165 a(1) = 3 + 2 = 5; %e A161165 a(2) = 5 + 23 = 28; %e A161165 a(3) = 7 + 37 = 44. %p A161165 isA001097 := proc(n) isprime(n) and (isprime(n+2) or isprime(n-2)) ; end proc: %p A161165 A001097 := proc(n) if n = 1 then 3; else for p from procname(n-1)+2 by 2 do if isA001097(p) then return p end if; end do: end if; end proc: %p A161165 isA007510 := proc(n) isprime(n) and not isprime(n+2) and not isprime(n-2) ; end proc: %p A161165 A007510 := proc(n) if n = 1 then 2; else for p from procname(n-1)+1 do if isA007510(p) then return p end if; end do: end if; end proc: %p A161165 A161165 := proc(n) A001097(n) + A007510(n) ; end proc: %p A161165 seq(A161165(n),n=1..100) ; # _R. J. Mathar_, Mar 18 2010 %p A161165 # alternate program %p A161165 isA001097 := proc(n) if isprime(n) then isprime(n+2) or isprime(n-2) ; else false; end if; end proc: %p A161165 isA007510 := proc(n) if isprime(n) then not isprime(n+2) and not isprime(n-2) ; else false; end if; end proc: %p A161165 A001097 := proc(n) option remember; if n = 1 then 3; else for a from procname(n-1)+1 do if isA001097(a) then return a; end if; end do: end if; end proc: %p A161165 A007510 := proc(n) option remember; if n = 1 then 2; else for a from procname(n-1)+1 do if isA007510(a) then return a; end if; end do: end if; end proc: %p A161165 A161165 := proc(n) A001097(n)+A007510(n) ; end proc: seq(A161165(n),n=1..90) ; # _R. J. Mathar_, Mar 29 2010 %Y A161165 Cf. A001097, A007510. %K A161165 nonn,easy %O A161165 1,1 %A A161165 _Juri-Stepan Gerasimov_, Jun 04 2009 %E A161165 Entries checked by _R. J. Mathar_, Mar 18 2010