login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes of the form (k - 1) * k * (k + 1) +- 1, k >= 1.
1

%I #76 Mar 03 2018 22:54:32

%S 5,7,23,59,61,211,337,503,719,991,1319,1321,2729,2731,3359,3361,4079,

%T 5813,6841,9239,9241,10627,12143,13799,15601,17551,24359,29759,29761,

%U 42839,42841,46619,54833,59281,68879,68881,74047,91079,91081,110543,124951,140557

%N Primes of the form (k - 1) * k * (k + 1) +- 1, k >= 1.

%C Number of terms less than 10^k, k=1,2,3,...: 2, 5, 10, 21, 39, 66, 118, 213, 419, 770, 1486, 2886, 5575, 11096, 22338, 44710, 89992, 182554, 370614, 754201, 1541613, 3159885, ... - _Muniru A Asiru_, Jan 29 2018

%H Robert Israel, <a href="/A293861/b293861.txt">Table of n, a(n) for n = 1..10000</a>

%e 1*2*3 = 6; 6-1 = 5, a prime, so it is a term; 6+1 = 7, a prime, so it is a term;

%e 2*3*4 = 24; 24-1 = 23, a prime so is a term, 24+1 = 25, not a prime and so not a term;

%e 100*101*102 = 1030200; 1030200+1 = 1030201 is a term.

%p select(isprime, [seq(seq((k-1)*k*(k+1)+q,q=[-1,1]),k=1..100)]); # _Robert Israel_, Jan 04 2018

%t lst = {}; k = 1; While[k < 61, p = k^3 - k; If[ PrimeQ[p -1], AppendTo[lst, p -1]]; If[PrimeQ[p +1], AppendTo[lst, p +1]]; k++]; lst (* _Robert G. Wilson v_, Oct 18 2017 *)

%o (PARI) lista(nn) = {for (n=1, nn, if (isprime(p=n*(n+1)*(n+2)-1), print1(p, ", ")); if (isprime(p=n*(n+1)*(n+2)+1), print1(p, ", ")););} \\ _Michel Marcus_, Oct 19 2017

%o (GAP) Filtered(Set(Flat(List([1..60], k -> List([1,-1], q -> (k-1)*k*(k+1)+q)))), IsPrime); # _Muniru A Asiru_, Jan 29 2018

%Y Union of A116581 and A100698.

%K nonn,easy

%O 1,1

%A _Rajarshi Maiti_, Oct 18 2017

%E Corrected and extended by _Robert G. Wilson v_, Oct 18 2017