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.

Showing 1-1 of 1 results.

A172979 Primes with locations of right angle turns in Ulam square spiral (primes in A033638).

Original entry on oeis.org

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
Offset: 1

Views

Author

Michel Lagneau, Nov 21 2010

Keywords

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
Primes p for which floor(sqrt(p)) | (p-1). - Davide Rotondo, Jun 06 2025

Examples

			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 ...
		

Crossrefs

Programs

  • 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]
  • PARI
    for(n=0,10^3, my(t=n^2\4+1); if(isprime(t),print1(t,", "))); \\ Joerg Arndt, Jul 12 2014
Showing 1-1 of 1 results.