A322699
Square array A(n,k), n >= 0, k >= 0, read by antidiagonals, where A(n,k) is 1/2 * (-1 + Sum_{j=0..k} binomial(2*k,2*j)*(n+1)^(k-j)*n^j).
Original entry on oeis.org
0, 0, 0, 0, 1, 0, 0, 8, 2, 0, 0, 49, 24, 3, 0, 0, 288, 242, 48, 4, 0, 0, 1681, 2400, 675, 80, 5, 0, 0, 9800, 23762, 9408, 1444, 120, 6, 0, 0, 57121, 235224, 131043, 25920, 2645, 168, 7, 0, 0, 332928, 2328482, 1825200, 465124, 58080, 4374, 224, 8, 0
Offset: 0
Square array begins:
0, 0, 0, 0, 0, 0, 0, ...
0, 1, 8, 49, 288, 1681, 9800, ...
0, 2, 24, 242, 2400, 23762, 235224, ...
0, 3, 48, 675, 9408, 131043, 1825200, ...
0, 4, 80, 1444, 25920, 465124, 8346320, ...
0, 5, 120, 2645, 58080, 1275125, 27994680, ...
0, 6, 168, 4374, 113568, 2948406, 76545000, ...
-
Unprotect[Power]; 0^0 := 1; Protect[Power]; Table[(-1 + Sum[Binomial[2 k, 2 j] (# + 1)^(k - j)*#^j, {j, 0, k}])/2 &[n - k], {n, 0, 9}, {k, n, 0, -1}] // Flatten (* Michael De Vlieger, Jan 01 2019 *)
nmax = 9; row[n_] := LinearRecurrence[{4n+3, -4n-3, 1}, {0, n, 4n(n+1)}, nmax+1]; T = Array[row, nmax+1, 0]; A[n_, k_] := T[[n+1, k+1]];
Table[A[n-k, k], {n, 0, nmax}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Jan 06 2019 *)
-
def ncr(n, r)
return 1 if r == 0
(n - r + 1..n).inject(:*) / (1..r).inject(:*)
end
def A(k, n)
(0..n).map{|i| (0..k).inject(-1){|s, j| s + ncr(2 * k, 2 * j) * (i + 1) ** (k - j) * i ** j} / 2}
end
def A322699(n)
a = []
(0..n).each{|i| a << A(i, n - i)}
ary = []
(0..n).each{|i|
(0..i).each{|j|
ary << a[i - j][j]
}
}
ary
end
p A322699(10)
A175497
Numbers k with the property that k^2 is a product of two distinct triangular numbers.
Original entry on oeis.org
0, 6, 30, 35, 84, 180, 204, 210, 297, 330, 546, 840, 1170, 1189, 1224, 1710, 2310, 2940, 2970, 3036, 3230, 3900, 4914, 6090, 6930, 7134, 7140, 7245, 7440, 8976, 10710, 12654, 14175, 14820, 16296, 16380, 17220, 19866, 22770, 25172, 25944, 29103
Offset: 1
Many terms are in common with
A147779.
Cf.
A152005 (two distinct tetrahedral numbers).
-
isA175497 := proc(n)
local i,Ti,Tj;
if n = 0 then
return true;
end if;
for i from 1 do
Ti := i*(i+1)/2 ;
if Ti > n^2 then
return false;
else
Tj := n^2/Ti ;
if Tj <> Ti and type(Tj,'integer') then
if isA000217(Tj) then # code in A000217
return true;
end if;
end if;
end if;
end do:
end proc:
for n from 0 do
if isA175497(n) then
printf("%d,\n",n);
end if;
end do: # R. J. Mathar, May 26 2016
-
triangularQ[n_] := IntegerQ[Sqrt[8n + 1]];
okQ[n_] := Module[{i, Ti, Tj}, If[n == 0, Return[True]]; For[i = 1, True, i++, Ti = i(i+1)/2; If[Ti > n^2, Return[False], Tj = n^2/Ti; If[Tj != Ti && IntegerQ[Tj], If[ triangularQ[Tj], Return[True]]]]]];
Reap[For[k = 0, k < 30000, k++, If[okQ[k], Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Jun 13 2023, after R. J. Mathar *)
-
from itertools import count, islice, takewhile
from sympy import divisors
from sympy.ntheory.primetest import is_square
def A175497_gen(startvalue=0): # generator of terms >= startvalue
return filter(lambda k:not k or any(map(lambda d: is_square((d<<3)+1) and is_square((k**2//d<<3)+1), takewhile(lambda d:d**2A175497_list = list(islice(A175497_gen(),20)) # Chai Wah Wu, Mar 13 2023
-
def A175497_list(n):
def A322699_A(k, n):
p, q, r, m = 0, k, 4*k*(k+1), 0
while m < n:
p, q, r = q, r, (4*k+3)*(r-q) + p
m += 1
return p
def a(k, n, j):
if n == 0: return 0
p = A322699_A(k, n)*(A322699_A(k, n)+1)*(2*k+1) - a(k, n-1, 1)
q = (4*k+2)*p - A322699_A(k, n)*(A322699_A(k, n)+1)//2
m = 1
while m < j: p, q = q, (4*k+2)*q - p; m += 1
return p
A = set([a(k, 1, 1) for k in range(n+1)])
k, l, m = 1, 1, 2
while True:
x = a(k, l, m)
if x < max(A):
A |= {x}
A = set(sorted(A)[:n+1])
m += 1
else:
if m == 1 and l == 1:
if k > n:
return sorted(A)
k += 1
elif m > 1:
l += 1; m = 1
elif l > 1:
k += 1; l, m = 1, 1
# Onur Ozkan, Mar 15 2023
A233474
Numbers m such that 5*T(m)-1 is a square, where T = A000217.
Original entry on oeis.org
1, 4, 52, 169, 1993, 6436, 75700, 244417, 2874625, 9281428, 109160068, 352449865, 4145207977, 13383813460, 157408743076, 508232461633, 5977387028929, 19299449728612, 226983298356244, 732870857225641, 8619387950508361, 27829793124845764
Offset: 1
169 is in the sequence because 5*169*170/2-1 = 268^2.
Cf. numbers m such that k*
A000217(m)-1 is a square:
A072221 for k=1; m=1 for k=2; this sequence for k=5.
-
LinearRecurrence[{1, 38, -38, -1, 1}, {1, 4, 52, 169, 1993}, 30]
Showing 1-3 of 3 results.
Comments