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.

Showing 1-10 of 10 results.

A034729 a(n) = Sum_{ k, k|n } 2^(k-1).

Original entry on oeis.org

1, 3, 5, 11, 17, 39, 65, 139, 261, 531, 1025, 2095, 4097, 8259, 16405, 32907, 65537, 131367, 262145, 524827, 1048645, 2098179, 4194305, 8390831, 16777233, 33558531, 67109125, 134225995, 268435457, 536887863, 1073741825, 2147516555, 4294968325, 8590000131
Offset: 1

Views

Author

Keywords

Comments

Dirichlet convolution of b_n=1 with c_n = 2^(n-1).
Equals row sums of triangle A143425, & inverse Möbius transform (A051731) of [1, 2, 4, 8, ...]. - Gary W. Adamson, Aug 14 2008
Number of constant multiset partitions of normal multisets of size n, where a multiset is normal if it spans an initial interval of positive integers. - Gus Wiseman, Sep 16 2018

Examples

			From _Gus Wiseman_, Sep 16 2018: (Start)
The a(4) = 11 constant multiset partitions:
  (1)(1)(1)(1)
    (11)(11)
    (12)(12)
     (1111)
     (1222)
     (1122)
     (1112)
     (1233)
     (1223)
     (1123)
     (1234)
(End)
		

Crossrefs

Cf. A289508.
Sums of the form Sum_{d|n} q^(d-1): this sequence (q=2), A034730 (q=3), A113999 (q=10), A339684 (q=4), A339685 (q=5), A339686 (q=6), A339687 (q=7), A339688 (q=8), A339689 (q=9).

Programs

  • Magma
    A034729:= func< n | (&+[2^(d-1): d in Divisors(n)]) >;
    [A034729(n): n in [1..40]]; // G. C. Greubel, Jun 26 2024
    
  • Maple
    seq(add(2^(k-1),k=numtheory:-divisors(n)), n = 1 .. 100); # Robert Israel, Aug 22 2014
  • Mathematica
    Rest[CoefficientList[Series[Sum[x^k/(1-2*x^k),{k,1,30}],{x,0,30}],x]] (* Vaclav Kotesovec, Sep 08 2014 *)
  • PARI
    A034729(n) = sumdiv(n,k,2^(k-1)) \\ Michael B. Porter, Mar 11 2010
    
  • PARI
    {a(n)=polcoeff(sum(m=1,n,2^(m-1)*x^m/(1-x^m +x*O(x^n))),n)}
    for(n=1,40,print1(a(n),", ")) \\ Paul D. Hanna, Aug 21 2014
    
  • PARI
    {a(n)=local(A=x+x^2);A=sum(m=1,n,x^m*sumdiv(m,d,1/(1 - x^(m/d) +x*O(x^n))^d) );polcoeff(A,n)}
    for(n=1,40,print1(a(n),", ")) \\ Paul D. Hanna, Aug 21 2014
    
  • Python
    from sympy import divisors
    def A034729(n): return sum(1<<(d-1) for d in divisors(n,generator=True)) # Chai Wah Wu, Jul 15 2022
    
  • SageMath
    def A034729(n): return sum(2^(k-1) for k in (1..n) if (k).divides(n))
    [A034729(n) for n in range(1,41)] # G. C. Greubel, Jun 26 2024

Formula

G.f.: Sum_{n>0} x^n/(1-2*x^n). - Vladeta Jovovic, Nov 14 2002
a(n) = 1/2 * A055895(n). - Joerg Arndt, Aug 14 2012
G.f.: Sum_{n>=1} 2^(n-1) * x^n / (1 - x^n). - Paul D. Hanna, Aug 21 2014
G.f.: Sum_{n>=1} x^n * Sum_{d|n} 1/(1 - x^d)^(n/d). - Paul D. Hanna, Aug 21 2014
a(n) ~ 2^(n-1). - Vaclav Kotesovec, Sep 09 2014
a(n) = Sum_{k in row n of A215366} A008480(k) * A000005(A289508(k)). - Gus Wiseman, Sep 16 2018
a(n) = Sum_{c is a composition of n} A000005(gcd(c)). - Gus Wiseman, Sep 16 2018

A295901 Unique sequence satisfying SumXOR_{d divides n} a(d) = n^2 for any n > 0, where SumXOR is the analog of summation under the binary XOR operation.

Original entry on oeis.org

