%I #29 Nov 23 2019 04:12:34
%S 1,2,5,3,13,7,877,23,19,4639,22619,37,27644437,1800937,251,241,
%T 255755771,19463,271,61,24709,17,89,123419,367,101,157,67,75979,107,
%U 11,179167,5694673,111509,980424262253,193,44101,5399,6353,3221
%N Least prime divisor of B(n) which does not divide any B(k) with k < n, or 1 if such a primitive prime divisor of B(n) does not exist, where B(n) is the n-th Bell number given by A000110.
%C Conjecture: (i) a(n) > 1 for all n > 1.
%C Conjecture: (ii) For any integer n > 2, the derangement number D(n) given by A000166 has a prime divisor dividing none of those D(k) with 1 < k < n.
%H Amiram Eldar, <a href="/A242171/b242171.txt">Table of n, a(n) for n = 1..104</a> (terms 1..81 from Zhi-Wei Sun)
%p a(4) = 3 since B(4) = 3*5 with 3 dividing none of B(1) = 1, B(2) = 2 and B(3) = 5.
%t b[n_]:=BellB[n]
%t f[n_]:=FactorInteger[b[n]]
%t p[n_]:=Table[Part[Part[f[n],k],1],{k,1,Length[f[n]]}]
%t Do[If[b[n]<2,Goto[cc]];Do[Do[If[Mod[b[i],Part[p[n],k]]==0,Goto[aa]],{i,1,n-1}];Print[n," ",Part[p[n],k]];Goto[bb];Label[aa];Continue,{k,1,Length[p[n]]}];Label[cc];Print[n," ",1];Label[bb];Continue,{n,1,40}]
%o (Python)
%o # Python 3.2 or higher required.
%o from itertools import accumulate
%o from sympy import primefactors
%o A242171_list, bell, blist, b = [1], [1,1], [1], 1
%o for _ in range(20):
%o ....blist = list(accumulate([b]+blist))
%o ....b = blist[-1]
%o ....fs = primefactors(b)
%o ....for p in fs:
%o ........if all([n % p for n in bell]):
%o ............A242171_list.append(p)
%o ............break
%o ....else:
%o ........A242171_list.append(1)
%o ....bell.append(b) # _Chai Wah Wu_, Sep 19 2014
%Y Cf. A000040, A000110, A000166, A242169, A242170, A242173.
%K nonn
%O 1,2
%A _Zhi-Wei Sun_, May 06 2014
|