Finding the Floor Function Explicit Formula for a Sequence
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I have found come across two sequences that I know probably both have an explicit formula expressed in terms of the floor function, but I cannot quite figure it out.
$0,1,1,2,4,4,5,5,6,8,8,9,9,10,12,12$
$0,0,1,1,0,4,4,5,5,4,8,8,9,9,8,12$
(Note that the starting $0$ in both sequences is the $0$th term of both sequences.)
There is definitely a consistent pattern, but tricky to precisely describe. I have tried many possible formulas, graphed the sequences, and even referred to the OEIS, all to no avail. Any help would be appreciated!
sequences-and-series discrete-mathematics floor-function
 |Â
show 1 more comment
up vote
1
down vote
favorite
I have found come across two sequences that I know probably both have an explicit formula expressed in terms of the floor function, but I cannot quite figure it out.
$0,1,1,2,4,4,5,5,6,8,8,9,9,10,12,12$
$0,0,1,1,0,4,4,5,5,4,8,8,9,9,8,12$
(Note that the starting $0$ in both sequences is the $0$th term of both sequences.)
There is definitely a consistent pattern, but tricky to precisely describe. I have tried many possible formulas, graphed the sequences, and even referred to the OEIS, all to no avail. Any help would be appreciated!
sequences-and-series discrete-mathematics floor-function
2
Where did you come across the sequences?
– user202729
Jul 22 at 6:43
I can only see one sequence here. Where is the other
– Rakesh Bhatt
Jul 22 at 6:49
1
There are $2$, look closely and you'll see the word "and" squeezed in between them. or if you did notice that, then perhaps you didn't notice that they are different by a few terms
– john fowles
Jul 22 at 6:50
Could you describe the patterns somehow? Or at least give many more terms for each one...
– coffeemath
Jul 22 at 6:57
Some observations about the first sequence. A number seems to repeat two times when it is $0pmod4$ or $1pmod4.$ Moreover, a number that is $2pmod4$ appears once, and after that appearance, $2$ is added to that number.
– Flynn Rixona
Jul 22 at 7:01
 |Â
show 1 more comment
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have found come across two sequences that I know probably both have an explicit formula expressed in terms of the floor function, but I cannot quite figure it out.
$0,1,1,2,4,4,5,5,6,8,8,9,9,10,12,12$
$0,0,1,1,0,4,4,5,5,4,8,8,9,9,8,12$
(Note that the starting $0$ in both sequences is the $0$th term of both sequences.)
There is definitely a consistent pattern, but tricky to precisely describe. I have tried many possible formulas, graphed the sequences, and even referred to the OEIS, all to no avail. Any help would be appreciated!
sequences-and-series discrete-mathematics floor-function
I have found come across two sequences that I know probably both have an explicit formula expressed in terms of the floor function, but I cannot quite figure it out.
$0,1,1,2,4,4,5,5,6,8,8,9,9,10,12,12$
$0,0,1,1,0,4,4,5,5,4,8,8,9,9,8,12$
(Note that the starting $0$ in both sequences is the $0$th term of both sequences.)
There is definitely a consistent pattern, but tricky to precisely describe. I have tried many possible formulas, graphed the sequences, and even referred to the OEIS, all to no avail. Any help would be appreciated!
sequences-and-series discrete-mathematics floor-function
edited Jul 22 at 6:57
asked Jul 22 at 6:18
Flynn Rixona
1567
1567
2
Where did you come across the sequences?
– user202729
Jul 22 at 6:43
I can only see one sequence here. Where is the other
– Rakesh Bhatt
Jul 22 at 6:49
1
There are $2$, look closely and you'll see the word "and" squeezed in between them. or if you did notice that, then perhaps you didn't notice that they are different by a few terms
– john fowles
Jul 22 at 6:50
Could you describe the patterns somehow? Or at least give many more terms for each one...
– coffeemath
Jul 22 at 6:57
Some observations about the first sequence. A number seems to repeat two times when it is $0pmod4$ or $1pmod4.$ Moreover, a number that is $2pmod4$ appears once, and after that appearance, $2$ is added to that number.
– Flynn Rixona
Jul 22 at 7:01
 |Â
