OKlibrary
0.2.1.6

Plans regarding van der Waerden numbers. More...
Go to the source code of this file.
Plans regarding van der Waerden numbers.
exactf_tau_arithprog(1,n); if n < 1 then 0 elseif 1 = 1 then n elseif 1 = 2 then n1 elseif n <= 1 and evenp(1) then (if n = 1 then 2 else 1) elseif n <= 2 and oddp(1) then (if n = 2 then 2 else 1) else unknown
testf(M,K) := for m : 1 thru M do for k : m+2 thru K do block([res1 : vanderwaerdent_lrc(m,k), res2 : vanderwaerdent(m,k)], if not listp(res1) and res2 # unknown and res1 # res2 then print(m,k,res1,res2) )$
testf(10,30); 2 4 10 11 4 6 18 27 6 8 26 51
tau_arithprog_seq[3] : [ 0,0,1,1,1,2,3,4,4,5, 5,6,6,6,7,8,9,10,11,11, 12,13,14,14,15,15,16,17,18,18, 19,19,20,21,22,22,23,24,25,25, 25,26,27,28,29,30,31,32,33,34, 34,35,36,36,37,38,39,39,40,41 ]$
lb(n) := block([L : tau_arithprog_seq[3], l, m:0], l : length(L), for k : max(1,nl) thru min(n1,l) do block( [v : L[k] + L[nk]], if v > m then m:v), m)$ map(lb,create_list(i,i,1,60))  tau_arithprog_seq[3]; [ 0,0,1,0,0,0,1,1,0,1, 0,1,0,0,0,0,1,1,1,0, 1,1,1,0,1,0,1,1,1,0, 1,0,1,1,1,0,1,1,1,0, 0,0,1,1,1,1,1,1,1,1, 0,1,1,0,1,1,1,0,1,1 ]
maxdigitp(k,n) := some_s(lambda([d],is(d=k1)),int2polyadic(n,k))$
maxdigits(k,n) := subset(setmn(0,n1),lambda([x],maxdigitp(k,x)))$
transdig_ap(k,n) := map(lambda([x],x+1), maxdigits(k,n))$
transversal_p(transdig_ap(10,19),arithprog_hg(10,19)); false
ubmd(k,n) := length(transdig_ap(k,n))$
ubmda(k,a) := block([n : ((k2)*k^a+1)/(k1)], [n, n(k1)^a])$
map(lambda([a],ubmda(3,a)),create_list(i,i,1,6)); [[2,0],[5,1],[14,6],[41,25],[122,90],[365,301]]
Definition in file Numbers.hpp.