Skip to content

This produces the probability that a sequence of N integers from 1 to k contains the average of its sequence somewhere inside the sequence.

Notifications You must be signed in to change notification settings

Horep/Number-of-vectors-that-contain-their-average

Repository files navigation

This produces the number of 1..k vectors of length N that contain the average of its sequence somewhere inside the sequence. E.g. the sequence

(1,1,1,1)

contains its arithmetic mean,

(1+1+1+1)/4 = 1 

within its sequence.

To calculate the number of length three 0..n vectors that contain their arithmetic mean, you would use A(3,n). It is similar for the geometric mean, except you would use G.

To calculate a sequence of these 10 of these length three geometric mean numbers, you would use GiveList(G, 3, 10). To produce several lists, use GiveTable(y, N_num, k_num).

To calculate k=(num) non-trivial consecutive terms, use give_nontrivial_consecutive(y, N, num).

About

This produces the probability that a sequence of N integers from 1 to k contains the average of its sequence somewhere inside the sequence.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published