The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A172979 Primes with locations of right angle turns in Ulam square spiral (primes in A033638). 3
2, 3, 5, 7, 13, 17, 31, 37, 43, 73, 101, 157, 197, 211, 241, 257, 307, 401, 421, 463, 577, 601, 677, 757, 1123, 1297, 1483, 1601, 1723, 2551, 2917, 2971, 3137, 3307, 3541, 3907, 4357, 4423, 4831, 5113, 5477, 5701, 6007, 6163, 6481, 7057, 8011, 8101, 8191, 8837, 9901 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Except for the first term, 2, these are the primes on the main diagonals of the Ulam spiral. - Robert G. Wilson v, Jul 10 2014
LINKS
EXAMPLE
Ulam square spiral = 7 8 9 / 6 1 2 / 5 4 3 /...; changes of direction (right-angle)
for the primes at 2 3 5 7 ...
MAPLE
with(numtheory): a0:=1:for n from 1 to 200 do : a1:=a0+floor(n/2):a0:=a1:if
type(a1, prime)=true then printf(`%d, `, a1):else fi:od:
MATHEMATICA
Select[ Sort@ Flatten@ Table[ 4n^2 + (2j - 4)n + 1, {j, 0, 3}, {n, 55}], PrimeQ]
PROG
(PARI) for(n=0, 10^3, my(t=n^2\4+1); if(isprime(t), print1(t, ", "))); \\ Joerg Arndt, Jul 12 2014
CROSSREFS
Sequence in context: A087520 A117159 A134873 * A118724 A055387 A046732
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 21 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 17:17 EDT 2024. Contains 372492 sequences. (Running on oeis4.)