login
A260798
Number of partitions of p=prime(n) into aliquant parts (i.e., parts that do not divide p, meaning any part except 1 and p).
4
0, 0, 1, 3, 13, 23, 65, 104, 252, 846, 1237, 3659, 7244, 10086, 19195, 48341, 116599, 155037, 356168, 609236, 792905, 1716485, 2832213, 5887815, 15116625, 23911833, 29983570, 46873052, 58443395, 90374471, 394641602, 593224103, 1082063335, 1318608063, 3477935702, 4207389268, 7398721009, 12885091292, 18555597522, 31831360281, 54145147464, 64517020844
OFFSET
1,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..2000 (first 781 terms from Reinhard Zumkeller)
EXAMPLE
For n=4, the fourth prime is 7, and we see the three partitions 7=2+5=2+2+3=3+4, so a(4)=3.
MAPLE
b:= proc(n, i) option remember; `if`(n=0 or i=2, 1-irem(n, 2),
`if`(i<2, 0, b(n, i-1)+b(n-i, min(i, n-i))))
end:
a:= n-> (p-> b(p, p-1))(ithprime(n)):
seq(a(n), n=1..45); # Alois P. Heinz, Mar 11 2018
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0 || i == 2, 1 - Mod[n, 2], If[i < 2, 0, b[n, i - 1] + b[n - i, Min[i, n - i]]]];
a[n_] := b[#, # - 1]&[Prime[n]];
Table[a[n], {n, 1, 45}] (* Jean-François Alcover, May 20 2018, after Alois P. Heinz *)
PROG
(Haskell)
import Data.MemoCombinators (memo2, integral)
a260798 n = a260798_list !! (n-1)
a260798_list = map (subtract 1 . pMemo 2) a000040_list where
pMemo = memo2 integral integral p
p _ 0 = 1
p k m | m < k = 0
| otherwise = pMemo k (m - k) + pMemo (k + 1) m
-- Reinhard Zumkeller, Aug 09 2015
CROSSREFS
This is A098743(prime(n)). Cf. A260797.
Sequence in context: A348559 A133313 A230026 * A102010 A121718 A261599
KEYWORD
nonn
AUTHOR
Marc LeBrun and N. J. A. Sloane, Aug 07 2015
STATUS
approved