cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A327471 Number of subsets of {1..n} not containing their mean.

This page as a plain text file.
%I A327471 #17 Feb 22 2023 18:04:10
%S A327471 1,1,2,4,10,22,48,102,214,440,900,1830,3706,7486,15092,30380,61100,
%T A327471 122780,246566,494912,992984,1991620,3993446,8005388,16044460,
%U A327471 32150584,64414460,129037790,258462026,517641086,1036616262,2075721252,4156096036,8320912744,16658202200
%N A327471 Number of subsets of {1..n} not containing their mean.
%F A327471 a(n) = 2^n - A065795(n). - _Alois P. Heinz_, Sep 13 2019
%e A327471 The a(1) = 1 through a(5) = 22 subsets:
%e A327471   {}  {}     {}     {}         {}
%e A327471       {1,2}  {1,2}  {1,2}      {1,2}
%e A327471              {1,3}  {1,3}      {1,3}
%e A327471              {2,3}  {1,4}      {1,4}
%e A327471                     {2,3}      {1,5}
%e A327471                     {2,4}      {2,3}
%e A327471                     {3,4}      {2,4}
%e A327471                     {1,2,4}    {2,5}
%e A327471                     {1,3,4}    {3,4}
%e A327471                     {1,2,3,4}  {3,5}
%e A327471                                {4,5}
%e A327471                                {1,2,4}
%e A327471                                {1,2,5}
%e A327471                                {1,3,4}
%e A327471                                {1,4,5}
%e A327471                                {2,3,5}
%e A327471                                {2,4,5}
%e A327471                                {1,2,3,4}
%e A327471                                {1,2,3,5}
%e A327471                                {1,2,4,5}
%e A327471                                {1,3,4,5}
%e A327471                                {2,3,4,5}
%t A327471 Table[Length[Select[Subsets[Range[n]],!MemberQ[#,Mean[#]]&]],{n,0,10}]
%o A327471 (Python)
%o A327471 from sympy import totient, divisors
%o A327471 def A327471(n): return (1<<n)-(sum((sum(totient(d)<<k//d-1 for d in divisors(k>>(~k&k-1).bit_length(),generator=True))<<1)//k for k in range(1,n+1))>>1) # _Chai Wah Wu_, Feb 22 2023
%Y A327471 Subsets containing their mean are A065795.
%Y A327471 Subsets containing n but not their mean are A327477.
%Y A327471 Partitions not containing their mean are A327472.
%Y A327471 Strict partitions not containing their mean are A240851.
%Y A327471 Cf. A000016, A007865, A051293, A067538, A082550, A114639, A135342, A324741, A327476.
%K A327471 nonn
%O A327471 0,3
%A A327471 _Gus Wiseman_, Sep 12 2019
%E A327471 More terms from _Alois P. Heinz_, Sep 13 2019