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.

A340729 a(n) is the least k such that there are exactly n divisors d of k for which k/d-d is prime.

This page as a plain text file.
%I A340729 #6 Jan 17 2021 23:09:25
%S A340729 1,3,8,18,60,150,210,420,390,840,7770,5460,9282,2310,3570,2730,10710,
%T A340729 39270,117810,60060,154770,43890,53130,46410,66990,62790,176358,
%U A340729 106260,30030,642180,1111110,1919190,930930,1688610,1360590,1531530,1291290,570570,1138830,510510,690690,1141140,870870
%N A340729 a(n) is the least k such that there are exactly n divisors d of k for which k/d-d is prime.
%C A340729 a(n) is the least solution of A340728(k) = n.
%e A340729 a(3) = 18 because there are 3 such divisors of 18, namely 1,2,3: 18/1-1 = 17, 18/2-2 = 7 and 18/3-3 = 3, and 18 is the least number with 3 such divisors.
%p A340729 f:= proc(n) local D,i,m;
%p A340729 D:= sort(convert(numtheory:-divisors(n),list));
%p A340729   m:= nops(D);
%p A340729   nops(select(i -> isprime(D[m+1-i]-D[i]), [$1..(m+1)/2]));
%p A340729 end proc:
%p A340729 N:= 30: # for a(0)..a(N)
%p A340729 V:= Array(0..N): count:= 0:
%p A340729 for n from 1 while count < N+1 do
%p A340729 v:= f(n);
%p A340729 if v <= N and V[v]=0 then count:= count+1; V[v]:= n fi
%p A340729 od:
%p A340729 convert(V,list);
%Y A340729 Cf. A340728.
%K A340729 nonn
%O A340729 0,2
%A A340729 _J. M. Bergot_ and _Robert Israel_, Jan 17 2021