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.

A163428 Primes of the form ((p+1)/2)^3 + ((p-1)/2)^2 where p is prime.

This page as a plain text file.
%I A163428 #9 Oct 11 2016 05:32:10
%S A163428 31,73,241,379,3571,9661,20359,47881,51949,65521,119953,135151,291721,
%T A163428 427351,736921,761671,921889,1202041,1494313,1533871,1742161,1785961,
%U A163428 2478331,2533681,3197839,3820441,3894229,4044643,4855033,6573799
%N A163428 Primes of the form ((p+1)/2)^3 + ((p-1)/2)^2 where p is prime.
%C A163428 Primes of the form k^3 + k^2 - 2k + 1 where 2k-1 is prime.
%H A163428 Robert Israel, <a href="/A163428/b163428.txt">Table of n, a(n) for n = 1..10000</a>
%e A163428 ((5+1)/2)^3 + ((5-1)/2)^2 = 27 + 4 = 31, ((7+1)/2)^3 + ((7-1)/2)^2 = 64 + 9 = 73
%p A163428 res:= NULL:
%p A163428 count:= 0:
%p A163428 p:= 2
%p A163428 while count < 100 do
%p A163428   p:= nextprime(p);
%p A163428   r:=  ((p+1)/2)^3 + ((p-1)/2)^2;
%p A163428   if isprime(r) then
%p A163428      res:= res, r;
%p A163428      count:= count+1;
%p A163428   fi
%p A163428 od:
%p A163428 res; # _Robert Israel_, Oct 10 2016
%t A163428 f[n_]:=((p+1)/2)^3+((p-1)/2)^2; lst={}; Do[p=Prime[n]; If[PrimeQ[f[p]],AppendTo[lst,f[p]]],{n,6!}]; lst
%o A163428 (PARI) lista(nn) = forprime(p=3, nn, if (isprime(q=((p+1)/2)^3 + ((p-1)/2)^2), print1(q, ", "))); \\ _Michel Marcus_, Oct 11 2016
%Y A163428 Cf. A162652, A163418, A163419, A163420, A163421, A163422, A163424, A163425, A163426, A163427
%K A163428 nonn,easy
%O A163428 1,1
%A A163428 _Vladimir Joseph Stephan Orlovsky_, Jul 27 2009
%E A163428 Description and edits by _Charles R Greathouse IV_, Oct 05 2009