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

The number of positive integers <= n that are not strongly prime to n.
8

%I #8 Jun 28 2013 05:06:37

%S 0,0,2,3,4,4,6,5,6,7,9,5,10,7,10,11,12,6,14,7,14,15,16,5,18,13,17,13,

%T 20,7,24,9,18,19,22,15,28,10,22,19,28,9,32,9,26,27,30,5,34,17,33,25,

%U 32,7,38,23,36,29,34,5,46

%N The number of positive integers <= n that are not strongly prime to n.

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

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

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

%H Peter Luschny, <a href="http://www.oeis.org/wiki/User:Peter_Luschny/StrongCoprimality">Strong coprimality</a>.

%e a(11) = 11 - card({3,4,6,7,8,9}) = 5.

%p with(numtheory):

%p A181833 := n -> `if`(n=0,0,n-phi(n)+tau(n-1));

%p A181833a := n -> n - A181830(n);

%t a[n_] := Select[Range[n], Not[CoprimeQ[#, n] && !Divisible[n-1, #]] &] // Length; a[1] = 0; Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, Jun 28 2013 *)

%Y Cf. A181830, A181831, A181832, A181834, A181835, A181836, A051953.

%K nonn

%O 0,3

%A _Peter Luschny_, Nov 17 2010