login

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”).

A109013
a(n) = gcd(n,10).
6
10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 1
OFFSET
0,1
FORMULA
a(n) = 1 + [2|n] + 4*[5|n] + 4*[10|n], where [x|y] = 1 when x divides y, 0 otherwise.
a(n) = a(n-10).
Multiplicative with a(p^e, 10) = gcd(p^e, 10). - David W. Wilson, Jun 12 2005
G.f.: ( -10 - x - 2*x^2 - x^3 - 2*x^4 - 5*x^5 - 2*x^6 - x^7 - 2*x^8 - x^9 ) / ( (x-1)*(1+x)*(x^4 + x^3 + x^2 + x + 1)*(x^4 - x^3 + x^2 - x+1) ). - R. J. Mathar, Apr 04 2011
Dirichlet g.f.: zeta(s)*(1 + 1/2^s + 4/5^s + 4/10^s). - R. J. Mathar, Apr 04 2011
a(n) = ((n-1) mod 2 + 1)*(4*floor(((n-1) mod 5)/4) + 1). - Gary Detlefs, Dec 28 2011
MATHEMATICA
GCD[Range[0, 100], 10] (* Harvey P. Dale, Jul 11 2011 *)
CROSSREFS
Cf. A109004.
Sequence in context: A174921 A378838 A010180 * A343102 A213790 A240962
KEYWORD
nonn,easy,mult
AUTHOR
STATUS
approved