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 A194597 #21 Sep 08 2022 08:45:58 %S A194597 1,6,6,1,9,3,1,3,9,1,6,6,1,9,3,1,3,9,1,6,6,1,9,3,1,3,9,1,6,6,1,9,3,1, %T A194597 3,9,1,6,6,1,9,3,1,3,9,1,6,6,1,9,3,1,3,9,1,6,6,1,9,3,1,3,9,1,6,6,1,9, %U A194597 3,1,3,9,1,6,6,1,9,3,1,3,9,1,6,6,1,9,3 %N A194597 Digital roots of the nonzero hexagonal numbers. %C A194597 This is a periodic sequence with period 9 and cycle 1,6,6,1,9,3,1,3,9 - which are also the coefficients of x in the numerator of the generating function. %C A194597 a(n) = A010888(A000384(n)). - _Reinhard Zumkeller_, Jan 09 2013 %F A194597 a(n) = a(n-9), and as the sum of the terms contained in each cycle is 39 they also satisfy the eighth-order inhomogeneous recurrence a(n) = 39 - a(n-1) - a(n-2) - a(n-3) - a(n-4) - a(n-5) - a(n-6) - a(n-7) - a(n-8). %F A194597 a(n) = 2 + cos(2/9*(n-5)*Pi) + cos(4/9*(n-5)*Pi) + cos(2/3*(n-5)*Pi) + cos(8/9*(n-5)*Pi) + cos(4/3*(n-5)*Pi) + cos(14/9*(n-5)*Pi) + cos(16/9*(n-5)*Pi) + cos((2 n Pi)/9) + cos((4 n Pi)/9) + cos((2 n Pi)/3) + cos((8 n Pi)/9) + cos((10 n Pi)/9) + cos((4 n Pi)/3) + cos((14 n Pi)/9) + cos((16 n Pi)/9) + cos(2/9 (2+5 n) Pi) + (8n + 5n^2 + 7n^3 + n^5 + n^7 + 6n^8) mod 9. %F A194597 G.f.: x(1+6x+6x^2+x^3+9x^4+3x^5+x^6+3x^7+9x^8)/((1-x)(1+x+x^2)(1+x^3+x^6)). %e A194597 The sixth nonzero hexagonal number is A000384(6)=66. As 6+6=12 and 1+2=3, this has digital root 3 and so a(6)=3. %t A194597 DigitalRoot[n_]:=FixedPoint[Plus@@IntegerDigits[#]&,n];DigitalRoot[ # (2#-1)]&/@Range[63] %t A194597 CoefficientList[Series[(1 + 6 x + 6 x^2 + x^3 + 9 x^4 + 3 x^5 + x^6 + 3 x^7 + 9 x^8)/((1 - x) (1 + x + x^2) (1 + x^3 + x^6)), {x, 0, 100}], x] (* _Vincenzo Librandi_, Aug 11 2015 *) %t A194597 PadRight[{},120,{1,6,6,1,9,3,1,3,9}] (* _Harvey P. Dale_, Oct 02 2018 *) %o A194597 (Haskell) %o A194597 a194597 n = [1,6,6,1,9,3,1,3,9] !! a010878 (n-1) %o A194597 -- _Reinhard Zumkeller_, Jan 09 2013 %o A194597 (Magma) &cat[ [1,6,6,1,9,3,1,3,9]: k in [1..10] ]; // _Vincenzo Librandi_, Aug 11 2015 %Y A194597 Cf. A000384. %Y A194597 Cf. A010878, A010888. %K A194597 nonn,easy,base %O A194597 1,2 %A A194597 _Ant King_, Aug 30 2011