cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A181834 The number of primes <= n that are strongly prime to n.

This page as a plain text file.
%I A181834 #8 Jul 23 2013 06:23:18
%S A181834 0,0,0,0,0,1,0,1,2,2,1,2,2,3,3,2,3,5,4,5,5,4,4,6,6,6,6,6,6,7,6,7,9,8,
%T A181834 7,7,7,9,9,8,8,10,9,10,11,10,10,12,12,12,12,11,11,13,13,12,12,12,12,
%U A181834 14,13,14,15,14,15,15,13,15,16,15,14,16,17
%N A181834 The number of primes <= n that are strongly prime to n.
%C A181834 k is strongly prime to n iff k is relatively prime to n and k does not divide n-1.
%H A181834 Peter Luschny, <a href="http://www.oeis.org/wiki/User:Peter_Luschny/StrongCoprimality">Strong coprimality</a>.
%e A181834 a(11) = card(primes in {3, 4, 6, 7, 8, 9}) = card({3, 7}) = 2.
%p A181834 with(numtheory):
%p A181834 Primes := n -> select(k->isprime(k),{$1..n}):
%p A181834 StrongCoprimes := n -> select(k->igcd(k,n)=1,{$1..n}) minus divisors(n-1):
%p A181834 StrongCoprimePrimes := n -> Primes(n) intersect StrongCoprimes(n):
%p A181834 A181834 := n -> nops(StrongCoprimePrimes(n)):
%t A181834 strongCoprimeQ[k_, n_] := PrimeQ[k] && CoprimeQ[n, k] && !Divisible[n-1, k]; a[n_] := Select[Range[n], strongCoprimeQ[#, n]&] // Length; Table[a[n], {n, 0, 72}] (* _Jean-François Alcover_, Jul 23 2013 *)
%Y A181834 Cf. A181830, A181831, A181832, A181833, A181835, A181836, A048865.
%K A181834 nonn
%O A181834 0,9
%A A181834 _Peter Luschny_, Nov 17 2010