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.

A154666 Numbers k such that k-1, k+1, and k^2-k-1 are primes.

This page as a plain text file.
%I A154666 #18 Sep 08 2022 08:45:40
%S A154666 4,6,12,42,60,102,150,192,282,420,432,462,570,660,810,882,1062,1230,
%T A154666 1320,1872,1950,2550,2712,2730,3120,3252,4020,4092,6090,8220,8862,
%U A154666 8970,9042,9240,9720,10140,10530,10710,11550,11832,11970,12252,13680,13902
%N A154666 Numbers k such that k-1, k+1, and k^2-k-1 are primes.
%C A154666 Note that k-1 and k+1 are twin primes and the third prime is (k-1)*(k+1)-k, the product of the twin primes minus their average.
%H A154666 Amiram Eldar, <a href="/A154666/b154666.txt">Table of n, a(n) for n = 1..10000</a>
%e A154666 3*5 - 4 = 11.
%e A154666 5*7 - 6 = 29.
%t A154666 lst={};Do[If[PrimeQ[n-1]&&PrimeQ[n+1],If[PrimeQ[(n-1)*(n+1)-n],AppendTo[lst,n]]],{n,8!}];lst
%t A154666 Mean/@Select[Select[Partition[Prime[Range[2000]],2,1],Last[#]-First[#]==2&], PrimeQ[Times@@#-Mean[#]]&] (* _Harvey P. Dale_, Mar 17 2011 *)
%o A154666 (Magma) [k:k in [2..15000]| IsPrime(k-1) and IsPrime(k+1)and IsPrime(k^2-k-1)]; // _Marius A. Burtea_, Dec 21 2019
%K A154666 nonn
%O A154666 1,1
%A A154666 _Vladimir Joseph Stephan Orlovsky_, Jan 13 2009