OFFSET
1,1
COMMENTS
In a variant of the Ulam spiral with only odd numbers, prime numbers can line up in horizontal or vertical lines rather than diagonal lines. These primes are on one such horizontal (or vertical) line.
Primes in A188135. Primes in the sequence found by reading the line from 1, in the direction 1, 11, ..., in the square spiral whose vertices are the triangular numbers A000217. - Omar E. Pol, Sep 04 2011
Equivalently, primes of the form 2*n^2+n+1. - N. J. A. Sloane, Nov 08 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MAPLE
select(isprime, [seq(8*n^2+2*n+1, n=0..86)]); # Peter Luschny, Aug 22 2011
MATHEMATICA
Select[Table[8n^2 + 2n + 1, {n, 100}], PrimeQ]
PROG
(Magma) [ a: n in [0..250] | IsPrime(a) where a is 8*n^2 + 2*n + 1 ]; // Vincenzo Librandi, Apr 05 2011
(PARI) select(isprime, vector(1000, n, 8*n^2+2*n+1)) \\ Charles R Greathouse IV, Jun 14 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alonso del Arte, Mar 29 2011
STATUS
approved