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!)
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. 5

%I #19 May 30 2023 07:43:15

%S 2,3,5,7,13,19,17,29,37,41,11,31,61,71,101,43,67,73,79,97,103,113,127,

%T 197,211,239,281,337,89,137,193,233,241,257,313,353,109,163,181,199,

%U 271,307,379,397,433,131,151,191,251,311,331,401,421,431,461,23,419,463,617

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

%H Ivan Neretin, <a href="/A077321/b077321.txt">Table of n, a(n) for n = 1..5050</a>

%e Triangle begins:

%e 2

%e 3 5

%e 7 13 19

%e 17 29 37 41

%e 11 31 61 71 101

%e ...

%p 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

%t 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]];

%t A077321[100] (* _Jean-François Alcover_, May 30 2023, after _R. J. Mathar_ *)

%Y Cf. A077322, A077323, A077324, A077325.

%Y Cf. A100787, A100788, A100789, A100790.

%K nonn,tabl

%O 1,1

%A _Amarnath Murthy_, Nov 04 2002, Nov 30 2004

%E More terms from _Ray Chandler_, Dec 10 2004

%E Edited by _N. J. A. Sloane_, Sep 14 2008 at the suggestion of _R. J. Mathar_

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 3 07:04 EDT 2024. Contains 372206 sequences. (Running on oeis4.)