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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A096223 Let p(k) be the number of partitions of k (A000041); a(n) = Sum_{1<=k<=n, gcd(k,n)=1} p(k). 0
1, 1, 3, 4, 11, 8, 29, 26, 52, 49, 138, 79, 271, 198, 337, 389, 914, 477, 1596, 993, 1881, 1912, 4507, 2222, 6485, 5080, 8682, 7384, 18459, 6780, 28628, 19598, 31098, 29444, 53198, 30470, 99132, 65771, 104464, 80422, 215307, 81792, 313064, 195091, 272503 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
If we let mu() be the Moebius function (A008683), then a(n) = sum mu(j), where j is taken over all parts, with repetitions, of every partition of n and where each j is such that j|n.
LINKS
EXAMPLE
The 7 partitions of 5 are 1+1+1+1+1, 1+1+1+2, 1+1+3, 1+2+2, 2+3, 1+4, 5. Of these parts, only 1 and 5 divide 5. Since there are twelve 1's and one 5, we have a(5) = 12*mu(1) + 1*mu(5) = 11.
MATHEMATICA
f[n_] := Block[{s = 0, k = 1}, While[k < n + 1, If[ GCD[k, n] == 1, s = s + PartitionsP[k]]; k++ ]; s]; Table[ f[n], {n, 45}] (* Robert G. Wilson v, Jul 29 2004 *)
PROG
(PARI) a(n) = {my(s=0, k=1); while(k< n + 1, if(gcd(k, n)==1, s+=numbpart(k)); k++); s};
for(n=1, 45, print1(a(n), ", ")) \\ Indranil Ghosh, Mar 16 2017
CROSSREFS
Cf. A008683.
Sequence in context: A220848 A370605 A232891 * A232862 A344460 A195589
KEYWORD
nonn,easy
AUTHOR
Leroy Quet, Jul 29 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jul 29 2004
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 23:40 EDT 2024. Contains 371798 sequences. (Running on oeis4.)