|
|
A096386
|
|
Number of numbers <= n which are divisible by 2 or 3.
|
|
0
|
|
|
0, 0, 1, 2, 3, 3, 4, 4, 5, 6, 7, 7, 8, 8, 9, 10, 11, 11, 12, 12, 13, 14, 15, 15, 16, 16, 17, 18, 19, 19, 20, 20, 21, 22, 23, 23, 24, 24, 25, 26, 27, 27, 28, 28, 29, 30, 31, 31, 32, 32, 33, 34, 35, 35, 36, 36, 37, 38, 39, 39, 40, 40, 41, 42, 43, 43, 44, 44, 45, 46, 47, 47, 48, 48
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
First differences are 6-periodic.
|
|
REFERENCES
|
S. Ramanujan, Question 723, Collected Papers of Srinivasa Ramanujan, p. 332, Ed. G. H. Hardy et al., AMS Chelsea 2000.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = [n/2] + [(n+3)/6] = [n/3] + [(n+2)/6] + [(n+4)/6].
G.f.: x^2*(1+x+x^2+x^4)/((1-x)*(1-x^6)).
a(-n) = -a(n-1)-1.
a(n) = 4 + a(n-6).
|
|
MATHEMATICA
|
CoefficientList[Series[x^2 (1 + x + x^2 + x^4)/((1 - x) (1 - x^6)), {x, 0, 73}], x] (* Michael De Vlieger, Apr 13 2016 *)
LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {0, 0, 1, 2, 3, 3, 4}, 80] (* Harvey P. Dale, Jul 04 2016 *)
|
|
PROG
|
(PARI) a(n) = floor(n/2) + floor((n+3)/6)
(PARI) a(n)=n\2+(n+3)\6
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|