|
|
A081147
|
|
First differences of A022839.
|
|
3
|
|
|
2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Differences of Beatty sequence for square root of 5.
Let S(0) = 2; obtain S(k) from S(k-1) by applying 2 -> 2223, 3 -> 22223; sequence is S(0), S(1), S(2), ...
|
|
LINKS
|
|
|
FORMULA
|
a(n) = floor((n+1)*sqrt(5)) - floor(n*sqrt(5)).
|
|
MATHEMATICA
|
Flatten[ Table[ Nest[ Flatten[ # /. {2 -> {2, 2, 2, 3}, 3 -> {2, 2, 2, 2, 3}}] &, {2}, n], {n, 0, 4}]] (* Robert G. Wilson v, May 07 2005 *)
Differences[Table[Floor[n Sqrt[5]], {n, 0, 110}]] (* Harvey P. Dale, May 05 2019 *)
|
|
PROG
|
(PARI) a(n)=floor((n+1)*sqrt(5))-floor(n*sqrt(5))
(Magma)
A081147:= func< n | Floor((n+1)*Sqrt(5)) - Floor(n*Sqrt(5)) >;
(SageMath)
def A081147(n): return floor((n+1)*sqrt(5)) - floor(n*sqrt(5))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|