login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Least number in A349898 divisible by the n-th prime.
2

%I #9 Jan 14 2023 16:35:19

%S 2,3,5,7,22,52,136,190,1610,12760,35464,196840,2112320,4093600,

%T 22789360,288608320

%N Least number in A349898 divisible by the n-th prime.

%C Least value of A349194(k) divisible by the n-th prime for some k.

%C Does a(n) exist for each n? Is the sequence increasing?

%o (PARI) smooth(P,lim)=my(v=List([1]), nxt=vector(#P,i,1), indx, t); while(1, t=vecmin(vector(#P, i, v[nxt[i]]*P[i]), &indx); if(t>lim, break); if(t>v[#v], listput(v, t)); nxt[indx]++); Vec(v);

%o has(n)=my(v=apply(k->[k,k],select(k->n%k==0,[2..10]))); while(#v, my(u=List()); for(i=1,#v, my(sd=v[i][1],a=v[i][2]); for(k=0,9, my(nsd=sd+k,t=nsd*a); if(n%t==0, if(n==t, return(1)); listput(u,[nsd,t])))); v=Set(u)); 0

%o a(n)=if(n<5,return(prime(n))); my(P=primes(n+1),p=P[n],L=p,v=smooth(P,L),x); while(1, for(i=x+1,#v, if(has(p*v[i]), return(p*v[i]))); x=#v; v=smooth(P,L*=2))

%o \\ This program is heuristic and fails if a(n) is divisible by a prime >= prime(n+2). If this sequence is strictly increasing, "primes(n+1)" can be replaced with "primes(n)" for better speed and memory use.

%Y Cf. A349194, A349898.

%K base,nonn,more

%O 1,1

%A _Charles R Greathouse IV_, Dec 04 2021