login
A194825
Digital roots of the nonzero 9-gonal (nonagonal) numbers.
0
1, 9, 6, 1, 3, 3, 1, 6, 9, 1, 9, 6, 1, 3, 3, 1, 6, 9, 1, 9, 6, 1, 3, 3, 1, 6, 9, 1, 9, 6, 1, 3, 3, 1, 6, 9, 1, 9, 6, 1, 3, 3, 1, 6, 9, 1, 9, 6, 1, 3, 3, 1, 6, 9, 1, 9, 6, 1, 3, 3, 1, 6, 9, 1, 9, 6, 1, 3, 3, 1, 6, 9, 1, 9, 6, 1, 3, 3, 1, 6, 9, 1, 9, 6, 1, 3
OFFSET
1,2
COMMENTS
This is a periodic sequence with period 9 and cycle 1,9,6,1,3,3,1,6,9, which are also the coefficients of x in the numerator of the generating function.
FORMULA
a(n) = a(n-9).
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).
a(n) = 2*(1+cos(2*n*Pi/9)+cos(2*n*Pi/3)+cos(4*n*Pi/9)+cos(8*n*Pi/9)+cos(4*(n-2)*Pi/9)+cos(2*(n-2)*Pi/3)+cos(8*(n-2)*Pi/9))+cos(2*(n-2)*Pi/9)+cos(4*(4*n+1)*Pi/9) + mod(8*n+5*n^2+8*n^3+5*n^4+8*n^5+2*n^6+5*n^7+5*n^8,9).
G.f.: x*(1+9*x+6*x^2+x^3+3*x^4+3*x^5+x^6+6*x^7+9*x^8)/((1-x)*(1+x+x^2)*(1+x^3+x^6)).
a(n) = A010888(A001106(n)). - Michel Marcus, Aug 10 2015
EXAMPLE
The sixth nonzero 9-gonal (nonagonal) number is A001106(6)=111. As 1+1+1=3, this has digital root 3 and so a(6)=3.
MATHEMATICA
DigitalRoot[n_]:=FixedPoint[Plus@@IntegerDigits[#]&, n]; Table[DigitalRoot[n*(7*n-5)/2], {n, 100}]
dr[n_]:=FixedPoint[Total[IntegerDigits[#]]&, n]; dr/@PolygonalNumber[ 9, Range[ 90]] (* Requires Mathematica version 10 or later *) (* or *) PadRight[{}, 90, {1, 9, 6, 1, 3, 3, 1, 6, 9}] (* Harvey P. Dale, Jun 26 2021 *)
PROG
(PARI) a(n)=n*(7*n-5)/2%9 \\ Charles R Greathouse IV, Sep 15 2013
CROSSREFS
Sequence in context: A075567 A019883 A085574 * A092732 A342680 A176532
KEYWORD
nonn,easy,base
AUTHOR
Ant King, Sep 03 2011
STATUS
approved