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.

A291932 a(n) is the smallest k such that (n+1)*phi(k) = (n-1)*psi(k).

This page as a plain text file.
%I A291932 #40 Sep 21 2017 01:31:29
%S A291932 2,3,95,5,143,7,319,323,559,11,117317,13,1007,899,1919,17,201983,19,
%T A291932 441283,1763,394697,23,4031,5249,2911,3239,23519,29,3599,31,1796647,
%U A291932 979801,8159,5459,5183,37,1550047,10763,8639,41,2709037,43,10207,9179,101567,47,12218993,9701,13199,10403,4018073,53
%N A291932 a(n) is the smallest k such that (n+1)*phi(k) = (n-1)*psi(k).
%C A291932 Least k such that Product_{p|k} (p+1)/(p-1) = (n+1)/(n-1). As a result, all terms are squarefree. - _Charles R Greathouse IV_, Sep 06 2017
%C A291932 a(102) > 100000000. - _Robert G. Wilson v_, Sep 08 2017
%C A291932 a(102) = 8759437837. - _Giovanni Resta_, Sep 11 2017
%C A291932 a(108) > 2550000000. - _Robert G. Wilson v_, Sep 20 2017
%H A291932 Robert G. Wilson v, <a href="/A291932/b291932.txt">Table of n, a(n) for n = 2..107</a>
%F A291932 a(p) = p for all primes p.
%e A291932 a(4) = 95 = 5*19 because (psi(5*19) + phi(5*19)) / (psi(5*19) - phi(5*19)) = (6*20 + 4*18) / (6*20 - 4*18) = 4 and 95 is the least number with this property.
%p A291932 N:= 10^7: # to get all terms before the first with a(n) > N
%p A291932 M:= nextprime(N):
%p A291932 A:= Vector(M):
%p A291932 R:= proc(n) mul((i[1]+1)/(i[1]-1),i=ifactors(n)[2]) end proc:
%p A291932 for k from 2 to N do
%p A291932 r:= R(k);
%p A291932 n:= (r+1)/(r-1);
%p A291932 if n::integer and n <= M and A[n] = 0 then
%p A291932   A[n]:= k;
%p A291932 fi
%p A291932 od:
%p A291932 m:=min(select(t -> A[t]=0, [$2..M]))-1:
%p A291932 seq(A[i],i=2..m); # _Robert Israel_, Sep 06 2017
%t A291932 psi[n_] := If[n < 1, 0, n Sum[ MoebiusMu[d]^2/d, {d, Divisors@ n}]]; f[n_] := Block[{k = 1}, While[(n + 1)*EulerPhi[k] != (n - 1)*psi[k], k++]; k]; Array[f, 52, 2] (* _Robert G. Wilson v_, Sep 06 2017 *)
%o A291932 (PARI) a(n)=my(target=2/(n-1)+1,start=n,end=10*n,f); while(1, forfactored(k=start,end, f=k[2][,1]; if(vecmax(k[2][,2])==1 && prod(i=1,#f, 2/(f[i]-1)+1)==target, return(k[1]))); start=end+1; end*=2) \\ _Charles R Greathouse IV_, Sep 06 2017
%Y A291932 Cf. A000010, A001615.
%K A291932 nonn
%O A291932 2,1
%A A291932 _Altug Alkan_, Sep 06 2017