The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A341461 Number of partitions of n into 3 distinct nonprime parts. 11
 1, 0, 1, 1, 2, 1, 2, 2, 4, 3, 4, 4, 6, 5, 8, 7, 9, 9, 10, 12, 14, 14, 14, 17, 19, 19, 22, 23, 24, 28, 27, 31, 33, 35, 36, 40, 40, 44, 47, 49, 50, 55, 53, 61, 62, 66, 65, 73, 72, 79, 81, 86, 85, 95, 91, 101, 101, 109, 107, 119, 114, 125, 125, 134, 134 (list; graph; refs; listen; history; text; internal format)
 OFFSET 11,5 LINKS Alois P. Heinz, Table of n, a(n) for n = 11..10000 MAPLE b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+ `if`(isprime(i), 0, b(n-i, min(n-i, i-1), t-1)))) end: a:= n-> b(n\$2, 3): seq(a(n), n=11..75); # Alois P. Heinz, Feb 12 2021 MATHEMATICA b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] + If[PrimeQ[i], 0, b[n - i, Min[n - i, i - 1], t - 1]]]]; a[n_] := b[n, n, 3]; a /@ Range[11, 75] (* Jean-François Alcover, Jul 01 2021, after Alois P. Heinz *) PROG (Python) from functools import lru_cache from sympy import isprime @lru_cache(maxsize=None) def b(n, i, t): if n == 0: return int(t == 0) if i < 1 or t < 1: return 0 b2 = 0 if isprime(i) else b(n-i, min(n-i, i-1), t-1) return b(n, i-1, t) + b2 a = lambda n: b(n, n, 3) print([a(n) for n in range(11, 76)]) # Michael S. Branicky, Feb 12 2021 after Alois P. Heinz CROSSREFS Cf. A005171, A018252, A096258, A125688, A302479, A341408, A341462, A341464, A341465, A341466, A341467. Sequence in context: A133770 A288310 A332718 * A337485 A328678 A184199 Adjacent sequences: A341458 A341459 A341460 * A341462 A341463 A341464 KEYWORD nonn AUTHOR Ilya Gutkovskiy, Feb 12 2021 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 8 04:35 EDT 2024. Contains 375018 sequences. (Running on oeis4.)