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.

Previous Showing 11-14 of 14 results.

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

Original entry on oeis.org

1, 1, 2, 4, 10, 22, 48, 102, 214, 440, 900, 1830, 3706, 7486, 15092, 30380, 61100, 122780, 246566, 494912, 992984, 1991620, 3993446, 8005388, 16044460, 32150584, 64414460, 129037790, 258462026, 517641086, 1036616262, 2075721252, 4156096036, 8320912744, 16658202200
Offset: 0

Views

Author

Gus Wiseman, Sep 12 2019

Keywords

Examples

			The a(1) = 1 through a(5) = 22 subsets:
  {}  {}     {}     {}         {}
      {1,2}  {1,2}  {1,2}      {1,2}
             {1,3}  {1,3}      {1,3}
             {2,3}  {1,4}      {1,4}
                    {2,3}      {1,5}
                    {2,4}      {2,3}
                    {3,4}      {2,4}
                    {1,2,4}    {2,5}
                    {1,3,4}    {3,4}
                    {1,2,3,4}  {3,5}
                               {4,5}
                               {1,2,4}
                               {1,2,5}
                               {1,3,4}
                               {1,4,5}
                               {2,3,5}
                               {2,4,5}
                               {1,2,3,4}
                               {1,2,3,5}
                               {1,2,4,5}
                               {1,3,4,5}
                               {2,3,4,5}
		

Crossrefs

Subsets containing their mean are A065795.
Subsets containing n but not their mean are A327477.
Partitions not containing their mean are A327472.
Strict partitions not containing their mean are A240851.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],!MemberQ[#,Mean[#]]&]],{n,0,10}]
  • Python
    from sympy import totient, divisors
    def A327471(n): return (1<>(~k&k-1).bit_length(),generator=True))<<1)//k for k in range(1,n+1))>>1) # Chai Wah Wu, Feb 22 2023

Formula

a(n) = 2^n - A065795(n). - Alois P. Heinz, Sep 13 2019

Extensions

More terms from Alois P. Heinz, Sep 13 2019

A327474 Number of distinct means of subsets of {1..n}, where {} has mean 0.

Original entry on oeis.org

1, 2, 4, 6, 10, 16, 26, 38, 56, 78, 106, 138, 180, 226, 284, 348, 420, 500, 596, 698, 818, 946, 1086, 1236, 1408, 1588, 1788, 2000, 2230, 2472, 2742, 3020, 3328, 3652, 3996, 4356, 4740, 5136, 5568, 6018, 6492, 6982, 7512, 8054, 8638, 9242, 9870, 10520, 11216
Offset: 0

Views

Author

Gus Wiseman, Sep 13 2019

Keywords

Examples

			The a(3) = 6 distinct means are 0, 1, 3/2, 2, 5/2, 3.
		

Crossrefs

The version for only nonempty subsets is A135342.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, [1, 2, 4, 6][n+1],
          2*a(n-1)-a(n-2)+numtheory[phi](n-1))
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Feb 22 2023
  • Mathematica
    Table[Length[Union[Mean/@Subsets[Range[n]]]],{n,0,10}]
  • Python
    from itertools import count, islice
    from sympy import totient
    def A327474_gen(): # generator of terms
        a, b = 4, 6
        yield from (1,2,4,6)
        for n in count(3):
            a, b = b, (b<<1)-a+totient(n)
            yield b
    A327474_list = list(islice(A327474_gen(),30)) # Chai Wah Wu, Feb 22 2023

Formula

a(n) = A135342(n) + 1.
a(n) = 2*a(n-1) - a(n-2) + phi(n-1) for n>3. - Chai Wah Wu, Feb 22 2023

A327477 Number of subsets of {1..n} containing n whose mean is not an element.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 13 2019

Keywords

Examples

			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}
		

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.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&!MemberQ[#,Mean[#]]&]],{n,0,10}]
  • Python
    from sympy import totient, divisors
    def A327477(n): return (1<>(~n&n-1).bit_length(),generator=True))//n if n else 0 # Chai Wah Wu, Feb 21 2023

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)

Extensions

a(25)-a(34) from Alois P. Heinz, Feb 21 2023

A327478 Numbers whose average binary index is also a binary index.

Original entry on oeis.org

1, 2, 4, 7, 8, 14, 16, 21, 28, 31, 32, 39, 42, 56, 57, 62, 64, 73, 78, 84, 93, 107, 112, 114, 124, 127, 128, 141, 146, 155, 156, 168, 175, 177, 186, 214, 217, 224, 228, 245, 248, 254, 256, 267, 273, 282, 287, 292, 310, 312, 313, 336, 341, 350, 354, 371, 372
Offset: 1

Views

Author

Gus Wiseman, Sep 13 2019

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The sequence of terms together with their binary indices begins:
   1: 1
   2: 2
   4: 3
   7: 1 2 3
   8: 4
  14: 2 3 4
  16: 5
  21: 1 3 5
  28: 3 4 5
  31: 1 2 3 4 5
  32: 6
  39: 1 2 3 6
  42: 2 4 6
  56: 4 5 6
  57: 1 4 5 6
  61: 2 3 4 5 6
		

Crossrefs

Numbers whose binary indices have integer mean are A326669.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[100],MemberQ[bpe[#],Mean[bpe[#]]]&]
Previous Showing 11-14 of 14 results.