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.

A219792 Least k such that phi(k) = lambda(n), or 0 if there is no such k.

This page as a plain text file.
%I A219792 #17 Dec 24 2021 14:54:14
%S A219792 1,1,3,3,5,3,7,3,7,5,11,3,13,7,5,5,17,7,19,5,7,11,23,3,25,13,19,7,29,
%T A219792 5,31,15,11,17,13,7,37,19,13,5,41,7,43,11,13,23,47,5,43,25,17,13,53,
%U A219792 19,25,7,19,29,59,5,61,31,7,17,13,11,67,17,23,13,71,7
%N A219792 Least k such that phi(k) = lambda(n), or 0 if there is no such k.
%C A219792 lambda(n) is the Carmichael lambda function A002322.
%C A219792 a(n) = 0 for n = 209, 297, 413, 418, 517, ...
%C A219792 If a(n) = p is a prime greater than 2, then n belongs to the finite set {p, p1, p2, ..., pk} that is a subsequence of A143417 (see the b-file in A143417). For example:
%C A219792 a(n) = 3 for n = 3, 4, 6;
%C A219792 a(n) = 5 for n = 5, 10, 15, 16, 20, 30, 40, 48, 60, 80, 120, 240;
%C A219792 a(n) = 7 for n = 7, 9, 14, 18, 21, 28, ..., 480;
%C A219792 a(n) = 11 for n = 11, 22, 33, 44, 66, 88, 132, 264;
%C A219792 a(n) = 13 for n = 13, 26, 35, 39, ..., 65520.
%H A219792 Antti Karttunen, <a href="/A219792/b219792.txt">Table of n, a(n) for n = 1..16384</a>
%F A219792 a(n) = A049283(A002322(n)).
%e A219792 a(6) = 3 because phi(3) = lambda(6) = 2.
%p A219792 with(numtheory): for n from 1 to 100 do: ii:=0:for k from 1 to 10^6 while(ii=0) do:if phi(k)=lambda(n) then ii:=1: printf(`%d, `,k):else fi:od:if ii=0 then printf(`%d, `,0): else fi:od:
%t A219792 Table[k=0;While[!EulerPhi[k]==CarmichaelLambda[n],k++];k,{n,100}]
%t A219792 Join[{1},Module[{nn=100,ep,lam},ep=Table[{k,EulerPhi[k]},{k,nn}];Table[ SelectFirst[ep,#[[2]]==CarmichaelLambda[n]&],{n,2,nn}]][[All,1]]] (* _Harvey P. Dale_, Dec 24 2021 *)
%o A219792 (PARI) a(n)=my(t=lcm(znstar(n)[2]));if(t>2,for(k=t+1,solve(x=t,2*t^2,x/(exp(Euler)*log(log(x))+3/log(log(x)))-t),if(eulerphi(k)==t,return(k)));0,2*t-1) \\ _Charles R Greathouse IV_, Nov 28 2012
%o A219792 (PARI)
%o A219792 A014197(n, m=1) = { n==1 && return(1+(m<2)); my(p, q); sumdiv(n, d, if( d>=m && isprime(d+1), sum( i=0, valuation(q=n\d, p=d+1), A014197(q\p^i, p))))} \\ This function from _M. F. Hasler_, Oct 05 2009
%o A219792 A219792(n) = { my(x=lcm(znstar(n)[2])); if(0==A014197(x),0,for(k=1,oo,if(eulerphi(k)==x,return(k)))); }; \\ _Antti Karttunen_, Dec 05 2017
%Y A219792 Cf. A000010, A002322, A014197, A049283.
%K A219792 nonn
%O A219792 1,3
%A A219792 _Michel Lagneau_, Nov 28 2012