login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081147 First differences of A022839. 3

%I #21 Jan 16 2024 06:56:31

%S 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,

%T 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,

%U 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

%N First differences of A022839.

%C Differences of Beatty sequence for square root of 5.

%C 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), ...

%H G. C. Greubel, <a href="/A081147/b081147.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = floor((n+1)*sqrt(5)) - floor(n*sqrt(5)).

%t 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 *)

%t Differences[Table[Floor[n Sqrt[5]],{n,0,110}]] (* _Harvey P. Dale_, May 05 2019 *)

%o (PARI) a(n)=floor((n+1)*sqrt(5))-floor(n*sqrt(5))

%o (Magma)

%o A081147:= func< n | Floor((n+1)*Sqrt(5)) - Floor(n*Sqrt(5)) >;

%o [A081147(n): n in [0..120]]; // _G. C. Greubel_, Jan 15 2024

%o (SageMath)

%o def A081147(n): return floor((n+1)*sqrt(5)) - floor(n*sqrt(5))

%o [A081147(n) for n in range(121)] # _G. C. Greubel_, Jan 15 2024

%Y Cf. A022839, A081168.

%K nonn

%O 0,1

%A _Benoit Cloitre_, Apr 16 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 11 23:39 EDT 2024. Contains 374237 sequences. (Running on oeis4.)