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

 

Logo

The OEIS Foundation is grateful to everyone who made a donation during our Annual Appeal.     Visit the new and spectacular Pictures from the OEIS page!

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181830 The number of positive integers <= n that are strongly prime to n. 10
0, 1, 0, 0, 0, 1, 0, 2, 2, 2, 1, 6, 2, 6, 4, 4, 4, 11, 4, 12, 6, 6, 6, 18, 6, 12, 9, 14, 8, 22, 6, 22, 14, 14, 12, 20, 8, 27, 16, 20, 12, 32, 10, 34, 18, 18, 16, 42, 14, 32, 17, 26, 20, 46, 16, 32, 20, 28, 24, 54, 14, 48, 28, 32, 26, 41, 16 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,8

COMMENTS

k is strongly prime to n iff k is relatively prime to n and k does not divide n-1.

a(n) = phi(n) - tau(n-1) if n > 0 and a(0) = 0.

Here phi(n) = A000010(n) and tau(n) = A000005(n).

LINKS

Table of n, a(n) for n=0..66.

Peter Luschny, Strong coprimality.

EXAMPLE

a(11) = card({1,2,3,4,5,6,7,8,9,10} - {1,2,5,10}) = card({3,4,6,7,8,9}) = 6.

MAPLE

with(numtheory):

A181830 := n -> `if`(n=0, 0, phi(n)-tau(n-1)):

StrongCoprimes := n -> select(k->igcd(k, n)=1, {$1..n}) minus divisors(n-1):

A181830a := n -> nops(StrongCoprimes(n)):

MATHEMATICA

a[0]=0; a[1]=1; a[n_ /; n > 1] := Select[Range[n], CoprimeQ[#, n] && !Divisible[n-1, #] &] // Length; Table[a[n], {n, 0, 66}] (* Jean-Fran├žois Alcover, Jun 26 2013 *)

PROG

(PARI) a(n)=if(n, eulerphi(n)-numdiv(n), 0) \\ Charles R Greathouse IV, Jun 26 2013

CROSSREFS

Cf. A181831, A181832, A181833, A181834, A181835, A181836, A000010, A000005.

Sequence in context: A109978 A114293 A255399 * A086612 A128207 A180958

Adjacent sequences:  A181827 A181828 A181829 * A181831 A181832 A181833

KEYWORD

nonn,easy

AUTHOR

Peter Luschny, Nov 17 2010

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified February 13 10:16 EST 2016. Contains 268262 sequences.