login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081946 a(n) = Sum_{i=1..n} floor(r*floor(i/r)), where r=sqrt(2). 1

%I

%S 0,1,3,5,9,14,19,26,34,43,52,63,75,87,101,116,132,148,166,185,204,225,

%T 247,269,293,318,344,370,398,427,456,487,519,552,585,620,656,692,730,

%U 769,808,849,891,934,977,1022,1068,1114,1162,1211,1261,1311,1363,1416

%N a(n) = Sum_{i=1..n} floor(r*floor(i/r)), where r=sqrt(2).

%C More generally if r is irrational 1 < r < 2 then Sum_{i=1..n} floor(r*floor(i/r)) = n*(n+1)/2 - floor((1-1/r)*n); if r > 2, there is the asymptotic formula Sum_{i=1..n} floor(r*floor(i/r)) = n*(n+1)/2 - ceiling(r)*(1-floor(r)/(2*r))*n + O(1).

%H G. C. Greubel, <a href="/A081946/b081946.txt">Table of n, a(n) for n = 1..5000</a>

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

%t Table[Sum[Floor[Sqrt[2] Floor[k/Sqrt[2]]], {k, n}], {n, 50}] (* _G. C. Greubel_, Oct 01 2018 *)

%o (PARI) a(n) = sum(i=1,n,floor(sqrt(2)*floor(i/sqrt(2)))); \\ _Michel Marcus_, Dec 04 2013

%o (MAGMA) [(&+[Floor(Sqrt(2)*Floor(k/Sqrt(2))): k in [1..n]]): n in [1..50]]; // _G. C. Greubel_, Oct 01 2018

%K nonn

%O 1,3

%A _Benoit Cloitre_, Jun 13 2003

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 15 21:52 EDT 2021. Contains 345053 sequences. (Running on oeis4.)