1, 5, 8, 20, 24, 40, 48, 80, 88, 120, 120, 160, 168, 240, 240, 320, 288, 312, 360, 480, 384, 408, 528, 640, 616, 520, 648, 960, 840, 816, 960, 1280, 1072, 1440, 1248, 1248, 1368, 1224, 1360, 1920, 1680, 1920, 1848, 1632, 1872, 2640, 2208, 2560, 2384, 3016
Offset: 1

Views

Author

Rémy Sigrist, Nov 29 2017

Keywords

Comments

This sequence is a variant of A256739; both sequences have nice graphical features.
Replacing "SumXOR" by "Sum" in the name leads to the Jordan function J_2 (A007434).
For any sequence f of nonnegative integers with positive indices:
- let x_f be the unique sequence satisfying SumXOR_{d divides n} x_f(d) = f(n) for any n > 0,
- in particular, x_A000027 = A256739 and x_A000290 = a (this sequence),
- also, x_A178910 = A000027 and x_A055895 = A000079,
- see the links section for a gallery of x_f plots for some classic f functions,
- x_f(1) = f(1),
- x_f(p) = f(1) XOR f(p) for any prime p,
- x_f(n) = SumXOR_{d divides n and n/d is squarefree} f(d) for any n > 0,
- the function x: f -> x_f is a bijection,
- A000004 is the only fixed point of x (i.e. x_f = f if and only if f = A000004),
- for any sequence f, x_{2*f} = 2 * x_f,
- for any sequences g and f, x_{g XOR f} = x_g XOR x_f.
From Antti Karttunen, Dec 29 2017: (Start)
The transform x_f described above could be called "Xor-Moebius transform of f" because of its analogous construction to Möbius transform with A008683 replaced by A008966 and the summation replaced by cumulative XOR.
(End)

Crossrefs

Programs

  • PARI
    a(n{, f=k->k^2}) = my (v=0); fordiv(n,d,if (issquarefree(n/d), v=bitxor(v,f(d)))); return (v)

Formula

a(n) = SumXOR_{d divides n and n/d is squarefree} d^2.

A074854 a(n) = Sum_{d|n} (2^(n-d)).

Original entry on oeis.org

1, 3, 5, 13, 17, 57, 65, 209, 321, 801, 1025, 3905, 4097, 12417, 21505, 53505, 65537, 233985, 262145, 885761, 1327105, 3147777, 4194305, 16060417, 17825793, 50339841, 84148225, 220217345, 268435457, 990937089, 1073741825, 3506503681
Offset: 1

Views

Author

Miklos Kristof, Sep 11 2002

Keywords

Comments

A034729 = Sum_{d|n} (2^(d-1)).
If p is a prime, then a(p) = A034729(p) = 2^(p-1)+1.
From Gus Wiseman, Jul 14 2020: (Start)
Number of ways to tile a rectangle of size n using horizontal strips. Also the number of ways to choose a composition of each part of a constant partition of n. The a(0) = 1 through a(5) = 17 splittings are:
() (1) (2) (3) (4) (5)
(1,1) (1,2) (1,3) (1,4)
(1),(1) (2,1) (2,2) (2,3)
(1,1,1) (3,1) (3,2)
(1),(1),(1) (1,1,2) (4,1)
(1,2,1) (1,1,3)
(2,1,1) (1,2,2)
(2),(2) (1,3,1)
(1,1,1,1) (2,1,2)
(1,1),(2) (2,2,1)
(2),(1,1) (3,1,1)
(1,1),(1,1) (1,1,1,2)
(1),(1),(1),(1) (1,1,2,1)
(1,2,1,1)
(2,1,1,1)
(1,1,1,1,1)
(1),(1),(1),(1),(1)
(End)

Examples

			Divisors of 6 = 1,2,3,6 and 6-1 = 5, 6-2 = 4, 6-3 = 3, 6-6 = 0. a(6) = 2^5 + 2^4 + 2^3 + 2^0 = 32 + 16 + 8 + 1 = 57.
G.f. = x + 3*x^2 + 5*x^3 + 13*x^4 + 17*x^5 + 57*x^6 + 65*x^7 + ...
a(14) = 1 + 2^7 + 2^12 + 2^13 = 12417. - _Gus Wiseman_, Jun 20 2018
		

Crossrefs

