login
Numbers that are congruent to {1, 2, 6} mod 8.
1

%I #19 Sep 08 2022 08:44:57

%S 1,2,6,9,10,14,17,18,22,25,26,30,33,34,38,41,42,46,49,50,54,57,58,62,

%T 65,66,70,73,74,78,81,82,86,89,90,94,97,98,102,105,106,110,113,114,

%U 118,121,122,126,129,130,134,137,138,142,145,146,150,153,154,158

%N Numbers that are congruent to {1, 2, 6} mod 8.

%C Numbers n such that the determinant of the character table of the cyclic group C_n is an integer (for every n this determinant has degree at most 2 over the rationals Q). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 16 2001

%H Vincenzo Librandi, <a href="/A047396/b047396.txt">Table of n, a(n) for n = 1..3000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).

%F G.f.: x*(1+x+4*x^2+2*x^3)/((1+x+x^2)*(x-1)^2). - _R. J. Mathar_, Dec 05 2011

%F a(n) = a(n-1) + a(n-3) - a(n-4) for n>4, with a(1)=1, a(2)=2, a(3)=6, a(4)=9. - _Harvey P. Dale_, Sep 30 2012

%F From _Wesley Ivan Hurt_, Jun 09 2016: (Start)

%F a(n) = (24*n-21+3*cos(2*n*Pi/3)+5*sqrt(3)*sin(2*n*Pi/3))/9.

%F a(3k) = 8k-2, a(3k-1) = 8k-6, a(3k-2) = 8k-7. (End)

%p A047396:=n->(24*n-21+3*cos(2*n*Pi/3)+5*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047396(n), n=1..100); # _Wesley Ivan Hurt_, Jun 09 2016

%t Flatten[#+{1,2,6}&/@(8*Range[0,20])] (* or *) LinearRecurrence[ {1,0,1,-1}, {1,2,6,9}, 80] (* _Harvey P. Dale_, Sep 30 2012 *)

%o (Magma) [n : n in [0..150] | n mod 8 in [1, 2, 6]]; // _Wesley Ivan Hurt_, Jun 09 2016

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_