%I #23 Mar 16 2024 20:40:09
%S 0,1,7,34,55,235,286,403,469,874,970,1177,1288,1918,2059,2356,2512,
%T 3367,3553,3940,4141,5221,5452,5929,6175,7480,7756,8323,8614,10144,
%U 10465,11122,11458,13213,13579,14326,14707,16687,17098,17935,18361,20566,21022,21949
%N Heptagonal numbers for which the digital root is also a heptagonal number.
%H Harvey P. Dale, <a href="/A117663/b117663.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,2,-2,0,0,-1,1).
%F G.f.: -x^2*(46*x^8+24*x^7+63*x^6+39*x^5+178*x^4+21*x^3+27*x^2+6*x+1) / ((x-1)^3*(x+1)^2*(x^2+1)^2). - _Colin Barker_, Jan 17 2014
%t drhQ[n_]:=MemberQ[{0,1,7},NestWhile[Total[IntegerDigits[#]]&,n,#>9&]]; Select[ PolygonalNumber[ 7,Range[100]],drhQ] (* _Harvey P. Dale_, Mar 03 2024 *)
%Y Cf. A000566, A010888.
%K nonn,base,easy
%O 1,3
%A Luc Stevens (lms022(AT)yahoo.com), Apr 11 2006
%E a(1)=0 inserted by _Alois P. Heinz_, Mar 16 2024