Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #33 Mar 08 2024 01:12:14
%S 6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,
%T 2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,
%U 2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6,4,2,4,2,4,6,2
%N First differences of A007775.
%C Also the first differences of A084968 divided by 7. - _Antti Karttunen_, May 01 2015
%H Reinhard Zumkeller, <a href="/A145011/b145011.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,1).
%F Period 8: repeat 6,4,2,4,2,4,6,2.
%F a(n) = 2*((abs(abs((n mod 8) - 3) - 1) mod 3) + 1). - _Pieter Stadhouders_, Mar 09 2010
%F G.f.: x*(-2*x^7 - 6*x^6 - 4*x^5 - 2*x^4 - 4*x^3 - 2*x^2 - 4*x - 6)/(x^8 - 1). - _Chai Wah Wu_, Feb 16 2021
%t Differences[Select[Range[400],GCD[#,30]==1&]] (* _Harvey P. Dale_, Dec 07 2011 *)
%o (Haskell)
%o a145011 n = a145011_list !! (n-1)
%o a145011_list = zipWith (-) (tail a007775_list) a007775_list
%o -- _Reinhard Zumkeller_, Jan 06 2013
%o (PARI) a(n)=[4,6,4,2,4,2][n%8+1] \\ _Charles R Greathouse IV_, Oct 20 2013
%Y Cf. A007775, A084968.
%Y Multiplied by 7: row 4 of A257251.
%K nonn,easy
%O 1,1
%A _Ki Punches_, Feb 25 2009
%E Edited by _Omar E. Pol_, Mar 02 2009
%E Offset corrected by _Reinhard Zumkeller_, Jan 06 2013