login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A327477
Number of subsets of {1..n} containing n whose mean is not an element.
5
0, 0, 1, 2, 6, 12, 26, 54, 112, 226, 460, 930, 1876, 3780, 7606, 15288, 30720, 61680, 123786, 248346, 498072, 998636, 2001826, 4011942, 8039072, 16106124, 32263876, 64623330, 129424236, 259179060, 518975176, 1039104990, 2080374784, 4164816708, 8337289456
OFFSET
0,4
FORMULA
From Alois P. Heinz, Feb 21 2023: (Start)
a(n) = A327471(n) - A327471(n-1) for n>=1.
a(n) = 2^(n-1) - A000016(n) for n>=1. (End)
EXAMPLE
The a(1) = 1 through a(5) = 12 subsets:
{1,2} {1,3} {1,4} {1,5}
{2,3} {2,4} {2,5}
{3,4} {3,5}
{1,2,4} {4,5}
{1,3,4} {1,2,5}
{1,2,3,4} {1,4,5}
{2,3,5}
{2,4,5}
{1,2,3,5}
{1,2,4,5}
{1,3,4,5}
{2,3,4,5}
MATHEMATICA
Table[Length[Select[Subsets[Range[n]], MemberQ[#, n]&&!MemberQ[#, Mean[#]]&]], {n, 0, 10}]
PROG
(Python)
from sympy import totient, divisors
def A327477(n): return (1<<n-1)-sum(totient(d)<<n//d-1 for d in divisors(n>>(~n&n-1).bit_length(), generator=True))//n if n else 0 # Chai Wah Wu, Feb 21 2023
CROSSREFS
Subsets whose mean is an element are A065795.
Subsets whose mean is not an element are A327471.
Subsets containing n whose mean is an element are A000016.
Sequence in context: A054454 A084170 A245264 * A350294 A052971 A364423
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 13 2019
EXTENSIONS
a(25)-a(34) from Alois P. Heinz, Feb 21 2023
STATUS
approved