A370892 Least positive integer k such that 4 numbers starting with k in an arithmetic progression with difference n have a solution in the game 24.
3, 1, 1, 2, 1, 1, 1, 1, 2, 3, 2, 1, 1, 2, 2, 3, 2, 12, 9, 12, 2, 6, 2, 2, 12, 2, 2, 12, 4, 12, 5, 12, 4, 12, 12, 10, 12, 12, 12, 12, 8, 12, 12, 12, 2, 12, 2, 1, 8, 12, 2, 12, 12, 12, 12, 12, 12, 12, 12, 12, 8, 12, 12, 12, 12, 12, 12, 12, 12, 6, 5, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12
Offset: 0
Keywords
Examples
For n=4, the arithmetic sequence 1, 5, 9, 13 has the solution (1+5)*(13-9) = 24 so a(4)=1.
Links
- Colin Linzer, Java program for the sequence.
Programs
-
Maple
nv:= proc(V1,V2) local a1,a2; {seq(seq(op([a1+a2,a1*a2,a1-a2,a2-a1]),a1 = V1),a2 = V2), seq(seq(a1/a2,a1 = V1),a2=V2 minus {0}), seq(seq(a2/a1,a1 = V1 minus {0}),a2 = V2)} end proc: s24:= proc(a,b,c,d) local t; for t in combinat:-permute([a,b,c,d]) do if member(24, nv(nv(nv({t[1]},{t[2]}),{t[3]}),{t[4]})) then return true fi; if member(24, nv(nv({t[1]},{t[2]}),nv({t[3]},{t[4]}))) then return true fi; od; false end proc: f:= proc(n) local k; for k from 1 do if s24(k, k+n, k+2*n, k+3*n) then return k fi; od; end proc: map(f, [$0..100]); # Robert Israel, Mar 05 2024
Comments