login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117494 a(n) = number of m's, 1 <= m <= n, where GCD(m,n) is prime. 1
0, 1, 1, 1, 1, 3, 1, 2, 2, 5, 1, 4, 1, 7, 6, 4, 1, 8, 1, 6, 8, 11, 1, 8, 4, 13, 6, 8, 1, 14, 1, 8, 12, 17, 10, 10, 1, 19, 14, 12, 1, 20, 1, 12, 14, 23, 1, 16, 6, 24, 18, 14, 1, 24, 14, 16, 20, 29, 1, 20, 1, 31, 18, 16, 16, 32, 1, 18, 24, 34, 1, 20, 1, 37, 28, 20, 16, 38, 1, 24, 18, 41, 1, 28 (list; graph; refs; listen; history; internal format)
OFFSET

1,6

EXAMPLE

Of the positive integers <= 12, exactly four (2, 3, 9 and 10) have a GCD with 12 that is prime. (GCD(2,12) = 2, GCD(3,12) = 3, GCD(9,12) = 3, GCD(10,12) = 2)

So a(12) = 4.

MAPLE

a:=proc(n) local c, m: c:=0: for m from 1 to n do if isprime(gcd(m, n))=true then c:=c+1 else c:=c fi od: end: seq(a(n), n=1..100); - Emeric Deutsch (deutsch(AT)duke.poly.edu), Apr 01 2006

MATHEMATICA

f[n_] := Length@ Select[GCD[n, Range@n], PrimeQ@ # &]; Array[f, 84] - Robert G. Wilson v (rgwv(at)rgwv.com), Apr 06 2006

CROSSREFS

Sequence in context: A010280 A125266 A002016 * A201282 A057056 A016469

Adjacent sequences:  A117491 A117492 A117493 * A117495 A117496 A117497

KEYWORD

nonn

AUTHOR

Leroy Quet Mar 22 2006

EXTENSIONS

More terms from Emeric Deutsch (deutsch(AT)duke.poly.edu), Apr 01 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 09:00 EST 2012. Contains 205904 sequences.