show 1 more comment
2
Where did you come across the sequences?
– user202729
Jul 22 at 6:43
I can only see one sequence here. Where is the other
– Rakesh Bhatt
Jul 22 at 6:49
1
There are $2$, look closely and you'll see the word "and" squeezed in between them. or if you did notice that, then perhaps you didn't notice that they are different by a few terms
– john fowles
Jul 22 at 6:50
Could you describe the patterns somehow? Or at least give many more terms for each one...
– coffeemath
Jul 22 at 6:57
Some observations about the first sequence. A number seems to repeat two times when it is $0pmod4$ or $1pmod4.$ Moreover, a number that is $2pmod4$ appears once, and after that appearance, $2$ is added to that number.
– Flynn Rixona
Jul 22 at 7:01
2
2
Where did you come across the sequences?
– user202729
Jul 22 at 6:43
Where did you come across the sequences?
– user202729
Jul 22 at 6:43
I can only see one sequence here. Where is the other
– Rakesh Bhatt
Jul 22 at 6:49
I can only see one sequence here. Where is the other
– Rakesh Bhatt
Jul 22 at 6:49
1
1
There are $2$, look closely and you'll see the word "and" squeezed in between them. or if you did notice that, then perhaps you didn't notice that they are different by a few terms
– john fowles
Jul 22 at 6:50
There are $2$, look closely and you'll see the word "and" squeezed in between them. or if you did notice that, then perhaps you didn't notice that they are different by a few terms
– john fowles
Jul 22 at 6:50
Could you describe the patterns somehow? Or at least give many more terms for each one...
– coffeemath
Jul 22 at 6:57
Could you describe the patterns somehow? Or at least give many more terms for each one...
– coffeemath
Jul 22 at 6:57
Some observations about the first sequence. A number seems to repeat two times when it is $0pmod4$ or $1pmod4.$ Moreover, a number that is $2pmod4$ appears once, and after that appearance, $2$ is added to that number.
– Flynn Rixona
Jul 22 at 7:01
Some observations about the first sequence. A number seems to repeat two times when it is $0pmod4$ or $1pmod4.$ Moreover, a number that is $2pmod4$ appears once, and after that appearance, $2$ is added to that number.
– Flynn Rixona
Jul 22 at 7:01
 |Â
