The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
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

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 May 13 11:22 EDT 2024. Contains 372504 sequences. (Running on oeis4.)