A055096
Triangle read by rows, sums of 2 distinct nonzero squares: T(n,k) = k^2+n^2, (n>=2, 1 <= k <= n-1).
Original entry on oeis.org
5, 10, 13, 17, 20, 25, 26, 29, 34, 41, 37, 40, 45, 52, 61, 50, 53, 58, 65, 74, 85, 65, 68, 73, 80, 89, 100, 113, 82, 85, 90, 97, 106, 117, 130, 145, 101, 104, 109, 116, 125, 136, 149, 164, 181, 122, 125, 130, 137, 146, 157, 170, 185, 202, 221, 145, 148, 153, 160
Offset: 2
The triangle T(n, k) begins:
n\k 1 2 3 4 5 6 7 8 9 10 11 ...
2: 5
3: 10 13
4: 17 20 25
5: 26 29 34 41
6: 37 40 45 52 61
7: 50 53 58 65 74 85
8: 65 68 73 80 89 100 113
9: 82 85 90 97 106 117 130 145
10: 101 104 109 116 125 136 149 164 181
11: 122 125 130 137 146 157 170 185 202 221
12: 145 148 153 160 169 180 193 208 225 244 265
...
13: 170 173 178 185 194 205 218 233 250 269 290 313,
14: 197 200 205 212 221 232 245 260 277 296 317 340 365,
15: 226 229 234 241 250 261 274 289 306 325 346 369 394 421,
16: 257 260 265 272 281 292 305 320 337 356 377 400 425 452 481,
...
Formatted and extended by _Wolfdieter Lang_, Dec 02 2014 (reformatted Jun 11 2015)
The successive terms are (1^2+2^2), (1^2+3^2), (2^2+3^2), (1^2+4^2), (2^2+4^2), (3^2+4^2), ...
- Reinhard Zumkeller, Rows n = 2..121 of triangle, flattened
- M. de Frénicle, Méthode pour trouver la solutions des problèmes par les exclusions, in: "Divers ouvrages de mathématiques et de physique, par Messieurs de l'Académie royale des sciences", Paris, 1693, pp 1-44.
- Antti Karttunen, Larger table, showing also locations of 4k+1 primes and squares
- Eric Weisstein's World of Mathematics, Congruum Problem.
- Index entries for sequences related to sums of squares
-
a055096 n k = a055096_tabl !! (n-1) !! (k-1)
a055096_row n = a055096_tabl !! (n-1)
a055096_tabl = zipWith (zipWith (+)) a133819_tabl a140978_tabl
-- Reinhard Zumkeller, Mar 23 2013
-
[n^2+k^2: k in [1..n-1], n in [2..15]]; // G. C. Greubel, Apr 19 2023
-
sum2distinct_squares_array := (n) -> (((n-((trinv(n-1)*(trinv(n-1)-1))/2))^2)+((trinv(n-1)+1)^2));
-
T[n_, k_]:= (n+1)^2 + k^2; Table[T[n, k], {n,15}, {k,n}]//Flatten (* Jean-François Alcover, Mar 16 2015, after Reinhard Zumkeller *)
-
def A055096(n,k): return n^2 + k^2
flatten([[A055096(n,k) for k in range(1,n)] for n in range(2,16)]) # G. C. Greubel, Apr 19 2023
Edited: in T(n, k) formula by Reinhard Zumkeller k < n replaced by k <= n. -
Wolfdieter Lang, Dec 02 2014
Made definition more precise, changed offset to 2. -
N. J. A. Sloane, Mar 30 2015
A183134
Square array A(n,k) by antidiagonals. A(n,k) is the number of length 2n k-ary words (n,k>=0), either empty or beginning with the first character of the alphabet, that can be built by repeatedly inserting doublets into the initially empty word.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 3, 1, 0, 1, 1, 5, 10, 1, 0, 1, 1, 7, 29, 35, 1, 0, 1, 1, 9, 58, 181, 126, 1, 0, 1, 1, 11, 97, 523, 1181, 462, 1, 0, 1, 1, 13, 146, 1145, 4966, 7941, 1716, 1, 0, 1, 1, 15, 205, 2131, 14289, 48838, 54573, 6435, 1, 0
Offset: 0
A(3,2) = 10, because 10 words of length 6 beginning with the first character of the 2-letter alphabet {a, b} can be built by repeatedly inserting doublets (words with two equal letters) into the initially empty word: aaaaaa, aaaabb, aaabba, aabaab, aabbaa, aabbbb, abaaba, abbaaa, abbabb, abbbba.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, ...
0, 1, 1, 1, 1, 1, ...
0, 1, 3, 5, 7, 9, ...
0, 1, 10, 29, 58, 97, ...
0, 1, 35, 181, 523, 1145, ...
0, 1, 126, 1181, 4966, 14289, ...
- Alois P. Heinz, Antidiagonals n = 0..140, flattened
- C. Kassel and C. Reutenauer, Algebraicity of the zeta function associated to a matrix over a free group algebra, arXiv preprint arXiv:1303.3481, 2013
- A. Lakshminarayan, Z. Puchala, K. Zyczkowski, Diagonal unitary entangling gates and contradiagonal quantum states, arXiv preprint arXiv:1407.1169, 2014
Rows 0-10 give:
A000012,
A057427,
A004273,
A079273(k) for k>0,
A194716,
A194717,
A194718,
A194719,
A194720,
A194721,
A194722.
Columns 0-10 give:
A000007,
A000012,
A001700(n-1) for n>0,
A194723,
A194724,
A194725,
A194726,
A194727,
A194728,
A194729,
A194730.
Coefficients of row polynomials for k>0 in k, (k+1) are given by
A050166,
A157491.
-
A:= proc(n, k)
local j;
if n=0 then 1
elif k<=1 then k
else add(binomial(2*n,j)*(n-j)*(k-1)^j, j=0..n-1)/n
fi
end:
seq(seq(A(n, d-n), n=0..d), d=0..10);
-
a[n_, k_] := If[ n == 0, 1 , If[ k <= 1, k, Sum [Binomial[2*n, j]*(n-j)*(k-1)^j, {j, 0, n-1}] / n ] ]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 09 2013, translated from Maple *)
A088307
Triangle, read by rows, T(n,k) = n^2 + k^2 if gcd(n,k)=1, otherwise 0.
Original entry on oeis.org
2, 5, 0, 10, 13, 0, 17, 0, 25, 0, 26, 29, 34, 41, 0, 37, 0, 0, 0, 61, 0, 50, 53, 58, 65, 74, 85, 0, 65, 0, 73, 0, 89, 0, 113, 0, 82, 85, 0, 97, 106, 0, 130, 145, 0, 101, 0, 109, 0, 0, 0, 149, 0, 181, 0, 122, 125, 130, 137, 146, 157, 170, 185, 202, 221, 0
Offset: 1
Triangle begins:
2;
5, 0;
10, 13, 0;
17, 0, 25, 0;
26, 29, 34, 41, 0;
37, 0, 0, 0, 61, 0;
...
-
function A088307(n,k)
if GCD(k,n) eq 1 then return n^2+k^2;
else return 0;
end if; return A088307;
end function;
[A088307(n,k): k in [1..n], n in [1..13]]; // G. C. Greubel, Dec 16 2022
-
Table[If[CoprimeQ[n,k],n^2+k^2,0],{n,20},{k,n}]//Flatten (* Harvey P. Dale, Jul 13 2018 *)
-
def A088307(n,k):
if (gcd(n,k)==1): return n^2 + k^2
else: return 0
flatten([[A088307(n,k) for k in range(1,n+1)] for n in range(1,14)]) # G. C. Greubel, Dec 16 2022
A192027
Square array read by antidiagonals: W(n,m) (n >= 1, m >= 1) is the Wiener index of the graph G(n,m) obtained from the n-circuit graph by adjoining m pendant edges at each node of the circuit.
Original entry on oeis.org
1, 10, 4, 27, 29, 9, 60, 75, 58, 16, 105, 160, 147, 97, 25, 174, 275, 308, 243, 146, 36, 259, 447, 525, 504, 363, 205, 49, 376, 658, 846, 855, 748, 507, 274, 64, 513, 944, 1239, 1371, 1265, 1040, 675, 353, 81, 690, 1278, 1768, 2002, 2022, 1755, 1380, 867, 442, 100
Offset: 1
a(3,1)=27 because in the graph with vertex set {A,B,C,A',B',C'} and edge set {AB, BC, CA, AA', BB', CC'} we have 6 pairs of vertices at distance 1 (the edges), 6 pairs at distance 2 (A'B, A'C, B'A, B'C, C'A, C'B) and 3 pairs at distance 3 (A'B', B'C', C'A'); 6*1 + 6*2 + 3*3 = 27.
The square array starts:
1, 4, 9, 16, 25, 36, 49, ...;
10, 29, 58, 97, 146, 205, 274, ...;
27, 75, 147, 243, 363, 507, 675, ...;
60, 160, 308, 504, 748, 1040, 1380, ...;
-
W := proc (n, m) if `mod`(n, 2) = 0 then (1/2)*n*((1/4)*n^2+2*m^2*n+(1/4)*m^2*n^2+2*m*n+(1/2)*m*n^2-2*m) else (1/8)*(n^2-1+m^2*n^2+8*m^2*n-m^2+2*m*n^2+8*m*n-10*m)*n end if end proc: for n to 10 do seq(W(n-i, i+1), i = 0 .. n-1) end do; # yields the antidiagonals in triangular form
W := proc (n, m) if `mod`(n, 2) = 0 then (1/2)*n*((1/4)*n^2+2*m^2*n+(1/4)*m^2*n^2+2*m*n+(1/2)*m*n^2-2*m) else (1/8)*(n^2-1+m^2*n^2+8*m^2*n-m^2+2*m*n^2+8*m*n-10*m)*n end if end proc: for n to 10 do seq(W(n, m), m = 1 .. 10) end do; # yields the first 10 entries of each of rows 1,2,...,10.
P := proc (n, m) if `mod`(n, 2) = 0 then sort(expand(n*(m*t+(1/2)*m*(m-1)*t^2)+n*(sum(t^j, j = 1 .. (1/2)*n-1))*(1+m*t)^2+(1/2)*n*t^((1/2)*n)*(1+m*t)^2)) else sort(expand(n*(m*t+(1/2)*m*(m-1)*t^2)+n*(sum(t^j, j = 1 .. (1/2)*n-1/2))*(1+m*t)^2)) end if end proc: P(4,9);
A192032
Square array read by antidiagonals: W(m,n) (m >= 0, n >= 0) is the Wiener index of the graph G(m,n) obtained in the following way: connect by an edge the center of an m-edge star with the center of an n-edge star. The Wiener index of a connected graph is the sum of distances between all unordered pairs of vertices in the graph.
Original entry on oeis.org
1, 4, 4, 9, 10, 9, 16, 18, 18, 16, 25, 28, 29, 28, 25, 36, 40, 42, 42, 40, 36, 49, 54, 57, 58, 57, 54, 49, 64, 70, 74, 76, 76, 74, 70, 64, 81, 88, 93, 96, 97, 96, 93, 88, 81, 100, 108, 114, 118, 120, 120, 118, 114, 108, 100, 121, 130, 137, 142, 145, 146, 145, 142, 137, 130, 121
Offset: 0
W(1,2)=18 because in the graph with vertex set {A,a,B,b,b'} and edge set {AB, Aa, Bb, Bb'} we have 4 pairs of vertices at distance 1 (the edges), 4 pairs at distance 2 (Ab, Ab', Ba, bb') and 2 pairs at distance 3 (ab,ab'); 4*1 + 4*2 + 2*3 = 18.
The square array starts:
1, 4, 9, 16, 25, ...;
4, 10, 18, 28, 30, ...;
9, 18, 29, 42, 57, ...;
16, 28, 42, 58, 76, ...;
-
W := proc (m, n) options operator, arrow: m^2+n^2+3*m*n+2*m+2*n+1 end proc: for n from 0 to 10 do seq(W(n-i, i), i = 0 .. n) end do; # yields the antidiagonals in triangular form
W := proc (m, n) options operator, arrow: m^2+n^2+3*m*n+2*m+2*n+1 end proc: for m from 0 to 9 do seq(W(m, n), n = 0 .. 9) end do; # yields the first 10 entries of each of rows 0,1,2,...,9
Showing 1-5 of 5 results.
Comments