Dan Drake has authored 3 sequences.
A137443
First n-digit prime in consecutive digits of e.
Original entry on oeis.org
7, 71, 281, 4523, 74713, 904523, 6028747, 72407663, 360287471, 7427466391, 75724709369, 749669676277, 8284590452353, 99959574966967, 724709369995957, 2470936999595749, 28459045235360287, 571382178525166427
Offset: 1
7427466391 is the first 10-digit prime found in consecutive digits of e, so a(10) = 7427466391.
-
def a(digits):
bits = 0
pos = 0
while True:
bits += (digits * 4) + 50
decimals = RealField(bits, rnd='RNDZ')(exp(1)).frac().str()[2:]
for s in range(pos, len(decimals) - digits + 1):
if decimals[s] != '0':
i = Integer(decimals[s:s+digits])
if i.is_prime():
return i
pos = len(decimals) - digits + 1
A130760
Noncrossing set partition version of A102356.
Original entry on oeis.org
1, 1, 1, 3, 6, 10, 30, 105, 280, 756, 2520, 6930, 18480, 60060, 180180, 675675, 2162160, 6806800, 24504480, 77597520, 232792560, 888844320, 3259095840, 10708457760, 37479602160, 133855722000, 435031096500, 1445641797600, 5059746291600, 17468171721000, 58227239070000
Offset: 0
a(7) = 105 because there are 105 noncrossing set partitions of {1,2,3,4,5,6,7} of type {3,2,1,1} and all other integer partitions of 7 produce fewer noncrossing set partitions.
- D. E. Knuth, The Art of Computer Programming, vol. 4, section 7.2.1.5, problem 65.
A102356
Problem 66 in Knuth's Art of Computer Programming, vol. 4, section 7.2.1.5 asks which integer partition of n produces the most set partitions. The n-th term of this sequence is the number of set partitions produced by that integer partition.
Original entry on oeis.org
1, 1, 1, 3, 6, 15, 60, 210, 840, 3780, 12600, 69300, 415800, 2702700, 12612600, 94594500, 756756000, 4288284000, 38594556000, 244432188000, 1833241410000, 17110253160000, 141159588570000, 1298668214844000, 10389345718752000, 108222351237000000, 1125512452864800000
Offset: 0
a(4) = 6 because there are 6 set partitions of type {2,1,1}, namely 12/3/4, 13/2/4, 1/23/4, 14/2/3, 1/24/3, 1/2/34; all other integer partitions of 4 produce fewer set partitions.
-
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
max(seq(b(n-i*j, i-1) *n!/i!^j/(n-i*j)!/j!, j=0..n/i))))
end:
a:= n-> b(n, n):
seq(a(n), n=0..40); # Alois P. Heinz, Apr 13 2012
-
sp[l_] := (Total[l])!/(Apply[Times, Map[ #! &, l]]*Apply[Times, Map[Count[l, # ]! &, Range[Max[l]]]]) a[n_] := Max[Map[sp, Partitions[n]]]
b[0, ] = 1; b[, ?NonPositive] = 0; b[n, i_] := b[n, i] = Max[Table[ b[n - i*j, i-1]*n!/i!^j/(n - i*j)!/j!, {j, 0, n/i}]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jan 24 2014, after Alois P. Heinz *)
Typo in definition corrected by Klaus Leeb, Apr 30 2014.
Comments