This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A203648 #80 Sep 13 2024 18:22:29 %S A203648 1,2,9,4,5,18,7,8,27,10,11,36,13,14,45,16,17,54,19,20,63,22,23,72,25, %T A203648 26,81,28,29,90,31,32,99,34,35,108,37,38,117,40,41,126,43,44,135,46, %U A203648 47,144,49,50,153,52,53,162,55,56,171,58,59,180,61,62,189,64,65 %N A203648 a(n) = (1/4) * period of repeating sequence {S(j) mod 2n}, where S(j) is the sum of the first j squares. %C A203648 This sequence lists the periods of the sum of the first n squares mod 2*n. In most cases, (Sum_{k=1..n} k^(2*j)) mod 2*n will produce the same sequence. The repeating sequences appear to always end in 2 zeros. %C A203648 (Sum_{k=1..n} k^j) mod 2 has period 4 repeating [1,1,0,0] for any j. %C A203648 It appears that a(n) is the number of n-colorings of the trefoil knot. - _Tsuyoshi Miezaki_, May 01 2022 %H A203648 Vincenzo Librandi, <a href="/A203648/b203648.txt">Table of n, a(n) for n = 1..1000</a> %H A203648 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,2,0,0,-1). %F A203648 a(n) = 3*n if n mod 3 = 0, otherwise n. %F A203648 a(n) = n*(1 + 2*floor(((n+2) mod 3)/2)). %F A203648 From _Bruno Berselli_, Jan 04 2012: (Start) %F A203648 G.f.: x*(1 + 2*x + 9*x^2 + 2*x^3 + x^4)/((1-x)^2*(1 + x + x^2)^2). %F A203648 a(n) = 2*n + 2*n*((-1)^(-2*n/3) + (-1)^(2*n/3)-1/2)/3. %F A203648 a(n) = -a(-n) = 2*a(n-3) - a(n-6). (End) %F A203648 a(n) = numerator(3n/((3 + 2*(-1 + n))*(1 + n))). - _Andres Cicuttin_, Jan 12 2017 %F A203648 a(n) is multiplicative with a(p^e) = p^(e+1) if p = 3, a(p^e) = p^e otherwise. - _Michael Somos_, Jan 18 2017 %F A203648 a(n) = n*(5 + 4*cos((2*Pi*n)/3)) / 3. - _Colin Barker_, Mar 06 2017 %F A203648 From _Amiram Eldar_, Dec 27 2022: (Start) %F A203648 Dirichlet g.f.: zeta(s-1)*(3^(-s)*(6 + 3^s)). %F A203648 Sum_{k=1..n} a(k) ~ (5/6) * n^2. (End) %F A203648 a(n) = n*A109007(n). - _Lechoslaw Ratajczak_, Aug 16 2023 %F A203648 Sum_{n>=1} (-1)^(n+1)/a(n) = 7*log(2)/9. - _Amiram Eldar_, Aug 21 2023 %e A203648 G.f. = x + 2*x^2 + 9*x^3 + 4*x^4 + 5*x^5 + 18*x^6 + 7*x^7 + 8*x^8 + 27*x^9 + ... %e A203648 (Sum_{k=1..n} k^2) mod 4 has period 8 repeating [1,1,2,2,3,3,0,0] so a(2) = 2. %p A203648 seq(n*(1+floor(((n+2) mod 3)/2))), n= 1..57); %t A203648 CoefficientList[Series[(1+2*x+9*x^2+2*x^3+x^4)/((1-x)^2*(1+x+x^2)^2),{x,0,60}],x] (* _Vincenzo Librandi_, Mar 19 2012 *) %t A203648 Table[n (1 + 2 Floor[Mod[n + 2, 3]/2]), {n, 57}] (* _Michael De Vlieger_, Jan 14 2017 *) %t A203648 LinearRecurrence[{0,0,2,0,0,-1},{1,2,9,4,5,18},70] (* _Harvey P. Dale_, Sep 13 2024 *) %o A203648 (Magma) [n*(1+2*Floor(((n+2) mod 3)/2)): n in [1..60]]; // _Vincenzo Librandi_, Mar 19 2012 %o A203648 (PARI) {a(n) = if( n%3, n, 3*n)}; /* _Michael Somos_, Jan 18 2017 */ %Y A203648 Cf. A008585 (3*n), A109007. %K A203648 nonn,easy,mult %O A203648 1,2 %A A203648 _Gary Detlefs_, Jan 04 2012