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 41-45 of 45 results.

A373275 a(n) = Sum_{d|n} (-1)^(d-1) * 2^(n/d-1).

Original entry on oeis.org

1, 1, 5, 5, 17, 29, 65, 117, 261, 497, 1025, 2017, 4097, 8129, 16405, 32629, 65537, 130845, 262145, 523765, 1048645, 2096129, 4194305, 8386641, 16777233, 33550337, 67109125, 134209477, 268435457, 536855053, 1073741825, 2147450741, 4294968325, 8589869057
Offset: 1

Views

Author

Seiichi Manyama, May 29 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sumdiv(n, d, (-1)^(d-1)*2^(n/d-1));
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, (2*x)^k/(1+x^k))/2)

Formula

G.f.: 1/2 * Sum_{k>=1} (2*x)^k / (1 + x^k).
If p is an odd prime, a(p) = 1 + 2^(p-1).

A245392 Sum_{k, k|n} 2^(k-1) + Sum_{1<=k<=n, gcd(k,n)=1} 2^(k-1).

Original entry on oeis.org

2, 4, 8, 16, 32, 56, 128, 224, 480, 856, 2048, 3200, 8192, 13656, 29920, 54752, 131072, 202104, 524288, 857952, 1939168, 3495256, 8388608, 12918016, 33013248, 55924056, 124631008, 222655840, 536870912, 809850488, 2147483648, 3579172320, 7974270688, 14316557656
Offset: 1

Views

Author

Michel Marcus, Jul 21 2014

Keywords

Comments

The 1's in the binary expansion of 2^n - a(n) correspond to k such that 1 < gcd(k,n) < k < n. - Robert Israel, Jul 21 2014

Crossrefs

Programs

  • Maple
    f:= proc(k,n) local g; g:= igcd(k,n); g = 1 or g = k end proc:
    A:= n -> 1 + add(2^(k-1),k=select(f,[$1..n],n));
    seq(A(n),n=1..100); # Robert Israel, Jul 21 2014
  • PARI
    sum(k=1, n, if (gcd(k,n)==1, 2^(k-1), 0)) + sumdiv(n, k, k*2^(k-1));

Formula

a(n) = A034729(n) + A054432(n).
If p is prime a(p) = 2^p.

A302546 a(n) = Sum_{k = 1...n} 2^binomial(n, k).

Original entry on oeis.org

0, 2, 6, 18, 98, 2114, 1114242, 68723671298, 1180735735906024030722, 170141183460507917357914971986913657858, 7237005577335553223087828975127304179197147198604070555943173844710572689410
Offset: 0

Views

Author

Gus Wiseman, Jun 20 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[2^Binomial[n,d],{d,n}],{n,10}]
  • PARI
    a(n) = sum(k=1, n, 2^binomial(n, k)); \\ Michel Marcus, Jun 21 2018

Formula

a(n) = A001315(n) - 2.

A336129 Number of strict compositions of divisors of n.

Original entry on oeis.org

1, 2, 4, 5, 6, 16, 14, 24, 31, 64, 66, 120, 134, 208, 360, 459, 618, 894, 1178, 1622, 2768, 3364, 4758, 6432, 8767, 11440, 15634, 24526, 30462, 42296, 55742, 75334, 98112, 131428, 168444, 258403, 315974, 432244, 558464, 753132, 958266, 1280840, 1621274
Offset: 1

Views

Author

Gus Wiseman, Jul 11 2020

Keywords

Comments

A strict composition of k is a finite sequence of distinct positive integers summing to k.

Examples

			The a(1) = 1 through a(7) = 14 compositions:
  (1)  (1)  (1)    (1)    (1)    (1)      (1)
       (2)  (3)    (2)    (5)    (2)      (7)
            (1,2)  (4)    (1,4)  (3)      (1,6)
            (2,1)  (1,3)  (2,3)  (6)      (2,5)
                   (3,1)  (3,2)  (1,2)    (3,4)
                          (4,1)  (1,5)    (4,3)
                                 (2,1)    (5,2)
                                 (2,4)    (6,1)
                                 (4,2)    (1,2,4)
                                 (5,1)    (1,4,2)
                                 (1,2,3)  (2,1,4)
                                 (1,3,2)  (2,4,1)
                                 (2,1,3)  (4,1,2)
                                 (2,3,1)  (4,2,1)
                                 (3,1,2)
                                 (3,2,1)
		

Crossrefs

Compositions of divisors are A034729.
Strict partitions of divisors are A047966.
Partitions of divisors are A047968.

Programs

  • Mathematica
    Table[Sum[Length[Join@@Permutations/@Select[IntegerPartitions[d],UnsameQ@@#&]],{d,Divisors[n]}],{n,12}]

Formula

Moebius transform is A032020 (strict compositions).

A338695 a(n) = Sum_{d|n} 2^(d-1) * binomial(d, n/d).

Original entry on oeis.org

1, 4, 12, 34, 80, 204, 448, 1072, 2308, 5280, 11264, 25088, 53248, 116032, 245920, 527880, 1114112, 2369152, 4980736, 10508880, 22022336, 46193664, 96468992, 201469408, 419430416, 872734720, 1811960832, 3758844096, 7784628224, 16107909312, 33285996544, 68723417856, 141734089728
Offset: 1

Views

Author

Seiichi Manyama, Apr 24 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 2^(# - 1) * Binomial[#, n/#] &]; Array[a, 20] (* Amiram Eldar, Apr 24 2021 *)
  • PARI
    a(n) = sumdiv(n, d, 2^(d-1)*binomial(d, n/d));
    
  • PARI
    N=40; x='x+O('x^N); Vec(sum(k=1, N, (2+2*x^k)^k-2^k)/2)

Formula

G.f.: (1/2) * Sum_{k>=1} ( (2 + 2 * x^k)^k - 2^k ) = Sum_{k>=1} 2^(k-1) * ( (1 + x^k)^k - 1 ).
If p is prime, a(p) = p * 2^(p-1).
Previous Showing 41-45 of 45 results.