|
Search: id:A059851
|
|
|
| A059851 |
|
a(n) = n - [n/2] + [n/3] - [n/4] + ... (this is a finite sum). |
|
+0 5
|
|
| 0, 1, 1, 3, 2, 4, 4, 6, 4, 7, 7, 9, 7, 9, 9, 13, 10, 12, 12, 14, 12, 16, 16, 18, 14, 17, 17, 21, 19, 21, 21, 23, 19, 23, 23, 27, 24, 26, 26, 30, 26, 28, 28, 30, 28, 34, 34, 36, 30, 33, 33, 37, 35, 37, 37, 41, 37, 41, 41, 43, 39, 41, 41, 47, 42, 46, 46, 48, 46, 50, 50, 52, 46, 48, 48
(list; graph; listen)
|
|
|
OFFSET
|
0,4
|
|
|
COMMENT
|
As n goes to infinity we have the asymptotic formula: a(n) ~ n * ln(2)
|
|
LINKS
|
T. D. Noe, Table of n, a(n) for n=0..10000
Leroy Quet, Home Page (listed in lieu of email address)
|
|
FORMULA
|
a(n) = A006218(n)-2*A006218(floor(n/2)). G.f.: 1/(1-x)*Sum_{n>=1} x^n/(1+x^n). Partial sums of A048272. - Vladeta Jovovic (vladeta(AT)eunet.rs), Oct 15 2002
a(n) = sum{n/2<k<=n} d(k) - sum{1<=k<=n/2} d(k), where d(k) = A000005(k). Also, a(n) = number of terms among {floor(n/k)}, 1<=k<=n, which are odd. - Leroy Quet Jan 19 2006
|
|
EXAMPLE
|
a(5) = 4 because : [5] - [5/2] + [5/3] - [5/4] + [5/5] - [5/6] + ... = 5 - 2 + 1 - 1 + 1 - 0 + 0 - 0 + ... = 4
|
|
MAPLE
|
for n from 0 to 200 do printf(`%d, `, sum((-1)^(i+1)*floor(n/i), i=1..n)) od:
{ for (n=0, 10000, s=1; d=2; a=n; while ((f=floor(n/d)) > 0, a-=s*f; s=-s; d++); write("b059851.txt", n, " ", a); ) } [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Jun 29 2009]
|
|
PROGRAM
|
(PARI) { for (n=0, 10000, s=1; d=2; a=n; while ((f=floor(n/d)) > 0, a-=s*f; s=-s; d++); write("b059851.txt", n, " ", a); ) } [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Jun 29 2009]
|
|
CROSSREFS
|
Cf. A075997.
Partial sums of A048272.
Sequence in context: A069745 A112199 A145815 this_sequence A047993 A033177 A147604
Adjacent sequences: A059848 A059849 A059850 this_sequence A059852 A059853 A059854
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
Avi Peretz (njk(AT)netvision.net.il), Feb 27 2001
|
|
EXTENSIONS
|
More terms from James A. Sellers (sellersj(AT)math.psu.edu) and Larry Reeves (larryr(AT)acm.org), Feb 27 2001.
|
|
|
Search completed in 0.003 seconds
|