Cf. A080267.
Cf. A051731.
The version looking at lengths instead of sums is A101509.
The strictly increasing (or strictly decreasing) version is A304961.
Starting with a partition gives A317715.
Starting with a strict partition gives A318683.
Requiring distinct instead of equal sums gives A336127.
Starting with a strict composition gives A336130.
Partitions of partitions are A001970.
Splittings of compositions are A133494.
Splittings of partitions are A323583.

Programs

  • Mathematica
    a[ n_] := If[ n < 1, 0, Sum[ 2^(n - d), {d, Divisors[n]}]] (* Michael Somos, Mar 28 2013 *)
  • PARI
    a(n)=if(n<1,0,2^n*polcoeff(sum(k=1,n,2/(2-x^k),x*O(x^n)),n))
    
  • PARI
    a(n) = sumdiv(n,d, 2^(n-d) ); /* Joerg Arndt, Mar 28 2013 */

Formula

G.f.: 2^n times coefficient of x^n in Sum_{k>=1} x^k/(2-x^k). - Benoit Cloitre, Apr 21 2003; corrected by Joerg Arndt, Mar 28 2013
G.f.: Sum_{k>0} 2^(k-1)*x^k/(1-2^(k-1)*x^k). - Vladeta Jovovic, Jun 24 2003
G.f.: Sum_{n>=1} a*z^n/(1-a*z^n) (generalized Lambert series) where z=2*x and a=1/2. - Joerg Arndt, Jan 30 2011
Triangle A051731 mod 2 converted to decimal. - Philippe Deléham, Oct 04 2003
G.f.: Sum_{k>0} 1 / (2 / (2*x)^k - 1). - Michael Somos, Mar 28 2013

Extensions

a(14) corrected from 9407 to 12417 by Gus Wiseman, Jun 20 2018

A113705 Inverse Moebius transform of powers of 10.

Original entry on oeis.org

1, 10, 110, 1010, 10110, 100010, 1001110, 10000010, 100010110, 1000001010, 10000100110, 100000000010, 1000001011110, 10000000000010, 100000010000110, 1000000000101010, 10000000100010110, 100000000000000010, 1000000001001001110, 10000000000000000010, 100000000010000110110
Offset: 0

Views

Author

Paul Barry, Nov 05 2005

Keywords

Comments

A055895 to base 2.
The triangle formed by stacking the reversals of a(n) is A113704.
Using decimal positional notation, write a 1 at position d for all divisors d of n. All other digits are zeros and leading zeros are not permitted. - Michael De Vlieger, May 24 2017

Examples

			From _Michael De Vlieger_, May 24 2017: (Start)
First 20 terms of a(n), replacing zeros with "." to more clearly show positions of 1s in positions corresponding to terms in row n of A027750. This chart also pertains to terms of A055895 written in binary.
   n                    a(n)  A027750(n)
   ---------------------------------------
   0:                      1  {}
   1:                     1.  1
   2:                    11.  1,2
   3:                   1.1.  1,3
   4:                  1.11.  1,2,4
   5:                 1...1.  1,5
   6:                1..111.  1,2,3,6
   7:               1.....1.  1,7
   8:              1...1.11.  1,2,4,8
   9:             1.....1.1.  1,3,9
  10:            1....1..11.  1,2,5,10
  11:           1.........1.  1,11
  12:          1.....1.1111.  1,2,3,4,6,12
  13:         1...........1.  1,13
  14:        1......1....11.  1,2,7,14
  15:       1.........1.1.1.  1,3,5,15
  16:      1.......1...1.11.  1,2,4,8,16
  17:     1...............1.  1,17
  18:    1........1..1..111.  1,2,3,6,9,18
  19:   1.................1.  1,19
  20:  1.........1....11.11.  1,2,4,5,10,20 (End)
		

Crossrefs

