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

A336915 a(n) is the exponent of the least power of 2 that when multiplied by n, makes the product nondeficient, or -1 if n itself is a power of 2.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 08 2020

Keywords

Comments

Number of iterations of x -> 2x needed before the result is nondeficient (sigma(x) >= 2x), when starting from x=n, or -1 if a nondeficient number would never be reached (when n is a power of 2).
If neither x and y are powers of 2, and gcd(x,y) = 1, then a(x*y) <= min(a(x),a(y)). Compare to a similar comment in A336835.

Crossrefs

Cf. A000523, A005940, A336834, A336916 (same sequence + 1).
Cf. also A279048, A336835.

Programs

  • Mathematica
    a[n_] := Module[{e = IntegerExponent[n, 2], s}, If[n == 2^e, -1, s = DivisorSigma[-1, n/2^e]; Max[Ceiling[Log2[s/(s - 1)]] - e - 1, 0]]]; Array[a, 100] (* Amiram Eldar, Apr 01 2024 *)
  • PARI
    A336915(n) = if(!bitand(n,n-1), -1, for(i=0,oo,my(n2 = n+n); if(sigma(n) >= n2, return(i)); n = n2));

Formula

For odd primes p, a(p) = A000523(p).

A336916 One more than the number of iterations of x -> 2x needed before the result is nondeficient, when starting from x=n; a(n) = 0, when n is a power of 2.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 08 2020

Keywords

Comments

See comments in A336915.

Crossrefs

One more than A336915.
Cf. also A279048, A336835.

Programs

  • Mathematica
    a[n_] := Module[{e = IntegerExponent[n, 2], s}, If[n == 2^e, 0, s = DivisorSigma[-1, n/2^e]; Max[Ceiling[Log2[s/(s - 1)]] - e, 1]]]; Array[a, 100] (* Amiram Eldar, Apr 01 2024 *)
  • PARI
    A336916(n) = if(!bitand(n,n-1), 0, for(i=1,oo,my(n2 = n+n); if(sigma(n) >= n2, return(i)); n = n2));
Showing 1-2 of 2 results.