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!)
A082011 Square array read by antidiagonals, alternating upwards and downwards: T(1,1) = 2 and every other entry is the smallest prime not already used such that the n-th antidiagonal sum is a multiple of n. 5
2, 3, 5, 7, 13, 19, 11, 17, 23, 29, 31, 37, 41, 43, 53, 47, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 113, 107, 109, 127, 131, 137, 139, 149, 157, 151, 163, 167, 173, 179, 181, 191, 197, 227, 193, 199, 211, 223, 229, 233, 239, 241, 251, 271, 257, 263, 269, 277 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This is the boustrophedon method of filling an array.
LINKS
EXAMPLE
Square array begins:
2, 3, 19, 11, 53, 47, ...
5, 13, 17, 43, 59, 103, ...
7, 23, 41, 61, 101, 127, ...
29, 37, 67, 97, 131, 181, ...
31, 71, 89, 137, 179, 229, ...
73, 83, 139, 173, 233, 283, ...
T(2,2) = 13 and not 11, because otherwise T(1,3)+7+11 = 0 (mod 3) would not be satisfied for any prime.
MAPLE
b:= proc(t) false end: T:= proc(n, k) local h, t, l, m; if n<1 or k<1 then t:=0 else h:= 1- 2* irem(n+k, 2); m:= n+k-1; l:= add(T(n+h*t, k-h*t), t=1..m-1); t:=3; while b(t) or (h=1 and (n=2 and igcd(t+l, m)>1 or n=1 and irem(t+l, m)<>0)) or (h=-1 and (k=2 and igcd(t+l, m)>1 or k=1 and irem(t+l, m)<>0)) do t:= nextprime(t) od fi; b(t):= true; T(n, k):=t end: T(1, 1):=2: seq(`if`(irem(d, 2)=1, seq(T(1+d-k, k), k=1..d), seq(T(n, 1+d-n), n=1..d)), d=1..15); # Alois P. Heinz, Oct 10 2009
MATHEMATICA
Clear[b]; b[_] = False; T[n_, k_] := Module[{h, t, l, m}, If[n<1 || k<1, t = 0, h = 1 - 2*Mod[n+k, 2]; m = n+k-1; l = Sum[T[n + h*t, k - h*t], {t, 1, m-1}]; t = 3; While[b[t] || (h == 1 && (n == 2 && GCD[t+l, m]>1 || n == 1 && Mod[t+l, m] != 0)) || (h == -1 && (k == 2 && GCD[t+l, m]>1 || k == 1 && Mod[t+l, m] != 0)), t = NextPrime[t]]]; b[t] = True; T[n, k] = t]; T[1, 1] = 2; Table[If[Mod[d, 2] == 1, Table[T[1+d-k, k], {k, 1, d}], Table [T[n, 1+d-n], {n, 1, d}]], {d, 1, 15}] // Flatten (* Jean-François Alcover, Jun 10 2015, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A362778 A362779 A077316 * A101044 A077321 A216437
KEYWORD
nonn,tabl
AUTHOR
Amarnath Murthy, Apr 05 2003
EXTENSIONS
Edited with more terms by Alois P. Heinz, Oct 10 2009
STATUS
approved

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 April 24 15:37 EDT 2024. Contains 371960 sequences. (Running on oeis4.)