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.

A079068 Largest prime less than greatest prime factor of n but not dividing n, or 1 if no such prime exists.

This page as a plain text file.
%I A079068 #13 Feb 21 2021 03:40:27
%S A079068 1,1,2,1,3,1,5,1,2,3,7,1,11,5,2,1,13,1,17,3,5,7,19,1,3,11,2,5,23,1,29,
%T A079068 1,7,13,3,1,31,17,11,3,37,5,41,7,2,19,43,1,5,3,13,11,47,1,7,5,17,23,
%U A079068 53,1,59,29,5,1,11,7,61,13,19,3,67,1,71,31,2,17,5,11,73,3,2,37,79,5,13,41,23
%N A079068 Largest prime less than greatest prime factor of n but not dividing n, or 1 if no such prime exists.
%H A079068 Alois P. Heinz, <a href="/A079068/b079068.txt">Table of n, a(n) for n = 1..20000</a>
%p A079068 a:= proc(n) local p, s; s:= numtheory[factorset](n);
%p A079068       if s={} then return 1
%p A079068     else p:= max(s);
%p A079068          do if p=2 then return 1 else p:= prevprime(p) fi;
%p A079068             if not p in s then return p fi
%p A079068          od
%p A079068       fi
%p A079068     end:
%p A079068 seq(a(n), n=1..100);  # _Alois P. Heinz_, Sep 03 2019
%t A079068 a[n_] := Module[{p}, For[p = NextPrime[FactorInteger[n][[-1, 1]], -1], p>1, p = NextPrime[p, -1], If[!Divisible[n, p], Return[p]]]; 1];
%t A079068 Array[a, 100] (* _Jean-François Alcover_, Nov 04 2020 *)
%Y A079068 Cf. A079067, A006530.
%K A079068 nonn
%O A079068 1,3
%A A079068 _Reinhard Zumkeller_, Dec 20 2002