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.

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

This page as a plain text file.
%I A293861 #78 May 19 2025 16:31:28
%S A293861 5,7,23,59,61,211,337,503,719,991,1319,1321,2729,2731,3359,3361,4079,
%T A293861 5813,6841,9239,9241,10627,12143,13799,15601,17551,24359,29759,29761,
%U A293861 42839,42841,46619,54833,59281,68879,68881,74047,91079,91081,110543,124951,140557
%N A293861 Primes of the form (k - 1) * k * (k + 1) +- 1, k >= 1.
%C A293861 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 A293861 Robert Israel, <a href="/A293861/b293861.txt">Table of n, a(n) for n = 1..10000</a>
%e A293861 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 A293861 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 A293861 100*101*102 = 1030200; 1030200+1 = 1030201 is a term.
%p A293861 select(isprime, [seq(seq((k-1)*k*(k+1)+q,q=[-1,1]),k=1..100)]); # _Robert Israel_, Jan 04 2018
%t A293861 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 *)
%t A293861 Select[Flatten[Table[k^3-k+{-1,1},{k,60}]],PrimeQ] (* _Harvey P. Dale_, May 19 2025 *)
%o A293861 (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 A293861 (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 A293861 Union of A116581 and A100698.
%K A293861 nonn,easy
%O A293861 1,1
%A A293861 _Rajarshi Maiti_, Oct 18 2017
%E A293861 Corrected and extended by _Robert G. Wilson v_, Oct 18 2017