OFFSET
1,1
COMMENTS
Assign the odd prime numbers to the rows of an array as follows:
Assign the first odd prime, prime(2) = 3, to row 0 (the top row).
For m > 2, assign prime(m) to the row immediately above or below the row to which prime(m-1) was assigned: above if prime(m-1) == 1 (mod 4), below otherwise.
The following array results:
row 0 (this sequence): 3, 7, 19, 43, 463, 26839, ...
row 1 (A096448): 5, 11, 17, 23, 31, 41, 47, 59, 67, 103, 127, ...
row 2 (A096451): 13, 29, 37, 53, 61, 71, 79, 101, 107, 113 ...
row 3: 73, 83, 97, 109, ...
row 4: 89, ...
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
lim = 10^5; k1 = 0; k3 = 0; p = 2; t = {}; Do[p = NextPrime[p]; If[k1 == k3, AppendTo[t, p]]; If[Mod[p, 4] == 1, k1++, k3++], {lim}]; t (* T. D. Noe, Sep 07 2011 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Yasutoshi Kohmoto, Aug 12 2004
EXTENSIONS
More terms from Joshua Zucker, May 03 2006
"odd" added to definition by N. J. A. Sloane, Sep 09 2015
STATUS
approved