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.
%I A073811 #25 Jul 01 2022 05:26:54 %S A073811 1,1,1,2,1,2,1,3,2,2,1,3,1,2,1,4,1,4,1,3,2,2,1,4,2,2,3,3,1,2,1,5,1,2, %T A073811 1,6,1,2,2,4,1,4,1,3,2,2,1,5,2,4,1,3,1,6,2,4,2,2,1,3,1,2,3,6,1,2,1,3, %U A073811 1,2,1,8,1,2,2,3,1,4,1,5,4,2,1,6,1,2,1,4,1,4,1,3,2,2,1,6,1,4,2,6,1,2,1,4,2 %N A073811 Number of common divisors of n and phi(n). %C A073811 Where records occur: 1, 4, 8, 16, 32, 36, 72, 108, 144, 216, 432, 648, 864, ... - _David A. Corneth_, Oct 21 2017 %H A073811 Antti Karttunen, <a href="/A073811/b073811.txt">Table of n, a(n) for n = 1..16384</a> %F A073811 a(n) = Card[Intersection[D[n], D[A000010(n)]]]. %F A073811 a(n) = Sum_{d|n, d|A000010(n)} 1. - _Antti Karttunen_, Oct 21 2017 %F A073811 a(n) = A000005(A009195(n)). - _Antti Karttunen_, Oct 21 2017, after _David A. Corneth_'s PARI-program. %e A073811 For n = 24: phi(n) = 8, Intersection[{1,2,3,4,6,8,12,24},{1,2,4,8}] = {1,2,4,8}, so a(24) = 4. %t A073811 g1[x_] := Divisors[x] g2[x_] := Divisors[EulerPhi[x]] ncd[x_] := Length[Intersection[g1[x], g2[x]]] Table[ncd[w], {w, 1, 128}] %t A073811 Table[Length[Intersection[Divisors[n],Divisors[EulerPhi[n]]]],{n,110}] (* _Harvey P. Dale_, Oct 03 2013 *) %t A073811 a[n_] := DivisorSigma[0, GCD[n, EulerPhi[n]]]; Array[a, 100] (* _Amiram Eldar_, Jul 01 2022 *) %o A073811 (PARI) A073811(n) = sumdiv(eulerphi(n),d,!(n%d)); \\ _Antti Karttunen_, Oct 21 2017 %o A073811 (PARI) a(n) = numdiv(gcd(eulerphi(n), n)) \\ _David A. Corneth_, Oct 21 2017 %o A073811 (Scheme) %o A073811 ;; Implemented literally (naively) after the description. Either: %o A073811 (define (A073811 n) (length (filter (lambda (d) (zero? (modulo n d))) (divisors (A000010 n))))) %o A073811 ;; Or: %o A073811 (define (A073811 n) (let ((phn (A000010 n))) (length (filter (lambda (d) (zero? (modulo phn d))) (divisors n))))) %o A073811 (define (divisors n) (cons 1 (proper-divisors n))) ;; This can be also memoized with definec. %o A073811 (define (proper-divisors n) (let loop ((k n) (divs (list))) (cond ((= 1 k) divs) ((zero? (modulo n k)) (loop (- k 1) (cons k divs))) (else (loop (- k 1) divs))))) %o A073811 ;; _Antti Karttunen_, Oct 21 2017 %Y A073811 Cf. A000005, A000010, A009195, A073802, A073808, A073809, A073810. %K A073811 nonn %O A073811 1,4 %A A073811 _Labos Elemer_, Aug 13 2002