%I #36 Jul 16 2015 22:42:00
%S 2,2,3,2,2,3,2,5,2,3,2,2,2,7,7,2,2,2,3,2,2,2,5,11,3,2,2,3,2,2,2,5,2,3,
%T 2,2,13,13,2,2,2,5,2,3,2,2,3,2,2,2,3,17,2,17,2,3,2,2,3,2,2,2,3,19,2,2,
%U 2,3,2,19,2,5,2,2,2,3,2,2,2,2,7,23,7
%N a(n) is the smallest natural number such that A002182(n) = a(n) * A002182(n - i) for some i > 0, where A002182 is the sequence of highly composite numbers.
%C Each highly composite number hcn(n) (except the first) in the sequence A002182 is a product of a relatively small natural number and a preceding highly composite number hcn(n - i) in A002182.
%C The first nonprime term in A255911 is a(698) = 10.
%H Peter McGavin, <a href="/A255911/b255911.txt">Table of n, a(n) for n = 2..1000</a>
%e In A002182, hcn(5),hcn(6),hcn(7) = 12,24,36.
%e We have hcn(6) = 2 * hcn(5), therefore a(6) = 2.
%e hcn(6) is not a divisor of hcn(7), but hcn(7) = 3 * hcn(5), therefore a(7) = 3.
%p # Uses "http://oeis.org/wiki/User:R._J._Mathar/transforms3" to read a b-file
%p read("transforms3");
%p hcn:=BFILETOLIST("b002182.txt"):
%p a:=[]:
%p for i from 2 to nops(hcn) do \
%p j := i - 1: \
%p while (j > 0 and hcn[i] mod hcn[j] <> 0) do \
%p j := j - 1:
%p end do: \
%p a := [op(a), hcn[i] / hcn[j]]: \
%p end do:
%p a;
%p # _Peter McGavin_, Mar 15 2015
%o (C)
%o /* program fragment */
%o /* All variables are int */
%o /* Given the sequence A002182 already is in hcn[0..n-1] */
%o for (i = 1; i < n; i++) {
%o for (j = i - 1; j >= 0 && hcn[i] % hcn[j] != 0; --j)
%o /* do nothing */ ;
%o printf (",%d", hcn[i] / hcn[j]);
%o }
%o /* _Peter McGavin_, Mar 10 2015 */
%o (PARI) lista(nn) = {v = readvec("c:/gp/bfiles/b002182.txt"); for (n=2, nn, k = 0; for (i=1, n-1, if (type(kv = v[n]/v[i]) == "t_INT", if (k==0, k = kv, k = min(k, kv)););); print1(k, ", "););} \\ _Michel Marcus_, Mar 11 2015
%o (Python)
%o from sympy import divisor_count
%o A002182_list, A255911_list, count, m = [], [], 0, 0
%o for i in range(1,10**6):
%o ....d = divisor_count(i)
%o ....if d > m:
%o ........m = d
%o ........A002182_list.append(i)
%o ........for j in range(count-1,-1,-1):
%o ............q, r = divmod(i,A002182_list[j])
%o ............if not r:
%o ................A255911_list.append(q)
%o ................break
%o ........count += 1 # _Chai Wah Wu_, Mar 23 2015
%Y Cf. A002182.
%K nonn
%O 2,1
%A _Peter McGavin_, Mar 10 2015
|