OFFSET
0,4
COMMENTS
The cyclic pattern (and numerator of the gf) is computed using Euclid's algorithm for GCD.
For n >= 2, a(n) is the number of different integers that can be written as floor(k^2/n) for k = 1, 2, 3, ..., n-1. Generalization of the 1st problem proposed during the 15th Balkan Mathematical Olympiad in 1998 where the question was asked for n = 1998 with a(1998) = 1498. - Bernard Schott, Apr 22 2022
For n > 1, a(n) is also the Hadwiger number of the (n+1)-cycle complement graph (up to at least n = 16). - Eric W. Weisstein, Mar 10 2025
REFERENCES
N. Dershowitz and E. M. Reingold, Calendrical Calculations, Cambridge University Press, 1997.
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, NY, 1994.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Balkan Mathematical Olympiad, Problem 1, 15th Balkan Mathematical Olympiad 1998.
Eric Weisstein's World of Mathematics, Cycle Complement Graph.
Eric Weisstein's World of Mathematics, Hadwiger Number.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
G.f.: (1+x+x^2)*x^2/((1-x)*(1-x^4)). - Bruce Corrigan (scentman(AT)myfamily.com), Jul 03 2002
For all m>=0 a(4m)=0 mod 3; a(4m+1)=0 mod 3; a(4m+2)= 1 mod 3; a(4m+3) = 2 mod 3
a(n) = n-1 - A002265(n-1) = ( A007310(n) + A057077(n+1) )/4 for n>0. a(n) = a(n-1)+a(n-4)-a(n-5) for n>4. - Bruno Berselli, Jan 28 2011
a(n) = 1/8*(6*n + 2*cos((Pi*n)/2) + cos(Pi*n) - 2*sin((Pi*n)/2) - 3). - Ilya Gutkovskiy, Sep 18 2015
a(4n) = a(4n+1). - Altug Alkan, Sep 26 2015
Sum_{n>=2} (-1)^n/a(n) = Pi/(3*sqrt(3)) (A073010). - Amiram Eldar, Sep 29 2022
MATHEMATICA
Table[Floor[3 n/4], {n, 0, 100}] (* Vladimir Joseph Stephan Orlovsky, Jan 28 2012 *)
Floor[3 Range[0, 20]/4] (* Eric W. Weisstein, Mar 10 2025 *)
LinearRecurrence[{1, 0, 0, 1, -1}, {0, 1, 2, 3, 3}, {0, 20}] (* Eric W. Weisstein, Mar 10 2025 *)
CoefficientList[Series[x^2 (1 + x + x^2)/(1 - x - x^4 + x^5), {x, 0, 20}], x] (* Eric W. Weisstein, Mar 10 2025 *)
PROG
(Magma) [Floor(3*n/4): n in [0..90]]; // Vincenzo Librandi, Feb 12 2012
(PARI) a(n)=3*n\4 \\ Charles R Greathouse IV, Sep 02 2015
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
STATUS
approved