login
A082737
Triangle read by rows in which the first row contains a 1 and the n-th row contains n primes not included in the previous rows such that the sum of a row is a perfect square.
4
1, 2, 7, 3, 5, 17, 11, 13, 19, 101, 23, 29, 31, 37, 241, 41, 43, 47, 53, 59, 157, 61, 67, 71, 73, 79, 83, 191, 89, 97, 103, 107, 109, 113, 127, 1019, 131, 137, 139, 149, 151, 163, 167, 173, 311, 179, 181, 193, 197, 199, 211, 223, 227, 229, 277, 233, 239, 251, 257, 263, 269, 271, 281, 283, 293, 2689
OFFSET
1,2
COMMENTS
Another rearrangement of primes and 1.
EXAMPLE
Triangle begins:
1
2 7
3 5 17
11 13 19 101
23 29 31 37 241
...
MAPLE
A082737 := proc(nmax) local a, n, r, i, rsum, c, j ; a := [1, 2, 7] ; n := 3 ; i := 1 ; while nops(a)< nmax do r := [] ; for c from 1 to n-1 do while ithprime(i) in a or ithprime(i) in r do i:= i+1 ; od ; r := [op(r), ithprime(i)] ; i:= i+1 ; od ; j := i+1 ; rsum := sum(op(k, r), k=1..nops(r)) ; while not issqr( rsum+ithprime(j)) do j := j+1 ; od ; r := [op(r), ithprime(j)] ; a := [op(a), op(r)] ; n := n+1 ; od ; RETURN(a) ; end: a := A082737(80) : for n from 1 to nops(a) do printf("%d, ", op(n, a)) ; od ; # R. J. Mathar, Nov 12 2006
MATHEMATICA
A082737[nmax_] := Module[{a, n, r, i, rsum, c, j}, a = {1, 2, 7}; n = 3; i = 1; While[Length[a] <= nmax, r = {}; For[c = 1, c <= n-1, c++, While[MemberQ[a, Prime[i]] || MemberQ[r, Prime[i]], i++]; r = Append[r, Prime[i]]; i++]; j = i+1; rsum = Total[r]; While[!IntegerQ@Sqrt[rsum + Prime[j]], j++]; r = Append[r, Prime[j]]; a = Join[a, r]; n++]; Return[a]];
rows = 11;
nmax = rows(rows+1)/2;
tri = A082737[nmax];
T = Table[tri[[(n^2-n+2)/2 ;; n(n+1)/2]], {n, 1, rows}];
Table[T[[n, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 22 2023, after R. J. Mathar *)
CROSSREFS
Main diagonal gives A082738.
Sequence in context: A365768 A330883 A075639 * A334971 A104957 A329333
KEYWORD
nonn,tabl
AUTHOR
Amarnath Murthy, Apr 14 2003
EXTENSIONS
More terms from R. J. Mathar, Nov 12 2006
Last row completed by Jean-François Alcover, Jun 22 2023
STATUS
approved