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 n^3 + (n+1)^2.
6

%I #20 Sep 08 2022 08:45:15

%S 5,17,43,89,593,829,2393,2969,3631,5237,11177,12743,14449,16301,27961,

%T 33857,40529,44171,56393,60919,75937,93241,127601,198593,219721,

%U 266369,278981,499439,578843,621521,689393,737281,787337,839609,950993,980299

%N Primes of the form n^3 + (n+1)^2.

%H Vincenzo Librandi, <a href="/A100662/b100662.txt">Table of n, a(n) for n = 1..1000</a>

%F A100705 INTERSECT A000040.

%e a(1)=5 because 5=1^3+2^2;

%e a(2)=17 because 17=2^3+3^2;

%e a(3)=43 because 43=3^3+4^2.

%t Select[Table[n^3+(n+1)^2,{n,200}],PrimeQ] (* _Vladimir Joseph Stephan Orlovsky_, Feb 01 2012 *)

%o (Magma) [ a: n in [0..100] | IsPrime(a) where a is n^3 + (n+1)^2 ]; // _Vincenzo Librandi_, Jul 18 2012

%o (PARI) list(lim)=my(v=List(),t); for(n=1,lim, t=n^3+(n+1)^2; if(t>lim, break); if(isprime(t), listput(v,t))); Vec(v) \\ _Charles R Greathouse IV_, Dec 23 2016

%K nonn,easy

%O 1,1

%A _Giovanni Teofilatto_, Jan 03 2005

%E More terms from Mark Hudson, Jan 04 2005