[go: up one dir, main page]

login
Revision History for A088307 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Triangle, read by rows, T(n,k) = n^2 + k^2 if gcd(n,k)=1, otherwise 0.
(history; published version)
#17 by OEIS Server at Tue Dec 20 10:52:03 EST 2022
LINKS

G. C. Greubel, <a href="/A088307/b088307_1.txt">Rows n = 1..50 of the triangle, flattened</a>

#16 by N. J. A. Sloane at Tue Dec 20 10:52:03 EST 2022
STATUS

proposed

approved

Discussion
Tue Dec 20
10:52
OEIS Server: Installed new b-file as b088307.txt.  Old b-file is now b088307_1.txt.
#15 by G. C. Greubel at Fri Dec 16 03:18:49 EST 2022
STATUS

editing

proposed

#14 by G. C. Greubel at Fri Dec 16 03:17:17 EST 2022
DATA

0, 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,21

LINKS

G. C. Greubel, <a href="/A088307/b088307_1.txt">Rows n = 1..50 of the triangle, flattened</a>

FORMULA

T(n, n) = 02*A000007(n-1).

T(2*n+1, n) = A079273(n-+1).

T(2*n-1, n) = A190816(n) - 2*[n=1].

Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = A053818(n+1) - + [n=1]. (End)

EXAMPLE

02;

MATHEMATICA

Join[{0}, Table[If[CoprimeQ[n, k], n^2+k^2, 0], {n, 2, 20}, {k, n}]//Flatten] (* Harvey P. Dale, Jul 13 2018 *)

PROG

if GCD(k, n ) eq 1 then return 0n^2+k^2;

elif GCD(k, n) eq 1 then return n^2+k^2;

if (gcd(n, k)==1): return 0n^2 + k^2

elif (gcd(n, k)==1): return n^2 + k^2

Discussion
Fri Dec 16
03:18
G. C. Greubel: Now T(1,1) = 2 and the formulas are adjusted for this.
#13 by G. C. Greubel at Fri Dec 16 03:01:36 EST 2022
FORMULA

Sum_{k=1..n} T(n, k) = A000010(n) = #{m: 1<=k<=n and T(n,m)>0} = Sum_{k=1..n} A057427(T(n,m)).

Sum_{k=1..n} A057427(T(n,m)) = A000010(n).

STATUS

proposed

editing

Discussion
Fri Dec 16
03:04
G. C. Greubel: Did not check row sum formula on first round; now fixed. Agreed T(1,1) = 2.
#12 by G. C. Greubel at Fri Dec 16 02:24:26 EST 2022
STATUS

editing

proposed

Discussion
Fri Dec 16
02:40
Michel Marcus: Sum_{k=1..n} T(n, k) = A000010(n)  : does not seem right ??
02:49
Michel Marcus: data says T(1,1) = 0; but name says T(n,k) = n^2 + k^2 if gcd(n,k)=1, so that T(1,1) = 1^2+1^2 since gcd(1,1) is 1  ???
#11 by G. C. Greubel at Fri Dec 16 02:23:41 EST 2022
NAME

Triangle , read by rows, 1 <= k <= n: T(n,k) = n^2 + k^2 if gcd(n,k)=1, otherwise 0.

DATA

0, 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, 145, 0, 0, 0, 169

COMMENTS

(n^2-k^2, 2*k*n, T(n,k)) is a primitive Pythagorean triple iff T(n,k) > 0;.

n > 1: T(n,1)=A002522(n); n > 0: T(2*n+1,2) = A078370(n); T(n,n)=0;

sum of n-th row = phi(n): A000010(n) = #{m: 1<=k<=n and T(n,m)>0} = Sum_{k=1..n} A057427(T(n,m)).

LINKS

G. C. Greubel, <a href="/A088307/b088307.txt">Rows n = 1..50 of the triangle, flattened</a>

FORMULA

T(n, n) = 0.

T(n, 1) = A002522(n).

T(2*n+1, 2) = A078370(n).

Sum_{k=1..n} T(n, k) = A000010(n) = #{m: 1<=k<=n and T(n,m)>0} = Sum_{k=1..n} A057427(T(n,m)).

From G. C. Greubel, Dec 15 2022: (Start)

T(n, n-1) = A001844(n).

T(n, n-2) = ((1-(-1)^n)/2) * A008527((n+1)/2).

T(2*n, n) = 5*A000007(n-1).

T(2*n+1, n) = A079273(n-1).

T(2*n-1, n) = A190816(n) - 2*[n=1].

Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = A053818(n+1) - [n=1]. (End)

EXAMPLE

n=6, k=5: 6^2 + 5^2 = 36 + 25 = 61: (6^2 - 5^2)^2 + (2*6*5)^2 = 11^2 + 60^2 = 121 + 3600 = 3721 = 61^2 = T(6,5)^2;

n=7, k=3: 7^2 + 3^2 = 49 + 9 = 58: (7^2 - 3^2)^2 + (2*7*3)^2 = 40^2 + 42^2 = 1600 + 1764 = 3364 = 58^2 = T(7,3)^2.

0,;

5, 0,;

10, 13, 0,;

17, 0, 25, 0,;

26, 29, 34, 41, 0,;

37, 0, 0, 0, 61, 0,;

PROG

(Magma)

function A088307(n, k)

if n eq 1 then return 0;

elif 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

(SageMath)

def A088307(n, k):

if (n==1): return 0

elif (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

STATUS

approved

editing

#10 by Sean A. Irvine at Sun Oct 27 05:19:38 EDT 2019
STATUS

proposed

approved

#9 by Michel Marcus at Sun Oct 27 02:38:06 EDT 2019
STATUS

editing

proposed

#8 by Michel Marcus at Sun Oct 27 02:38:03 EDT 2019
EXAMPLE

n=6, k=5: 6^2 + 5^2 = 36 + 25 = 61: (6^2 - 5^2)^2 + (2*6*5)^2 = 11^2 + 60^2 = 121 + 3600 = 3721 = 61^2 = T(6,5)^2;

11n=7, k=3: 7^2 + 3^2 = 49 + 9 = 58: (7^2 - 3^2)^2 + (2*7*3)^2 = 40^2 + 6042^2 = 121 1600 + 3600 1764 = 3721 3364 = 6158^2 = T(6,57,3)^2;.

n=7, k=3: 7^2 + 3^2 = 49 + 9 = 58: (7^2 - 3^2)^2 + (2*7*3)^2 =

40^2 + 42^2 = 1600 + 1764 = 3364 = 58^2 = T(7,3)^2.

Triangle begins:

0,

5, 0,

10, 13, 0,

17, 0, 25, 0,

26, 29, 34, 41, 0,

37, 0, 0, 0, 61, 0,

...

STATUS

proposed

editing