login
a(n) = floor(n/2) mod floor(n/3).
1

%I #18 Apr 06 2018 22:36:49

%S 0,0,0,1,1,0,1,2,2,2,2,3,2,3,3,3,3,4,3,4,4,4,4,5,4,5,5,5,5,6,5,6,6,6,

%T 6,7,6,7,7,7,7,8,7,8,8,8,8,9,8,9,9,9,9,10,9,10,10,10,10,11,10,11,11,

%U 11,11,12,11,12,12,12,12,13,12,13,13,13,13,14,13,14,14,14,14,15,14,15,15

%N a(n) = floor(n/2) mod floor(n/3).

%H Antti Karttunen, <a href="/A010764/b010764.txt">Table of n, a(n) for n = 3..10000</a>

%F G.f.: x^6*(1 + x - x^2 - x^3 + x^4 + 2*x^5 - 2*x^7)/((1 - x^2)*(1 - x^3)).

%F a(n) = A008615(n) if n>8. - _Michael Somos_, Feb 06 2003

%F a(n) = A004526(n) mod A002264(n). - _Antti Karttunen_, Aug 23 2017

%e G.f. = x^6 + x^7 + x^9 + 2*x^10 + 2*x^11 + 2*x^12 + 2*x^13 + 3*x^14 + ...

%p [ seq(floor(n/2) mod floor(n/3), n=3..100) ];

%t Table[Mod[Floor[n/2],Floor[n/3]],{n,3,100}] (* _Harvey P. Dale_, Apr 06 2018 *)

%o (PARI) {a(n) = if( n<3, 0, (n\2) % (n\3))}; /* _Michael Somos_, Feb 06 2003 */

%Y Cf. A002264, A004526, A008615.

%K nonn,easy

%O 3,8

%A _N. J. A. Sloane_, _Simon Plouffe_