Programs

  • Mathematica
    Table[If[n == 0, 1, Total[10^Divisors[n]]], {n, 0, 20}] (* or *)
    Table[If[n == 0, 1, Sum[If[Mod[n, k] == 0, 10^k, 0], {k, n}]], {n, 0,
      20}] (* or *)
    Table[Boole[n == 0] + Total@ MapIndexed[Boole[Divisible[n, #1]]*10^First@ #2 &, Range@ n], {n, 0, 20}] (* or *)
    Table[If[n == 0, 1, Function[d, FromDigits @Reverse@ ReplacePart[#, Map[# + 1 -> 1 &, d]] &@ ConstantArray[0, n + 1]]@ Divisors@ n], {n, 0, 20}]
    (* Michael De Vlieger, May 24 2017 *)
  • PARI
    a(n) = if (n==0, 1, sum(k=1, n, if (! (n % k), 10^k))); \\ Michel Marcus, May 23 2017

Formula

a(n) = Sum_{k=0..n} if(mod(n, k)=0, 10^k, 0).
G.f.: Sum_{k>=1} 10^k*x^k/(1 - x^k). - Ilya Gutkovskiy, May 23 2017

A130887 Inverse Moebius transform of the Mersenne numbers: a(n) = Sum_{d|n} (2^d - 1).

Original entry on oeis.org

1, 4, 8, 19, 32, 74, 128, 274, 519, 1058, 2048, 4184, 8192, 16514, 32806, 65809, 131072, 262728, 524288, 1049648, 2097286, 4196354, 8388608, 16781654, 33554463, 67117058, 134218246, 268451984, 536870912, 1073775718, 2147483648, 4295033104, 8589936646
Offset: 1

Views

Author

Gary W. Adamson, Jun 07 2007

Keywords

Examples

			G.f. = x + 4*x^2 + 8*x^3 + 19*x^4 + 32*x^5 + 74*x^6 + 128*x^7 + 274*x^8 + ...
		

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} Sum_{k=1..d} C(d,k) = Sum_{d|n} (-1 + 2^d) = Sum_{d|n} 2^d - tau(n) = A055895(n) - A000010(n). - Enrique Pérez Herrero, Apr 14 2012
G.f.: Sum_{k>=1} (2^k - 1)*x^k/(1 - x^k). - Ilya Gutkovskiy, Jan 28 2017
a(n) = Sum_{i=1..n} 2^(i-1)*A135539(n,i). - Ridouane Oudra, Sep 19 2022

Extensions

New name from Enrique Pérez Herrero, Apr 14 2012
Name corrected by Michel Marcus, Sep 19 2022

A339916 The sum of 2^((d-1)/2) over all divisors of 2n+1.

Original entry on oeis.org

1, 3, 5, 9, 19, 33, 65, 135, 257, 513, 1035, 2049, 4101, 8211, 16385, 32769, 65571, 131085, 262145, 524355, 1048577, 2097153, 4194455, 8388609, 16777225, 33554691, 67108865, 134217765, 268435971, 536870913, 1073741825, 2147484699, 4294967365, 8589934593, 17179871235, 34359738369, 68719476737
Offset: 0

Views

Author

Don Knuth, Dec 22 2020

Keywords

Comments

This is sort of a bitmap representation of the divisors of odd numbers.

Examples

			For n=7, a(7)=2^7+2^2+2^1+2^0=135 because the divisors of 15 are 15,5,3,1.
		

Crossrefs

Cf. A114001 (bit reversal), A034729, A055895.

Programs

  • Maple
    seq(add(2^((d-1)/2),d=numtheory:-divisors(2*n+1)),n=0..100); # Robert Israel, Dec 24 2020
  • Mathematica
    A339916[n_]:=Block[{d=Divisors[2n+1]},Sum[2^((d[[k]]-1)/2),{k,Length[d]}]];Array[A339916,50,0]
  • PARI
    a(n) = sumdiv(2*n+1, d, 2^((d-1)/2)); \\ Michel Marcus, Dec 23 2020
    
  • Python
    from sympy import divisors
    def a(n): return sum(2**((d-1)//2) for d in divisors(2*n+1))
    print([a(n) for n in range(37)]) # Michael S. Branicky, Dec 24 2020

A055894 Inverse Moebius transform of Pascal's triangle A007318.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 3, 4, 8, 4, 3, 2, 5, 10, 10, 5, 2, 4, 6, 18, 22, 18, 6, 4, 2, 7, 21, 35, 35, 21, 7, 2, 4, 8, 32, 56, 78, 56, 32, 8, 4, 3, 9, 36, 87, 126, 126, 87, 36, 9, 3, 4, 10, 50, 120, 220, 254, 220, 120, 50, 10, 4, 2, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11
Offset: 0

Views

Author

Christian G. Bower, Jun 09 2000

Keywords

Examples

			Triangle starts:
  [0]  1;
  [1]  1,   1;
  [2]  2,   2,   2;
  [3]  2,   3,   3,   2;
  [4]  3,   4,   8,   4,   3;
  [5]  2,   5,  10,  10,   5,   2;
  [6]  4,   6,  18,  22,  18,   6,   4;
  [7]  2,   7,  21,  35,  35,  21,   7,   2;
  [8]  4,   8,  32,  56,  78,  56,  32,   8,   4;
  [9]  3,   9,  36,  87, 126, 126,  87,  36,   9,   3;
  ...
		

Crossrefs

Cf. A007318.
Row sums give A055895.

Programs

  • Mathematica
    T[n_, k_] := DivisorSum[GCD[k, n], Binomial[n/#, k/#] &]; T[0, 0] = 1; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 02 2015 *)
  • PARI
    T(n,k) = if(n<=0, n==0, sumdiv(gcd(n,k), d, binomial(n/d,k/d) ) );
    /* print triangle: */
    { for (n=0, 17, for (k=0, n, print1(T(n,k),", "); ); print(); ); }
    /* Joerg Arndt, Oct 21 2012 */

A363733 Array read by upwards antidiagonals. The family of polynomials generated by the divisibility matrix (A113704) evaluated over the nonnegative integers.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 2, 6, 3, 1, 0, 3, 10, 12, 4, 1, 0, 2, 22, 30, 20, 5, 1, 0, 4, 34, 93, 68, 30, 6, 1, 0, 2, 78, 246, 276, 130, 42, 7, 1, 0, 4, 130, 768, 1028, 655, 222, 56, 8, 1, 0, 3, 278, 2190, 4180, 3130, 1338, 350, 72, 9, 1
Offset: 0

Views

Author

Peter Luschny, Jun 27 2023

Keywords

Comments

The name expresses the 'row view' of the array. The 'column view' regards the array as the collection of the inverse Möbius transforms of the power sequences k^n = 0^n, 1^n, 2^n, .... (n >= 0). Viewed this way, the array is a generalization of the number of divisors sequence tau (A000005), to which it reduces in the case k = 1.
The array has offset (0, 0). It uses the usual definition of 'k divides n' as described in Apostol, rather than the shortened version, which restricts to values k > 0 as some programs do (but not SageMath). Such a restriction makes sense in the context of rational numbers but not in the case of natural numbers.

Examples

			Array A(n, k) starts:
  [0] 1, 1,   1,    1,     1,      1,       1,       1,        1, ... A000012
  [1] 0, 1,   2,    3,     4,      5,       6,       7,        8, ... A001477
  [2] 0, 2,   6,   12,    20,     30,      42,      56,       72, ... A002378
  [3] 0, 2,  10,   30,    68,    130,     222,     350,      520, ... A034262
  [4] 0, 3,  22,   93,   276,    655,    1338,    2457,     4168, ...
  [5] 0, 2,  34,  246,  1028,   3130,    7782,   16814,    32776, ... A131471
  [6] 0, 4,  78,  768,  4180,  15780,   46914,  118048,   262728, ...
  [7] 0, 2, 130, 2190, 16388,  78130,  279942,  823550,  2097160, ... A190578
  [8] 0, 4, 278, 6654, 65812, 391280, 1680954, 5767258, 16781384, ...
   A000005,A055895,A363913, ...                             A066108 (diagonal)
.
Triangle T(n, k) starts:
  [0] 1;
  [1] 0, 1;
  [2] 0, 1,   1;
  [3] 0, 2,   2,   1;
  [4] 0, 2,   6,   3,    1;
  [5] 0, 3,  10,  12,    4,   1;
  [6] 0, 2,  22,  30,   20,   5,   1;
  [7] 0, 4,  34,  93,   68,  30,   6,  1;
  [8] 0, 2,  78, 246,  276, 130,  42,  7, 1;
  [9] 0, 4, 130, 768, 1028, 655, 222, 56, 8, 1;
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer 1976, p. 14.

Crossrefs

Cf. A113704 (in compact form A113705), A000005 (column 1), A055895 (column 2), A363913 (column 3), A001477 (row 1), A002378 (row 2), A034262 (row 3), A131471 (row 5), A190578 (row 7), A363912 (row sums), A066108 (main diagonal of array).

Programs

  • Maple
    divides := (k, n) -> ifelse(k = n or (k > 0 and irem(n, k) = 0), 1, 0):
    A := (n, k) -> local j; add(divides(j, n) * k^j, j = 0 ..n):
    for n from 0 to 8 do seq(A(n, k), k = 0..8) od;
    # If we introduce the 'inverse Möbius transform' InvMoebius acting on s ...
    InvMoebius := (s, n) -> local j; add(divides(j, n) * s(j), j = 0 ..n):
    # ... the transposed array is given by applying InvMoebius to the powers r^m:
    seq(lprint(seq(InvMoebius(m -> r^m, n), n = 0..8)), r = 0..8);
    # For instance we see that the number of divisors is the inverse
    # Moebius transform of the constant sequence s = 1.
  • SageMath
    def A(n, k): return sum(j.divides(n) * k^j for j in (0..n))
    for n in srange(9): print([A(n, k) for k in (0..8)])

Formula

A(n, k) = Sum_{j=0..n} divides(j, n) * k^j, where divides(k, n) <-> [k = n or (k > 0 and n mod k = 0)], and '[ ]' denotes the Iverson bracket.
The columns are the inverse Möbius transforms of the powers x^n, x >= 0.

A363913 a(n) = Sum_{k=0..n} divides(k, n) * 3^k, where divides(k, n) = 1 if k divides n, otherwise 0.

Original entry on oeis.org

1, 3, 12, 30, 93, 246, 768, 2190, 6654, 19713, 59304, 177150, 532290, 1594326, 4785168, 14349180, 43053375, 129140166, 387440940, 1162261470, 3486843786, 10460355420, 31381236768, 94143178830, 282430075332, 847288609689, 2541867422664, 7625597504700, 22876797240210
Offset: 0

Views

Author

Peter Luschny, Jun 28 2023

Keywords

Crossrefs

Cf. A000007 (m = 0), A000005 (m = 1), A055895 (m = 2), this sequence (m = 3).

Programs

  • Magma
    A363913:= func< n | n eq 0 select 1 else 3*(&+[3^(d-1): d in Divisors(n)]) >;
    [A363913(n): n in [0..40]]; // G. C. Greubel, Jun 26 2024
  • Maple
    divides := (k, n) -> ifelse(k = n or (k > 0 and irem(n, k) = 0), 1, 0):
    a := n -> local j; add(divides(j, n) * 3^j, j = 0 ..n): seq(a(n), n = 0..28);
  • Mathematica
    A363913[n_]:= If[n==0, 1, 3*DivisorSum[n, 3^(#-1) &]];
    Table[A363913[n], {n,0,40}] (* G. C. Greubel, Jun 26 2024 *)
  • Python
    from sympy import divisors
    def A363913(n): return sum(3**k for k in divisors(n,generator=True)) if n else 1 # Chai Wah Wu, Jun 28 2023
    
  • SageMath
    def a(n): return sum(3^k * k.divides(n) for k in srange(n+1))
    print([a(n) for n in range(29)])
    

Formula

a(n) = Sum_{j=0..n} A113704(j, n) * m^j for m = 3; for other cases see the crossreferences.
a(n) = 3*A034730(n), n>=1. - R. J. Mathar, Jul 04 2023

A309729 Expansion of Sum_{k>=1} x^k/(1 - x^k - 2*x^(2*k)).

Original entry on oeis.org

1, 2, 4, 7, 12, 26, 44, 92, 175, 354, 684, 1396, 2732, 5506, 10938, 21937, 43692, 87578, 174764, 349884, 699098, 1398786, 2796204, 5593886, 11184823, 22372354, 44739418, 89483996, 178956972, 357925242, 715827884, 1431677702, 2863312218, 5726666754, 11453246178, 22906581193
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 14 2019

Keywords

Comments

Inverse Moebius transform of Jacobsthal numbers (A001045).

Crossrefs

Programs

  • Maple
    seq(add(2^d-(-1)^d, d=numtheory:-divisors(n))/3, n=1..50); # Robert Israel, Aug 14 2019
  • Mathematica
    nmax = 36; CoefficientList[Series[Sum[x^k/(1 - x^k - 2 x^(2 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[(1/3) Sum[(2^d - (-1)^d), {d, Divisors[n]}], {n, 1, 36}]
  • PARI
    a(n)={sumdiv(n, d, 2^d - (-1)^d)/3} \\ Andrew Howroyd, Aug 14 2019
    
  • Python
    n = 1
    while n <= 36:
        s, d = 0, 1
        while d <= n:
            if n%d == 0:
                s = s+2**d-(-1)**d
            d = d+1
        print(n,s//3)
    n = n+1 # A.H.M. Smeets, Aug 14 2019

Formula

G.f.: Sum_{k>=1} A001045(k) * x^k/(1 - x^k).
a(n) = (1/3) * Sum_{d|n} (2^d - (-1)^d).
Showing 1-10 of 10 results.