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.

A070820 Difference between n-th prime and the value of commutator[phi,gpf] = commutator[A000010, A006530] at the same prime argument.

This page as a plain text file.
%I A070820 #15 Jan 04 2017 07:48:24
%S A070820 2,3,3,4,6,4,3,4,12,8,6,4,6,8,24,14,30,6,12,8,4,14,42,12,4,6,18,54,4,
%T A070820 8,8,14,18,24,38,6,14,4,84,44,90,6,20,4,8,12,8,38,114,20,30,18,6,6,3,
%U A070820 132,68,6,24,8,48,74,18,32,14,80,12,8,174,30,12,180,62,32,8,192,98,12,6,18
%N A070820 Difference between n-th prime and the value of commutator[phi,gpf] = commutator[A000010, A006530] at the same prime argument.
%H A070820 Charles R Greathouse IV, <a href="/A070820/b070820.txt">Table of n, a(n) for n = 1..10000</a>
%F A070820 a(n) = A000040(n) - A070812(A000040(n)) = prime(n) - A070819(n); odd differences (=3) appear only at Fermat primes, i.e., at prime indices of n = {2, 3, 7, 55, 6543}. a(1) = 2 - 0 by convention.
%e A070820 For n=100: prime(100) = 541, phi(541) = 540, gpf(540) = 5, gpf(541) = 541, phi(541) = 540, A070819(100) = 535, a(100) = A070820(100) = 541 - 535.
%t A070820 pf[x_] := Part[Reverse[Flatten[FactorInteger[x]]], 2] f[x_] := EulerPhi[pf[x]]-pf[EulerPhi[x]] Table[Prime[w]-f[Prime[w]], {w, 2, 128}]
%o A070820 (PARI) a(n)=if(n>1, my(f=factor(prime(n)-1)[, 1]); f[#f]+1, 2)
%Y A070820 Cf. A000010, A000040, A006530, A070812, A070813, A070819.
%K A070820 nonn
%O A070820 1,1
%A A070820 _Labos Elemer_, May 10 2002