show 1 more comment
2 Answers
2
active
oldest
votes
up vote
2
down vote
Notice that the first difference sequence of both sequences have period $5$. Equivalently, there is a constant difference after every $5$ terms which is $4$ for both sequences. Another way to state this is that $, a_(n+5) = a(n) + 4 ,$ for all $n$ for both sequences. Thus,
$, a(n) = 4 lfloor n / 5rfloor + a(n pmod5) ,$
for both sequences. Options vary about how to deal with the $, a(n pmod5) ,$ expression in the formula. It is purely periodic so you could use a sum of sines and cosines. You could use something like $, (0,1,1,2,4)[n pmod5] ,$ with the understanding that the finite list is indexed from $0$ to $4$.
If $, a(n) ,$ and $, b(n) ,$ are the two sequences, notice that
$, a(n) + b(n) = 8 lfloor n / 5rfloor + (n pmod5). ,$
add a comment |Â
up vote
2
down vote
For the first series (ignoring 0 element):
$$a_n=4left lfloorfracn-15right rfloor+1+left lfloorfraci3right rfloor+2left lfloorfraci4right rfloor$$
...where:
$$i=n-5left lfloorfracn-15right rfloor$$
You can create one monster expression if you like it so. Proof:
In[24]:= a[n_] := Module[i, s,
s = 4 Floor[(n - 1)/ 5] + 1;
i = n - Floor[(n - 1)/5]*5;
s += Floor[i/3];
s += 2 Floor[i/4]
];
Table[a[n], n, 1, 30]
Out[25]= 1, 1, 2, 4, 4, 5, 5, 6, 8, 8, 9, 9, 10, 12, 12, 13, 13, 14,
16, 16, 17, 17, 18, 20, 20, 21, 21, 22, 24, 24
The second sequence (ignoring 0 elemenet):
$$a_n=4left lfloorfracn-15right rfloor+left lfloorfraci2right rfloor-2left lfloorfraci4right rfloor+4left lfloorfraci5right rfloor$$
...where:
$$i=n-5left lfloorfracn-15right rfloor$$
Proof:
In[26]:= a[n_] := Module[i, s,
s = 4 Floor[(n - 1)/ 5];
i = n - Floor[(n - 1)/5]*5;
s += Floor[i/2];
s -= 2 Floor[i/4];
s += 4 Floor[i/5]
];
Table[a[n], n, 1, 30]
Out[27]= 0, 1, 1, 0, 4, 4, 5, 5, 4, 8, 8, 9, 9, 8, 12, 12, 13, 13,
12, 16, 16, 17, 17, 16, 20, 20, 21, 21, 20, 24
Done.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Notice that the first difference sequence of both sequences have period $5$. Equivalently, there is a constant difference after every $5$ terms which is $4$ for both sequences. Another way to state this is that $, a_(n+5) = a(n) + 4 ,$ for all $n$ for both sequences. Thus,
$, a(n) = 4 lfloor n / 5rfloor + a(n pmod5) ,$
for both sequences. Options vary about how to deal with the $, a(n pmod5) ,$ expression in the formula. It is purely periodic so you could use a sum of sines and cosines. You could use something like $, (0,1,1,2,4)[n pmod5] ,$ with the understanding that the finite list is indexed from $0$ to $4$.
If $, a(n) ,$ and $, b(n) ,$ are the two sequences, notice that
$, a(n) + b(n) = 8 lfloor n / 5rfloor + (n pmod5). ,$
add a comment |Â
up vote
2
down vote
Notice that the first difference sequence of both sequences have period $5$. Equivalently, there is a constant difference after every $5$ terms which is $4$ for both sequences. Another way to state this is that $, a_(n+5) = a(n) + 4 ,$ for all $n$ for both sequences. Thus,
$, a(n) = 4 lfloor n / 5rfloor + a(n pmod5) ,$
for both sequences. Options vary about how to deal with the $, a(n pmod5) ,$ expression in the formula. It is purely periodic so you could use a sum of sines and cosines. You could use something like $, (0,1,1,2,4)[n pmod5] ,$ with the understanding that the finite list is indexed from $0$ to $4$.
If $, a(n) ,$ and $, b(n) ,$ are the two sequences, notice that
$, a(n) + b(n) = 8 lfloor n / 5rfloor + (n pmod5). ,$
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Notice that the first difference sequence of both sequences have period $5$. Equivalently, there is a constant difference after every $5$ terms which is $4$ for both sequences. Another way to state this is that $, a_(n+5) = a(n) + 4 ,$ for all $n$ for both sequences. Thus,
$, a(n) = 4 lfloor n / 5rfloor + a(n pmod5) ,$
for both sequences. Options vary about how to deal with the $, a(n pmod5) ,$ expression in the formula. It is purely periodic so you could use a sum of sines and cosines. You could use something like $, (0,1,1,2,4)[n pmod5] ,$ with the understanding that the finite list is indexed from $0$ to $4$.
If $, a(n) ,$ and $, b(n) ,$ are the two sequences, notice that
$, a(n) + b(n) = 8 lfloor n / 5rfloor + (n pmod5). ,$
Notice that the first difference sequence of both sequences have period $5$. Equivalently, there is a constant difference after every $5$ terms which is $4$ for both sequences. Another way to state this is that $, a_(n+5) = a(n) + 4 ,$ for all $n$ for both sequences. Thus,
$, a(n) = 4 lfloor n / 5rfloor + a(n pmod5) ,$
for both sequences. Options vary about how to deal with the $, a(n pmod5) ,$ expression in the formula. It is purely periodic so you could use a sum of sines and cosines. You could use something like $, (0,1,1,2,4)[n pmod5] ,$ with the understanding that the finite list is indexed from $0$ to $4$.
If $, a(n) ,$ and $, b(n) ,$ are the two sequences, notice that
$, a(n) + b(n) = 8 lfloor n / 5rfloor + (n pmod5). ,$
edited Jul 22 at 12:19
answered Jul 22 at 11:40


