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.

A077321 Rearrange primes so as to form a triangle in which n-th row contains the n smallest primes == 1 (mod n) which have not occurred earlier.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 17, 29, 37, 41, 11, 31, 61, 71, 101, 43, 67, 73, 79, 97, 103, 113, 127, 197, 211, 239, 281, 337, 89, 137, 193, 233, 241, 257, 313, 353, 109, 163, 181, 199, 271, 307, 379, 397, 433, 131, 151, 191, 251, 311, 331, 401, 421, 431, 461, 23, 419, 463, 617
Offset: 1

Views

Author

Amarnath Murthy, Nov 04 2002, Nov 30 2004

Keywords

Examples

			Triangle begins:
2
3 5
7 13 19
17 29 37 41
11 31 61 71 101
...
		

Crossrefs

Programs

  • Maple
    A077321 := proc(nmax) local n,a,i,p; a := []; n :=1; while nops(a) < nmax do for i from 1 to n do p := 2; while ( p in a ) or (p-1) mod n <> 0 do p := nextprime(p); od; a := [op(a),p]; od; n := n+1; od; RETURN(a); end: A077321(100); # R. J. Mathar, Feb 03 2007
  • Mathematica
    A077321[nmax_] := Module[{n = 1, a = {}, i, p}, While[ Length[a] < nmax, For[i = 1, i <= n, i++,  p = 2; While[ MemberQ[a, p] || Mod[p - 1, n] != 0, p = NextPrime[p]]; a = Append[a, p]]; n = n + 1]; Return[a]];
    A077321[100] (* Jean-François Alcover, May 30 2023, after R. J. Mathar *)

Extensions

More terms from Ray Chandler, Dec 10 2004
Edited by N. J. A. Sloane, Sep 14 2008 at the suggestion of R. J. Mathar
Showing 1-1 of 1 results.