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-10 of 10 results.

A168022 Noncomposite numbers in the eastern ray of the Ulam spiral as oriented on the March 1964 cover of Scientific American.

Original entry on oeis.org

1, 2, 11, 53, 127, 233, 541, 743, 977, 1871, 3511, 4001, 4523, 5077, 9851, 11503, 12377, 14221, 16193, 19391, 20521, 21683, 22877, 24103, 29327, 30713, 33581, 42953, 55343, 57241, 63127, 67211, 80231, 84827, 91961, 101921, 104491, 123377
Offset: 0

Views

Author

Alonso del Arte, Nov 16 2009

Keywords

Comments

Although 1 was not considered a prime number in Ulam's time, the March 1964 cover of Scientific American shows 1 highlighted in the same way as the primes.

Crossrefs

Cf. A054552, all numbers of the form 4n^2 - 3n + 1. Primes of northeastern ray are in A073337. Noncomposites of the northern ray are in A168023. Noncomposites of the northwestern ray are in A168024. Noncomposites of the western ray are in A168025. Noncomposites of the southwestern ray are in A168026. Noncomposites of the southern ray are in A168027.

Programs

  • Mathematica
    Select[Table[4 n^2 - 3 n + 1, {n, 0, 199}], Length[Divisors[ # ]] < 3 &]

Formula

Positive numbers of the form 4n^2 - 3n + 1 with no more than two divisors.

A168026 Noncomposite numbers in the southwestern ray of the Ulam spiral as oriented on the March 1964 cover of Scientific American.

Original entry on oeis.org

1, 7, 43, 73, 157, 211, 421, 601, 1483, 2551, 2971, 3907, 4423, 6163, 6481, 8191, 12211, 19183, 22651, 26407, 27061, 28393, 31153, 35533, 37057, 37831, 42643, 47743, 55933, 60763, 71023, 74257, 77563, 83233, 84391, 98911, 110557, 113233
Offset: 1

Views

Author

Alonso del Arte, Nov 16 2009

Keywords

Comments

From Peter Munn, Mar 17 2018: (Start)
Noncomposites of the form k^2 + k + 1 with k even and nonnegative (and the same values occur with k odd and negative). Equivalently, noncomposites of the form 4k^2 + 2k + 1 with k >= 0, or 4k^2 - 6k + 3 with k > 0.
A073337 lists those of the form k^2 + k + 1 with k odd and positive, and this is equivalently those of the form 4k^2 - 2k + 1 with k > 0.
(End)
Numbers that are the sum of A000217(2*k-3) + A000217(2*k-1) that result in either unity or a prime, for k,n >= 1. For k,n >= 0, a(n+1) = 4*k*2 + 2*k + 1 will give the same results. - J. M. Bergot, May 07 2018

Crossrefs

Cf. A054569, all numbers of the form 4k^2 - 6k + 3 with k > 0. Noncomposites of the eastern ray are in A168022. Primes of the northeastern ray are in A073337. Noncomposites of the northern ray are in A168023. Primes of the northwestern ray are in A121326. Noncomposites of the western ray are in A168025. Noncomposites of the southern ray are in A168027.

Programs

  • Mathematica
    Select[Table[4 n^2 - 6 n + 3, {n, 200}], Length[Divisors[ # ]] < 3 &]
  • PARI
    lista(nn) = {print1(1, ", "); for(k=1, nn, if(isprime(p=4*k^2-6*k+3), print1(p, ", ")));} \\ Altug Alkan, Mar 22 2018

Formula

Numbers of the form 4k^2 - 6k + 3 with k > 0 and no more than two divisors. [corrected by Peter Munn, Mar 17 2018]

A168023 Noncomposite numbers in the northern ray of the Ulam spiral as oriented on the March 1964 cover of Scientific American.

Original entry on oeis.org

1, 61, 139, 1009, 1279, 2281, 3109, 3571, 4591, 6361, 8419, 13399, 14341, 17359, 19531, 23029, 35251, 39901, 44839, 46549, 51871, 55579, 61381, 73849, 76039, 102241, 110059, 135241, 153469, 156619
Offset: 1

Views

Author

Alonso del Arte, Nov 16 2009

Keywords

Crossrefs

Cf. A054556, all numbers of the form 4n^2 - 9n + 6. Noncomposites of the eastern ray are in A168022. Primes of the northeastern ray are in A073337. Noncomposites of the northwestern ray are in A168024. Noncomposites of the western ray are in A168025. Noncomposites of the southwestern ray are in A168026. Noncomposites of the southern ray are in A168027.

Programs

  • Mathematica
    Select[Table[4 n^2 - 9 n + 6, {n, 200}], Length[Divisors[ # ]] < 3 &]

Formula

Positive numbers of the form 4n^2 - 9n + 6 with no more than two divisors.

A168027 Noncomposite numbers in the southern ray of the Ulam spiral as oriented on the March 1964 cover of Scientific American.

Original entry on oeis.org

1, 23, 163, 281, 431, 613, 827, 2003, 2377, 3221, 3691, 6521, 7877, 10151, 10973, 11827, 12713, 17623, 18701, 23333, 24571, 25841, 27143, 28477, 38711, 43577, 45263, 48731, 50513, 65921, 72227, 81083, 85703, 95327, 97813, 102881, 124433
Offset: 0

Views

Author

Alonso del Arte, Nov 16 2009

Keywords

Crossrefs

Cf. A033951, all numbers of the form 4n^2 + 3n + 1. Noncomposites of the eastern ray are in A168022. Primes of the northeastern ray are in A073337. Noncomposites of the northern ray are in A168023. Primes of the northwestern ray are in A121326. Noncomposites of the western ray are in A168025. Noncomposites of the southwestern ray are in A168026. There are no primes on the southeastern ray, which, being A016754, are the odd squares, and thus none of them are prime.

Programs

  • Mathematica
    Select[Table[4 n^2 + 3 n + 1, {n, 0, 199}], Length[Divisors[ # ]] < 3 &]

Formula

Positive numbers of the form 4n^2 + 3n + 1 with no more than two divisors.

A143861 Ulam's spiral (NNE spoke).

Original entry on oeis.org

1, 14, 59, 136, 245, 386, 559, 764, 1001, 1270, 1571, 1904, 2269, 2666, 3095, 3556, 4049, 4574, 5131, 5720, 6341, 6994, 7679, 8396, 9145, 9926, 10739, 11584, 12461, 13370, 14311, 15284, 16289, 17326, 18395, 19496, 20629, 21794, 22991, 24220
Offset: 1

Views

Author

Keywords

Comments

Stanislaw M. Ulam was doodling during the presentation of a "long and very boring paper" at a scientific meeting in 1963. The spiral is its result. Note that conforming to trigonometric conventions, the spiral begins on the abscissa and rotates counterclockwise. Other spirals, orientations, direction of rotation and initial values exist, even in the OEIS.
Also sequence found by reading the segment (1, 14) together with the line from 14, in the direction 14, 59, ..., in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 05 2012

References

  • Chris K. Caldwell & G. L. Honaker, Jr., Prime Curios! The Dictionary of Prime Number Trivia, CreateSpace, Sept 2009, pp. 2-3.

Crossrefs

Programs

  • GAP
    List([1..40], n-> ((32*n-35)^2 +55)/64); # G. C. Greubel, Nov 09 2019
  • Magma
    [((32*n-35)^2 +55)/64: n in [1..40]]; // G. C. Greubel, Nov 09 2019
    
  • Maple
    seq( ((32*n-35)^2 +55)/64, n=1..40); # G. C. Greubel, Nov 09 2019
  • Mathematica
    (* From Robert G. Wilson v, Oct 29 2011 *)
    f[n_]:= 16n^2 -35n +20; Array[f, 40]
    LinearRecurrence[{3,-3,1}, {1,14,59}, 40]
    FoldList[#1 + #2 &, 1, 32Range@ 10 - 19] (* End *)
    ((32*Range[40] -35)^2 +55)/64 (* G. C. Greubel, Nov 09 2019 *)
  • PARI
    a(n)=16*n^2-35*n+20 \\ Charles R Greathouse IV, Oct 29 2011
    
  • Sage
    [((32*n-35)^2 +55)/64 for n in (1..40)] # G. C. Greubel, Nov 09 2019
    

Formula

a(n) = 16*n^2 - 35*n + 20. - R. J. Mathar, Sep 08 2008
G.f.: x*(1 + 11*x + 20*x^2)/(1-x)^3. - Colin Barker, Aug 03 2012
E.g.f.: -20 + (20 - 19*x + 16*x^2)*exp(x). - G. C. Greubel, Nov 09 2019

A168024 Noncomposite numbers in the northwestern ray of the Ulam spiral as oriented on the March 1964 cover of Scientific American.

Original entry on oeis.org

1, 5, 17, 37, 101, 197, 257, 401, 577, 677, 1297, 1601, 2917, 3137, 4357, 5477, 7057, 8101, 8837, 12101, 13457, 14401, 15377, 15877, 16901, 17957, 21317, 22501, 24337, 25601, 28901, 30977, 32401, 33857
Offset: 0

Views

Author

Alonso del Arte, Nov 16 2009

Keywords

Crossrefs

Essentially the same sequence as A002496, A121326, A163588.
Cf. A053755, all numbers of the form 4n^2 + 1. Noncomposites of the eastern ray are in A168022. Primes of the northeastern ray are in A073337. Noncomposites of the northern ray are in A168023. Primes of the northwestern ray are in A121326 (the same as this sequence but without the initial 1). Noncomposites of the western ray are in A168025. Noncomposites of the southwestern ray are in A168026. Noncomposites of the southern ray are in A168027.

Programs

  • Mathematica
    Select[Table[4 n^2 + 1, {n, 0, 99}], Length[Divisors[ # ]] < 3 &]

Formula

Positive numbers of the form 4n^2 + 1 with no more than two divisors.

A073338 Positive values of n for which 4n^2-10n+7 is prime.

Original entry on oeis.org

2, 3, 4, 9, 10, 12, 15, 18, 22, 30, 31, 36, 37, 39, 40, 46, 51, 52, 54, 57, 60, 61, 67, 72, 73, 75, 78, 79, 82, 85, 88, 96, 103, 106, 109, 117, 124, 141, 145, 148, 156, 166, 177, 180, 186, 192, 193, 199, 204, 219, 225, 228, 229, 246, 249, 264, 267, 268, 270, 277
Offset: 1

Views

Author

Zak Seidov, Aug 25 2002

Keywords

Examples

			n=10 is in the sequence since 4n^2-10n+7=307 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[300], PrimeQ[4#^2-10#+7]&]

Extensions

Edited by Dean Hickerson, Aug 28 2002

A187677 Primes of the form 8*k^2 + 6*k - 1 for positive k.

Original entry on oeis.org

13, 43, 89, 151, 229, 433, 701, 859, 1033, 1223, 1429, 1889, 2143, 2699, 3001, 3319, 4003, 4751, 5563, 7873, 10009, 11173, 11779, 12401, 13693, 17203, 18719, 19501, 21943, 25423, 27259, 28201, 30133, 31123, 33151, 36313, 38501, 39619, 41903, 46663, 49139, 51679
Offset: 1

Views

Author

Alonso del Arte, Mar 21 2011

Keywords

Comments

In a variant of the Ulam spiral in which only odd numbers are entered, some primes still line up along some diagonals but not others. Without the even numbers, primes can also line up in horizontal and diagonal lines. This sequence comes from an upwards vertical line which starts with 13.
Primes of A091823. - Klaus Purath, Jan 03 2021
This is a subsequence of A162761. - Davide Rotondo, Jun 14 2025

Crossrefs

Cf. A073337 and A168026 are diagonals of the usual Ulam spiral which have some of the same primes as this vertical line.

Programs

  • Magma
    [ a: n in [0..2500] | IsPrime(a) where a is 8*n^2 + 6*n - 1 ]; // Vincenzo Librandi, Apr 24 2011
    
  • Mathematica
    Select[Table[2((2n - 1)^2 - n) - 1, {n, 100}], PrimeQ]
  • PARI
    lista(nn) = my(list=List(), p); for (n=1, nn, if(isprime(p=8*n^2+6*n-1), listput(list, p))); Vec(list); \\ Michel Marcus, Jun 14 2025

Formula

a(n) = 2((2n - 1)^2 - n) - 1 (or, find the number in the corresponding spot in the better-known Ulam spiral, double it and subtract 1).
The polynomial 8n^2 - 10n + 1 produces the same primes.

A271725 T(n,k) is an array read by rows, with n > 0 and k=1..4, where row n gives four prime numbers in increasing order with locations in right angles of each concentric square drawn on a distorted version of the Ulam spiral.

Original entry on oeis.org

3, 7, 17, 19, 13, 23, 37, 41, 307, 359, 401, 419, 13807, 14159, 14401, 14519, 41413, 42023, 42437, 42641, 6317683, 6325223, 6330257, 6332771, 22958473, 22972847, 22982437, 22987229, 39081253, 39100007, 39112517, 39118769, 110617807, 110649359, 110670401, 110680919
Offset: 1

Views

Author

Michel Lagneau, Apr 13 2016

Keywords

Comments

See the illustration for more information.
Conjecture: there is an infinity of concentric squares having a prime number in each right angle. The number 5 is the center of all the squares.
It seems that the drawing of an infinite number of concentric squares having a prime number in each corner is impossible in an Ulam spiral. But with a slight distortion of this space, the problem becomes possible.
The illustration (see the link) shows the new version of a spiral with two remarkable orthogonal diagonals containing four classes of prime numbers given by the sequences A125202, A121326, A028871 and A073337 supported by four line segments. These intersect at a single point represented by the prime number 5.
The sequence of the corresponding length of the sides is {s(k)} = {2, 4, 18, 118, 204, 2514, 4792, 6252, 10518, 14032, 16752, 17598, ...}
The primes are defined by the polynomials: [4*m^2-10*m+7, (2*m-1)^2-2, 4*m^2+1, 4*(m+1)^2-6*(m+1)+1]. The sequence of the corresponding m is {b(k)} = {2, 3, 10, 60, 103, 1258, 2397, 3127, 5260, 7017, 8377, 8800, 10375, 11518, 11523, 12498, 15415, 15888, ...} with the relation b(k) = 1 + s(k)/2.
The array begins:
3, 7, 17, 19;
13, 23, 37, 41;
307, 359, 401, 419;
13807, 14159, 14401, 14519;
41413, 42023, 42437, 42641;
...
Construction of the spiral (see the illustration in the link):
. . . . . . . . . . . .
. 42 41 40 39 38 37 . . .
|
. 43 20 19 18 17 36 35 . .
|
. . 21 6 5 16 15 34 . .
|
. . 22 7 4 3 14 33 . .
. . 23 8 1 2 13 32 . .
. . 24 9 10 11 12 31 . .
. . 25 26 27 28 29 30 . .
. . . . . . . . . . .
The first squares of center 5 having a prime number in each vertex are:
19 18 17 41 40 39 38 37
6 5 16 20 19 18 17 36
7 4 3 21 6 5 16 15 . . . .
22 7 4 3 14
23 8 1 2 13

Crossrefs

Programs

  • Maple
    for n from 1 to 10000 do :
      x1:=4*n^2-10*n+7:x2:=(2*n-1)^2-2:
      x3:=4*(n+1)^2-6*(n+1)+1:x4:=4*n^2+1:
       if isprime(x1) and isprime(x2) and isprime(x3) and isprime(x4)
        then
         printf("%d %d %d %d %d \n",n,x1,x2,x4,x3):
        else
        fi:
    od:

A147297 Primes of the form (2k)^2 + 3(2k + 1)^2.

Original entry on oeis.org

31, 307, 463, 1123, 1723, 3307, 4831, 6007, 8011, 10303, 11131, 13807, 20023, 23563, 26083, 30103, 35911, 43891, 60271, 86143, 95791, 108571, 127807, 136531, 145543, 164431, 205663, 239611, 276151, 284623, 288907, 366631, 371491, 386263, 459007
Offset: 1

Views

Author

Kieren MacMillan, Nov 05 2008

Keywords

Crossrefs

First thirteen terms are a subset of A073337, A002383 and A085104.

Programs

  • Magma
    [ a: n in [1..900] | IsPrime(a) where a is (2*n)^2 + 3*(2*n+1)^2] // Vincenzo Librandi, Nov 25 2010
  • Maxima
    makelist((2*k)^2+3*(2*k+1)^2,k,1,100)$ sublist(%,primep);
    

Extensions

More terms from Vincenzo Librandi, Apr 28 2010
Showing 1-10 of 10 results.