Somos
11.5k1933
11.5k1933
add a comment |Â
add a comment |Â
up vote
2
down vote
For the first series (ignoring 0 element):
$$a_n=4left lfloorfracn-15right rfloor+1+left lfloorfraci3right rfloor+2left lfloorfraci4right rfloor$$
...where:
$$i=n-5left lfloorfracn-15right rfloor$$
You can create one monster expression if you like it so. Proof:
In[24]:= a[n_] := Module[i, s,
s = 4 Floor[(n - 1)/ 5] + 1;
i = n - Floor[(n - 1)/5]*5;
s += Floor[i/3];
s += 2 Floor[i/4]
];
Table[a[n], n, 1, 30]
Out[25]= 1, 1, 2, 4, 4, 5, 5, 6, 8, 8, 9, 9, 10, 12, 12, 13, 13, 14,
16, 16, 17, 17, 18, 20, 20, 21, 21, 22, 24, 24
The second sequence (ignoring 0 elemenet):
$$a_n=4left lfloorfracn-15right rfloor+left lfloorfraci2right rfloor-2left lfloorfraci4right rfloor+4left lfloorfraci5right rfloor$$
...where:
$$i=n-5left lfloorfracn-15right rfloor$$
Proof:
In[26]:= a[n_] := Module[i, s,
s = 4 Floor[(n - 1)/ 5];
i = n - Floor[(n - 1)/5]*5;
s += Floor[i/2];
s -= 2 Floor[i/4];
s += 4 Floor[i/5]
];
Table[a[n], n, 1, 30]
Out[27]= 0, 1, 1, 0, 4, 4, 5, 5, 4, 8, 8, 9, 9, 8, 12, 12, 13, 13,
12, 16, 16, 17, 17, 16, 20, 20, 21, 21, 20, 24
Done.
add a comment |Â
up vote
2
down vote
For the first series (ignoring 0 element):
$$a_n=4left lfloorfracn-15right rfloor+1+left lfloorfraci3right rfloor+2left lfloorfraci4right rfloor$$
...where:
$$i=n-5left lfloorfracn-15right rfloor$$
You can create one monster expression if you like it so. Proof:
In[24]:= a[n_] := Module[i, s,
s = 4 Floor[(n - 1)/ 5] + 1;
i = n - Floor[(n - 1)/5]*5;
s += Floor[i/3];
s += 2 Floor[i/4]
];
Table[a[n], n, 1, 30]
Out[25]= 1, 1, 2, 4, 4, 5, 5, 6, 8, 8, 9, 9, 10, 12, 12, 13, 13, 14,
16, 16, 17, 17, 18, 20, 20, 21, 21, 22, 24, 24
The second sequence (ignoring 0 elemenet):
$$a_n=4left lfloorfracn-15right rfloor+left lfloorfraci2right rfloor-2left lfloorfraci4right rfloor+4left lfloorfraci5right rfloor$$
...where:
$$i=n-5left lfloorfracn-15right rfloor$$
Proof:
In[26]:= a[n_] := Module[i, s,
s = 4 Floor[(n - 1)/ 5];
i = n - Floor[(n - 1)/5]*5;
s += Floor[i/2];
s -= 2 Floor[i/4];
s += 4 Floor[i/5]
];
Table[a[n], n, 1, 30]
Out[27]= 0, 1, 1, 0, 4, 4, 5, 5, 4, 8, 8, 9, 9, 8, 12, 12, 13, 13,
12, 16, 16, 17, 17, 16, 20, 20, 21, 21, 20, 24
Done.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
For the first series (ignoring 0 element):
$$a_n=4left lfloorfracn-15right rfloor+1+left lfloorfraci3right rfloor+2left lfloorfraci4right rfloor$$
...where:
$$i=n-5left lfloorfracn-15right rfloor$$
You can create one monster expression if you like it so. Proof:
In[24]:= a[n_] := Module[i, s,
s = 4 Floor[(n - 1)/ 5] + 1;
i = n - Floor[(n - 1)/5]*5;
s += Floor[i/3];
s += 2 Floor[i/4]
];
Table[a[n], n, 1, 30]
Out[25]= 1, 1, 2, 4, 4, 5, 5, 6, 8, 8, 9, 9, 10, 12, 12, 13, 13, 14,
16, 16, 17, 17, 18, 20, 20, 21, 21, 22, 24, 24
The second sequence (ignoring 0 elemenet):
$$a_n=4left lfloorfracn-15right rfloor+left lfloorfraci2right rfloor-2left lfloorfraci4right rfloor+4left lfloorfraci5right rfloor$$
...where:
$$i=n-5left lfloorfracn-15right rfloor$$
Proof:
In[26]:= a[n_] := Module[i, s,
s = 4 Floor[(n - 1)/ 5];
i = n - Floor[(n - 1)/5]*5;
s += Floor[i/2];
s -= 2 Floor[i/4];
s += 4 Floor[i/5]
];
Table[a[n], n, 1, 30]
Out[27]= 0, 1, 1, 0, 4, 4, 5, 5, 4, 8, 8, 9, 9, 8, 12, 12, 13, 13,
12, 16, 16, 17, 17, 16, 20, 20, 21, 21, 20, 24
Done.
For the first series (ignoring 0 element):
$$a_n=4left lfloorfracn-15right rfloor+1+left lfloorfraci3right rfloor+2left lfloorfraci4right rfloor$$
...where:
$$i=n-5left lfloorfracn-15right rfloor$$
You can create one monster expression if you like it so. Proof:
In[24]:= a[n_] := Module[i, s,
s = 4 Floor[(n - 1)/ 5] + 1;
i = n - Floor[(n - 1)/5]*5;
s += Floor[i/3];
s += 2 Floor[i/4]
];
Table[a[n], n, 1, 30]
Out[25]= 1, 1, 2, 4, 4, 5, 5, 6, 8, 8, 9, 9, 10, 12, 12, 13, 13, 14,
16, 16, 17, 17, 18, 20, 20, 21, 21, 22, 24, 24
The second sequence (ignoring 0 elemenet):
$$a_n=4left lfloorfracn-15right rfloor+left lfloorfraci2right rfloor-2left lfloorfraci4right rfloor+4left lfloorfraci5right rfloor$$
...where:
$$i=n-5left lfloorfracn-15right rfloor$$
Proof:
In[26]:= a[n_] := Module[i, s,
s = 4 Floor[(n - 1)/ 5];
i = n - Floor[(n - 1)/5]*5;
s += Floor[i/2];
s -= 2 Floor[i/4];
s += 4 Floor[i/5]
];
Table[a[n], n, 1, 30]
Out[27]= 0, 1, 1, 0, 4, 4, 5, 5, 4, 8, 8, 9, 9, 8, 12, 12, 13, 13,
12, 16, 16, 17, 17, 16, 20, 20, 21, 21, 20, 24
Done.
edited Jul 22 at 13:05
answered Jul 22 at 12:01


Oldboy
2,6101316
2,6101316
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2859147%2ffinding-the-floor-function-explicit-formula-for-a-sequence%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
Where did you come across the sequences?
– user202729
Jul 22 at 6:43
I can only see one sequence here. Where is the other
– Rakesh Bhatt
Jul 22 at 6:49
1
There are $2$, look closely and you'll see the word "and" squeezed in between them. or if you did notice that, then perhaps you didn't notice that they are different by a few terms
– john fowles
Jul 22 at 6:50
Could you describe the patterns somehow? Or at least give many more terms for each one...
– coffeemath
Jul 22 at 6:57
Some observations about the first sequence. A number seems to repeat two times when it is $0pmod4$ or $1pmod4.$ Moreover, a number that is $2pmod4$ appears once, and after that appearance, $2$ is added to that number.
– Flynn Rixona
Jul 22 at 7:01