cp's OEIS Frontend

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.

A171667 Lesser of a pair of twin primes (p,p+2) sandwiched between two numbers (p-1,p+3) having the same number of divisors.

This page as a plain text file.
%I A171667 #8 Jul 04 2019 18:27:22
%S A171667 11,29,59,431,599,827,1031,1319,1619,1787,2111,2141,2267,2687,2711,
%T A171667 3299,3329,3371,3527,3671,4001,4091,4229,4259,5021,5099,5519,5867,
%U A171667 6299,6659,6779,7331,7457,8087,8231,8387,8627,8861,8999,9419,9461,9767,10139
%N A171667 Lesser of a pair of twin primes (p,p+2) sandwiched between two numbers (p-1,p+3) having the same number of divisors.
%H A171667 Harvey P. Dale, <a href="/A171667/b171667.txt">Table of n, a(n) for n = 1..1000</a>
%e A171667 First term 11: 10={1,2,5,10},14={1,2,7,14} Second term 29: 28={1,2,4,7,14,28},32={1,2,4,8,16,32}
%t A171667 f[n_]:=Length[Divisors[n]]; lst={};Do[p=Prime[n];If[PrimeQ[p+2]&&f[p-1]==f[p+3],AppendTo[lst,p]],{n,7!}];lst
%t A171667 Select[Range[11000],DivisorSigma[0,#-1]==DivisorSigma[0,#+3]&&AllTrue[{#, #+2},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Jul 04 2019 *)
%o A171667 (PARI) forprime(p=o=0,1e4,(2+o==o=p)&&numdiv(p-3)==numdiv(p+1)&&print1(p-2",")) \\ _M. F. Hasler_, Jul 31 2015
%Y A171667 Cf. A005237, A067889
%K A171667 nonn
%O A171667 1,1
%A A171667 _Vladimir Joseph Stephan Orlovsky_, Dec 14 2009
%E A171667 Name edited by _M. F. Hasler_, Jul 31 2015