%I #27 Jun 06 2024 03:48:57
%S 9,15,16,21,25,27,28,33,36,39,40,45,49,51,52,57,63,64,65,66,69,75,76,
%T 81,85,87,88,91,93,96,99,100,105,111,112,117,120,121,123,124,125,126,
%U 129,133,135,136,141,144,145,147,148
%N Numbers k having a proper divisor d > 2 such that d-1 divides k-1.
%C There is a triangular array of n dots, having at least three rows, having row sizes 1, 1+2x, 1+4x, 1+6x, ... iff n is in this sequence (where x equals all the natural numbers). - _Peter Woodward_, Apr 24 2015
%C The numbers of terms that do not exceed 10^k, for k = 1, 2, ..., are 1, 32, 381, 3929, 39703, 398182, 3985220, 39863899, 398676976, 3986887465, ... . Apparently, the asymptotic density of this sequence exists and equals 0.3986... . - _Amiram Eldar_, Jun 06 2024
%H Robert Israel, <a href="/A136410/b136410.txt">Table of n, a(n) for n = 1..10000</a>
%e E.g., consider k = 91: we can take d = 7, 7 divides 91 and 6 divides 90, so 91 is in the sequence.
%p N:= 1000: # to get all terms <= N
%p {seq(seq(d+k*d*(d-1),k=1..floor((N-d)/d/(d-1))),d=3..floor(sqrt(N)))};
%p # if using Maple 11 or earlier, uncomment the next line
%p # sort(convert(%,list)); # _Robert Israel_, Apr 24 2015
%t fQ[n_] := Block[{d = Select[ Take[ Divisors@ n, {2, -2}], # > 2 &]}, Union[IntegerQ /@ ((n - 1)/(d - 1))][[ -1]]]; Select[ Range@ 175, !PrimeQ@ # && fQ@ # &] (* _Robert G. Wilson v_, May 04 2008 *)
%o (PARI) is(k) = fordiv(k, d, if(d > 2 && d < k && !((k-1) % (d-1)), return(1))); 0; \\ _Amiram Eldar_, Jun 06 2024
%K nonn
%O 1,1
%A J. Perry (johnandruth(AT)jrperry.orangehome.co.uk), Apr 13 2008
%E Definition, terms and offset corrected by _M. F. Hasler_, May 01 2008
%E Edited by _N. J. A. Sloane_, May 10 2008