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-6 of 6 results.

A154402 Inverse Moebius transform of Fredholm-Rueppel sequence, cf. A036987.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 2, 1, 3, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 3, 1, 1, 3, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 3, 1, 2, 4, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 3, 1, 2, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 3, 2, 1, 3, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 4
Offset: 1

Views

Author

Vladeta Jovovic, Jan 08 2009

Keywords

Comments

Number of ways to write n as a sum a_1 + ... + a_k where the a_i are positive integers and a_i = 2 * a_{i-1}, cf. A000929.
Number of divisors of n of the form 2^k - 1 (A000225) for k >= 1. - Jeffrey Shallit, Jan 23 2017

Crossrefs

Cf. also A305436.

Programs

  • Maple
    N:= 200: # to get a(1)..a(N)
    A:= Vector(N):
    for k from 1 do
       t:= 2^k-1;
       if t > N then break fi;
       R:= [seq(i,i=t..N,t)];
       A[R]:= map(`+`,A[R],1)
    od:
    convert(A,list); # Robert Israel, Jan 23 2017
  • Mathematica
    Table[DivisorSum[n, 1 &, IntegerQ@ Log2[# + 1] &], {n, 105}] (* Michael De Vlieger, Jun 11 2018 *)
  • PARI
    A209229(n) = (n && !bitand(n,n-1));
    A036987(n) = A209229(1+n);
    A154402(n) = sumdiv(n,d,A036987(d)); \\ Antti Karttunen, Jun 11 2018
    
  • PARI
    A154402(n) = { my(m=1,s=0); while(m<=n, s += !(n%m); m += (m+1)); (s); }; \\ Antti Karttunen, May 12 2022

Formula

G.f.: Sum_{k>0} x^(2^k-1)/(1-x^(2^k-1)).
From Antti Karttunen, Jun 11 2018: (Start)
a(n) = Sum_{d|n} A036987(d).
a(n) = A305426(n) + A036987(n). (End)
a(n) = A147645(n) + A353786(n). - Antti Karttunen, May 12 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A065442 = 1.606695... . - Amiram Eldar, Dec 31 2023

A161788 a(n) is the largest integer of the form 2^k - 1 that divides n.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 7, 1, 3, 1, 1, 3, 1, 7, 15, 1, 1, 3, 1, 1, 7, 1, 1, 3, 1, 1, 3, 7, 1, 15, 31, 1, 3, 1, 7, 3, 1, 1, 3, 1, 1, 7, 1, 1, 15, 1, 1, 3, 7, 1, 3, 1, 1, 3, 1, 7, 3, 1, 1, 15, 1, 31, 63, 1, 1, 3, 1, 1, 3, 7, 1, 3, 1, 1, 15, 1, 7, 3, 1, 1, 3, 1, 1, 7, 1, 1, 3, 1, 1, 15, 7, 1, 31, 1, 1, 3, 1, 7, 3, 1, 1
Offset: 1

Views

Author

Leroy Quet, Jun 19 2009

Keywords

Comments

a(n) = 2^A161789(n) - 1.
a(A161790(n)) = 1.

Crossrefs

Programs

  • Maple
    A161788 := proc(n) for k from ilog2(n+1) to 0 by -1 do if n mod (2^k-1) = 0 then RETURN(2^k-1); fi; od: end: seq(A161788(n),n=1..120) ; # R. J. Mathar, Jun 27 2009

Extensions

Extended by R. J. Mathar, Jun 27 2009

A161789 a(n) is the largest integer k such that 2^k - 1 divides n.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 3, 1, 2, 1, 1, 2, 1, 3, 4, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 3, 1, 4, 5, 1, 2, 1, 3, 2, 1, 1, 2, 1, 1, 3, 1, 1, 4, 1, 1, 2, 3, 1, 2, 1, 1, 2, 1, 3, 2, 1, 1, 4, 1, 5, 6, 1, 1, 2, 1, 1, 2, 3, 1, 2, 1, 1, 4, 1, 3, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 4, 3, 1, 5, 1, 1, 2, 1, 3, 2, 1, 1, 2, 1, 1, 4
Offset: 1

Views

Author

Leroy Quet, Jun 19 2009

Keywords

Comments

The sums of the first 10^k terms, for k = 1, 2, ..., are 15, 183, 1898, 19219, 192464, 1924900, 19249110, 192491275, 1924913468, 19249135108, ... . Apparently, the asymptotic mean of this sequence is 1.924913... . - Amiram Eldar, Jun 30 2025

Crossrefs

Programs

  • Maple
    A161789 := proc(n) for k from ilog2(n+1) to 0 by -1 do if n mod (2^k-1) = 0 then RETURN(k); fi; od: end: seq(A161789(n),n=1..120) ; # R. J. Mathar, Jun 27 2009
    # Alternative:
    N:= 200: # for a(1)..a(N)
    V:= Vector(N,1):
    for k from 2 to ilog2(N) do
      t:= 2^k-1;
      V[[seq(i,i=t..N,t)]]:= k
    od:
    convert(V,list); # Robert Israel, May 12 2020
  • Mathematica
    kn[n_]:=Module[{k=Floor[Log[2,n]]+1},While[!Divisible[n,2^k-1],k--];k]; Array[kn,110] (* Harvey P. Dale, Mar 26 2012 *)
  • PARI
    a(n)=forstep(k=logint(n+1,2),1,-1, if(n%(2^k-1)==0, return(k))) \\ Charles R Greathouse IV, Aug 25 2017

Formula

A161788(n) = 2^a(n) - 1.
a(A161790(n)) = 1.
Conjecture: gcd(n, m) = a(2^n + 2^m - 2) for n > 0 and m > 0. - Velin Yanev, Aug 24 2017

Extensions

Extended by R. J. Mathar, Jun 27 2009

A368542 The number of divisors of n whose prime factors are all Mersenne primes (A000668).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 1, 3, 1, 1, 2, 1, 2, 2, 1, 1, 3, 1, 1, 4, 1, 1, 2, 1, 1, 4, 2, 1, 2, 2, 1, 2, 1, 2, 3, 1, 1, 2, 1, 1, 4, 1, 1, 3, 1, 1, 2, 3, 1, 2, 1, 1, 4, 1, 2, 2, 1, 1, 2, 1, 2, 6, 1, 1, 2, 1, 1, 2, 2, 1, 3, 1, 1, 2, 1, 2, 2, 1, 1, 5, 1, 1, 4, 1, 1, 2, 1, 1, 3, 2, 1, 4, 1, 1, 2, 1, 3, 3, 1, 1, 2, 1, 1, 4, 1, 1, 4, 1, 1, 2, 2, 1, 2, 1, 1, 3, 1, 2, 2, 1, 1, 2, 2, 1, 6
Offset: 1

Views

Author

Amiram Eldar, Dec 29 2023

Keywords

Comments

The number of terms of A056652 U {1} that divide n.

Crossrefs

Programs

  • Mathematica
    q[n_] := AllTrue[FactorInteger[n][[;; , 1]], # + 1 == 2^IntegerExponent[# + 1, 2] &]; f[p_, e_] := If[q[p], e + 1, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f=factor(n)); prod(i=1, #f~, if((f[i,1]+1) >> valuation(f[i,1]+1, 2) == 1 , f[i,2] + 1, 1))};

Formula

Multiplicative with a(p^e) = e+1 if p is a Mersenne prime (A000668), and 1 otherwise.
a(n) >= 1, with equality if and only if n is in A161790.
a(n) <= A000005(n), with equality if and only if n is in A056652 U {1}.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/Product_{k>=1} (1 - 1/A000668(k)) = 1.82292512097260346512... .

A382875 Numbers which are a multiple of 2^k - 1 for some k > 1.

Original entry on oeis.org

0, 3, 6, 7, 9, 12, 14, 15, 18, 21, 24, 27, 28, 30, 31, 33, 35, 36, 39, 42, 45, 48, 49, 51, 54, 56, 57, 60, 62, 63, 66, 69, 70, 72, 75, 77, 78, 81, 84, 87, 90, 91, 93, 96, 98, 99, 102, 105, 108, 111, 112, 114, 117, 119, 120, 123, 124, 126, 127, 129, 132, 133, 135, 138, 140
Offset: 1

Views

Author

Stefano Spezia, Apr 07 2025

Keywords

Comments

The asymptotic density of this sequence is Sum_{s subset of A000225 \ {0, 1}} (-1)^(card(s)+1)/LCM(s) = 0.45169 ... . - Amiram Eldar, Jun 30 2025

Crossrefs

Complement of A161790 in A001477.

Programs

  • Mathematica
    nmax=140; Complement[Range[0,nmax], Position[Table[DivisorSum[n, 1 &, IntegerQ@ Log2[# + 1] &], {n, nmax}], 1][[All, 1]]] (* after Michael De Vlieger, Jun 11 2018 in A161790 *)
  • PARI
    isok(k) = if(k == 0, 1, forstep(i = logint(k+1, 2), 2, -1, if(k % (2^i-1) == 0, return(1))); 0); \\ Amiram Eldar, Jun 30 2025

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

Original entry on oeis.org

1, 1, 4, 1, 1, 4, 8, 1, 4, 1, 1, 4, 1, 8, 19, 1, 1, 4, 1, 1, 11, 1, 1, 4, 1, 1, 4, 8, 1, 19, 32, 1, 4, 1, 8, 4, 1, 1, 4, 1, 1, 11, 1, 1, 19, 1, 1, 4, 8, 1, 4, 1, 1, 4, 1, 8, 4, 1, 1, 19, 1, 32, 74, 1, 1, 4, 1, 1, 4, 8, 1, 4, 1, 1, 19, 1, 8, 4, 1, 1, 4, 1, 1, 11, 1
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 19 2019

Keywords

Comments

Sum of divisors of n of the form 2^j - 1 for j >= 1.

Crossrefs

Cf. A000225, A000929, A036987, A038712, A079559, A154402, A161790 (positions of 1's).

Programs

  • Mathematica
    nmax = 85; CoefficientList[Series[Sum[(2^k - 1) x^(2^k - 1)/(1 - x^(2^k - 1)), {k, 1, Floor[Log[2, nmax]] + 1}], {x, 0, nmax}], x] // Rest
    Table[Sum[Mod[CatalanNumber[d], 2] d, {d, Divisors[n]}], {n, 1, 85}]

Formula

L.g.f.: -log(Product_{n>=1} (1 - x^(2^n - 1))) = Sum_{n>=1} a(n) * x^n / n.
exp(Sum_{n>=1} a(n) * x^n / n) = g.f. for A000929.
exp(Sum_{n>=1} (-1)^(n + 1) * a(n) * x^n / n) = g.f. for A079559.
a(n) = Sum_{d|n} A036987(d) * d.
Showing 1-6 of 6 results.