A145011 First differences of A007775.
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, 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, 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
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,1).
Programs
-
Haskell
a145011 n = a145011_list !! (n-1) a145011_list = zipWith (-) (tail a007775_list) a007775_list -- Reinhard Zumkeller, Jan 06 2013
-
Mathematica
Differences[Select[Range[400],GCD[#,30]==1&]] (* Harvey P. Dale, Dec 07 2011 *)
-
PARI
a(n)=[4,6,4,2,4,2][n%8+1] \\ Charles R Greathouse IV, Oct 20 2013
Formula
Period 8: repeat 6,4,2,4,2,4,6,2.
a(n) = 2*((abs(abs((n mod 8) - 3) - 1) mod 3) + 1). - Pieter Stadhouders, Mar 09 2010
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
Extensions
Edited by Omar E. Pol, Mar 02 2009
Offset corrected by Reinhard Zumkeller, Jan 06 2013
Comments