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 A068017 #16 Apr 24 2019 03:26:36 %S A068017 6,10,20,24,26,30,38,46,51,55,85,88,105,114,118,126,135,136,141,145, %T A068017 147,155,158,161,177,178,185,203,206,207,209,216,230,236,238,255,278, %U A068017 296,321,344,346,355,371,377,384,391,396,398,416,424,447,462,486,500 %N A068017 Composite n such that sigma(n) - 1 and sigma(n) + 1 are twin primes. %H A068017 Harvey P. Dale, <a href="/A068017/b068017.txt">Table of n, a(n) for n = 1..1000</a> %e A068017 For n=46, sigma(46)=1+2+23+46=72, for n=51, sigma(51)=1+3+17+51=72 and also for n=55, sigma(55)=1+5+11+55=72 is the middle term of {71,73} twins. %t A068017 Do[s=-1+DivisorSigma[1, n]; s1=1+DivisorSigma[1, n]; If[PrimeQ[s]&&PrimeQ[s1]&&!PrimeQ[n], Print[n]], {n, 1, 2000}] %t A068017 cntpQ[n_]:=Module[{ds=DivisorSigma[1,n]},CompositeQ[n]&&AllTrue[ds+{1,-1}, PrimeQ]]; Select[Range[500],cntpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Mar 05 2015 *) %o A068017 (PARI) isok(n) = my(s=sigma(n)); !isprime(n) && isprime(s-1) && isprime(s+1); \\ _Michel Marcus_, Apr 24 2019 %Y A068017 Cf. A000203, A072282. %K A068017 nonn %O A068017 1,1 %A A068017 _Labos Elemer_, Feb 08 2002