login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109009 a(n) = gcd(n,5). 7
5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(n) = 1 + 4*[5|n], where [x|y] = 1 when x divides y, 0 otherwise.
a(n) = a(n-5).
Multiplicative with a(p^e, 5) = gcd(p^e, 5). - David W. Wilson, Jun 12 2005
From R. J. Mathar, Apr 04 2011: (Start)
Dirichlet g.f.: zeta(s)*(1+4/5^s).
G.f.: ( -5-x-x^2-x^3-x^4 ) / ( (x-1)*(1+x+x^2+x^3+x^4) ). (End)
a(n) = 4*floor(1/2*cos((2*n*Pi)/5)+1/2) + 1.
= 4*floor(((n-1) mod 5)/4) + 1. - Gary Detlefs, Dec 28 2011
MATHEMATICA
GCD[Range[0, 100], 5] (* or *) PadRight[{}, 120, {5, 1, 1, 1, 1}] (* Harvey P. Dale, Jun 29 2018 *)
PROG
(PARI) a(n)=gcd(n, 5) \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
Cf. A109004.
Sequence in context: A161685 A257461 A129398 * A060904 A351084 A135469
KEYWORD
nonn,easy,mult
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 18 21:02 EDT 2024. Contains 370951 sequences. (Running on oeis4.)