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.

A245689 Smallest divisor of n that is greater than the smallest prime not dividing n (A053669(n)).

This page as a plain text file.
%I A245689 #33 May 15 2023 08:43:43
%S A245689 3,4,5,6,7,4,3,5,11,6,13,7,3,4,17,6,19,4,3,11,23,6,5,13,3,4,29,10,31,
%T A245689 4,3,17,5,6,37,19,3,4,41,6,43,4,3,23,47,6,7,5,3,4,53,6,5,4,3,29,59,10,
%U A245689 61,31,3,4,5,6,67,4,3,5,71,6,73,37,3,4,7,6,79
%N A245689 Smallest divisor of n that is greater than the smallest prime not dividing n (A053669(n)).
%C A245689 Sequence is similar to A126800 but differs for the first time at n = 30 and thereafter at n = 30k, where k = 3, 5, 7, 9, 11, 13, 14, 15 ... The generating function for k is not known.
%C A245689 The sequence starts at n = 3 as there are no qualifying divisors for n = 1 or n = 2.
%H A245689 K. Spage, <a href="/A245689/b245689.txt">Table of n, a(n) for n = 3..1000</a>
%F A245689 a(n) = n if n is an odd prime.
%e A245689 For n = 30 the smallest prime not dividing n is 7 and the smallest divisor of 30 that is greater than 7 is 10, so a(30) = 10.
%p A245689 a:= proc(n)
%p A245689 uses numtheory;
%p A245689 local F,p;
%p A245689 if n::odd then p:= 2
%p A245689   else
%p A245689   F:= map(pi,factorset(n));
%p A245689   p:= ithprime(min(map(`+`,F,1) minus F));
%p A245689 fi;
%p A245689 min(select(`>`,divisors(n),p));
%p A245689 end proc:
%p A245689 seq(a(n),n=3..100); # _Robert Israel_, Jul 31 2014
%t A245689 A053669[n_] := Module[{p}, For[p = 2, True, p = NextPrime[p], If[CoprimeQ[n, p], Return[p]]]];
%t A245689 A245689[n_] := SelectFirst[Divisors[n], # > A053669[n]&];
%t A245689 Table[A245689[n], {n, 3, 100}] (* _Jean-François Alcover_, May 15 2023 *)
%o A245689 (PARI) A053669(n)={forprime(p=2, ,if(n%p, return(p)))}
%o A245689 A245689(n) ={my(c=A053669(n)+1);while(n%c,c++);c}
%Y A245689 Cf. A053669, A245690.
%K A245689 nonn
%O A245689 3,1
%A A245689 _K. Spage_, Jul 29 2014