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 34 results. Next

A338452 Numbers k such that k and k+1 have the same total binary weight of their divisors (A093653).

Original entry on oeis.org

3, 4, 7, 20, 31, 57, 94, 98, 118, 122, 127, 201, 213, 218, 230, 242, 243, 244, 334, 384, 393, 423, 429, 481, 565, 603, 633, 694, 704, 729, 766, 844, 921, 1138, 1141, 1221, 1262, 1401, 1533, 1654, 1726, 1761, 1837, 1838, 1862, 1882, 1942, 2162, 2245, 2361, 2362
Offset: 1

Views

Author

Amiram Eldar, Oct 28 2020

Keywords

Comments

Numbers k such that A093653(k) = A093653(k+1).
The Mersenne primes (A000668) are terms since if 2^p - 1 is a prime then A093653(2^p-1) = A093653(2^p) = p+1.

Examples

			3 is a term since A093653(3) = A093653(4) = 3.
		

Crossrefs

A000668 is a subsequence.

Programs

  • Mathematica
    f[n_] := DivisorSum[n, DigitCount[#, 2, 1] &]; s = {}; f1 = f[1]; Do[f2 = f[n]; If[f1 == f2, AppendTo[s, n - 1]]; f1 = f2, {n, 2, 240}]; s

A338453 Starts of runs of 3 consecutive numbers with the same total binary weight of their divisors (A093653).

Original entry on oeis.org

3, 242, 243, 1837, 2361, 3693, 3728, 6061, 6457, 9782, 11181, 11721, 13855, 15177, 20017, 22591, 28021, 31461, 31887, 33098, 33993, 38137, 52016, 52112, 60321, 76897, 78542, 78745, 80461, 108394, 116017, 119541, 124453, 125493, 127117, 127417, 145369, 151805, 154113
Offset: 1

Views

Author

Amiram Eldar, Oct 28 2020

Keywords

Comments

Numbers k such that A093653(k) = A093653(k+1) = A093653(k+2).

Examples

			3 is a term since A093653(3) = A093653(4) = A093653(5) = 3.
		

Crossrefs

Cf. A093653.
Subsequence of A338452.
Similar sequences: A005238, A006073, A045939.

Programs

  • Mathematica
    f[n_] := DivisorSum[n, DigitCount[#, 2, 1] &]; s = {}; m = 3; fs = f /@ Range[m]; Do[If[Equal @@  fs, AppendTo[s, n - m]]; fs = Rest @ AppendTo[fs, f[n]], {n, m + 1, 155000}]; s
    SequencePosition[Table[Total[DigitCount[Divisors[n],2,1]],{n,160000}],{x_,x_,x_}][[All,1]] (* Harvey P. Dale, Feb 04 2023 *)

A338454 Starts of runs of 4 consecutive numbers with the same total binary weight of their divisors (A093653).

Original entry on oeis.org

242, 947767, 1041607, 2545015, 3275463, 8170983, 15720871, 21532430, 23752181, 25135885, 25595913, 27981703, 28226983, 30505142, 30962767, 33364805, 37264493, 49002661, 49766629, 52910454, 53408456, 57917191, 57952016, 58331576, 59230454, 60014053, 60723111, 63378005
Offset: 1

Views

Author

Amiram Eldar, Oct 28 2020

Keywords

Comments

Numbers k such that A093653(k) = A093653(k+1) = A093653(k+2) = A093653(k+3).

Examples

			242 is a term since A093653(242) = A093653(243) = A093653(244) = A093653(245) = 18.
		

Crossrefs

Cf. A093653.
Subsequence of A338452 and A338453.
Similar sequences: A006601, A045932, A045940.

Programs

  • Mathematica
    f[n_] := DivisorSum[n, DigitCount[#, 2, 1] &]; s = {}; m = 4; fs = f /@ Range[m]; Do[If[Equal @@  fs, AppendTo[s, n - m]]; fs = Rest @ AppendTo[fs, f[n]], {n, m + 1, 10^7}]; s

A338514 Numbers k such that k and k+1 are both divisible by the total binary weight of their divisors (A093653).

Original entry on oeis.org

1, 2, 54, 2119, 11100, 13727, 14382, 15799, 16399, 20159, 20950, 33421, 34617, 36328, 36396, 39400, 42198, 42438, 42650, 46253, 46873, 50370, 55368, 56600, 58793, 67013, 67320, 69023, 72325, 76057, 86393, 90781, 92906, 93216, 105909, 132088, 134028, 134823, 140466
Offset: 1

Views

Author

Amiram Eldar, Oct 31 2020

Keywords

Comments

Numbers k such that k and k+1 are both in A093705, or, equivalently, k is divisible by A093653(k) and k+1 is divisible by A093653(k+1).

Examples

			1 is a term since 1 and 2 are both terms of A093705.
		

Crossrefs

Similar sequences: A330927, A330931, A334345, A338452.

Programs

  • Mathematica
    divQ[n_] := Divisible[n, DivisorSum[n, DigitCount[#, 2, 1] &]]; q1 = divQ[1]; Reap[Do[q2 = divQ[n]; If[q1 && q2, Sow[n - 1]]; q1 = q2, {n, 2, 10^5}]][[2, 1]]
    SequencePosition[Table[If[Divisible[n,Total[DigitCount[Divisors[n],2,1]]],1,0],{n,150000}],{1,1}][[All,1]] (* Harvey P. Dale, Jun 14 2022 *)

A373092 The number of iterations of the map x -> A093653(x) that are required to reach from n to one of the fixed points, 1, 2, 3 or 6.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, May 23 2024

Keywords

Examples

			The iterations for the n = 1..7 are:
  n  a(n)  iterations
  -  ----  -----------
  1    0   1
  2    0   2
  3    0   3
  4    1   4 -> 3
  5    1   5 -> 3
  6    0   6
  7    2   7 -> 4 -> 3
		

Crossrefs

Cf. A086793 (decimal analog), A093653, A373093, A373094.

Programs

  • Mathematica
    d[n_] := DivisorSum[n, Plus @@ IntegerDigits[#, 2] &]; a[n_] := -2 + Length@ FixedPointList[d, n]; Array[a, 100]
  • PARI
    a(n) = {my(c = 0); while(6 % n, n = sumdiv(n, d, hammingweight(d)); c++); c;}

A338515 Starts of runs of 3 consecutive numbers that are divisible by the total binary weight of their divisors (A093653).

Original entry on oeis.org

1, 348515, 8612344, 29638764, 30625110, 32039808, 32130600, 32481682, 43664313, 55318282, 55503719, 59671714, 69254000, 73152296, 93470904, 100366594, 103640097, 105026790, 109038462, 109212287, 122519464, 126667271, 147208982, 162007166, 169237545, 173392238
Offset: 1

Views

Author

Amiram Eldar, Oct 31 2020

Keywords

Examples

			1 is a term since 1, 2 and 3 are terms of A093705.
		

Crossrefs

Subsequence of A338514.
Similar sequences: A154701, A330932, A334346, A338453.

Programs

  • Mathematica
    divQ[n_] := Divisible[n, DivisorSum[n, DigitCount[#, 2, 1] &]]; div = divQ /@ Range[3]; Reap[Do[If[And @@ div, Sow[k - 3]]; div = Join[Rest[div], {divQ[k]}], {k, 4, 10^7}]][[2, 1]]

A360641 Numbers k where A093653(k)/A000120(k) sets a new record.

Original entry on oeis.org

1, 2, 4, 8, 12, 16, 24, 36, 66, 72, 132, 144, 264, 420, 528, 840, 1026, 1056, 1680, 2052, 4104, 8208, 16416, 32832, 65664, 73920, 84000, 110880, 118800, 131328, 133380, 237600, 263340, 266760, 526680, 533520, 1053360, 1067040, 2106720, 2134080, 3160080, 4213440
Offset: 1

Views

Author

Amiram Eldar, Feb 15 2023

Keywords

Comments

Analogous to superabundant numbers (A004394) as A175526 is analogous to abundant numbers (A005101).
The corresponding record values are 1, 2, 3, 4, 9/2, 5, 6, 15/2, 8, 10, ... .
This sequence is infinite since A093653(k)/A000120(k) is unbounded: A093653(2^m)/A000120(2^m) = m+1 for all m >= 0.

Examples

			The values of A093653(k)/A000120(k) for k=1..10 are 1, 2, 3/2, 3, 3/2, 3, 4/3, 4, 5/2 and 3. The record values, 1, 2, 3 and 4, occur at 1, 2, 4 and 8, the first 4 terms of this sequence.
		

Crossrefs

Programs

  • Mathematica
    seq[nmax_] := Module[{s = {}, rm = 0, r}, Do[If[(r = DivisorSum[n, DigitCount[#, 2, 1] &]/DigitCount[n, 2, 1]) > rm, rm = r; AppendTo[s, n]], {n, 1, nmax}]; s]; seq[10^4]
  • PARI
    lista(kmax) = {my(rm = 0, r); for(k = 1, kmax, r = sumdiv(k, d, hammingweight(d))/hammingweight(k); if(r > rm, rm = r; print1(k, ", "))); }
    
  • Python
    # uses imports and definitions in A093653, A000120
    from itertools import count, islice
    def f(n): return A093653(n)/A000120(n)
    def agen(r=0): yield from ((m, r:=fm)[0] for m in count(1) if (fm:=f(m))>r)
    print(list(islice(agen(), 34))) # Michael S. Branicky, Feb 15 2023

A360642 a(n) is the least number k such that A093653(k)/A000120(k) = n.

Original entry on oeis.org

1, 2, 4, 8, 16, 24, 64, 66, 84, 72, 210, 132, 450, 792, 288, 264, 1044, 672, 5328, 528, 1344, 840, 1026, 1056, 4116, 1800, 4128, 2112, 5124, 3780, 6480, 2184, 3360, 8352, 11088, 8448, 4680, 50700, 4200, 4368, 20880, 8280, 13320, 13440, 12420, 4104, 46200, 8736
Offset: 1

Views

Author

Amiram Eldar, Feb 15 2023

Keywords

Comments

a(n) exists for all n >= 1 since A093653(2^(k-1))/A000120(2^(k-1)) = k for all k >= 1.
Analogous to A007539 as A175522 is analogous to perfect numbers (A000396).

Examples

			a(1) = 1 since A093653(1)/A000120(1) = 1/1 = 1.
a(2) = 2 since A093653(2)/A000120(2) = 2/1 = 2, and 2 is the least number with this property.
a(3) = 4 since A093653(4)/A000120(4) = 3/1 = 3, and 4 is the least number with this property.
		

Crossrefs

Programs

  • Mathematica
    seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n <= nmax, i = DivisorSum[n, DigitCount[#, 2, 1] &]/DigitCount[n, 2, 1]; If[IntegerQ[i] && i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; TakeWhile[s, # > 0 &]]; seq[50, 10^5]
  • PARI
    lista(len, nmax) = {my(s = vector(len), c = 0, n = 1, i); while(c < len && n <= nmax, i = sumdiv(n, d, hammingweight(d))/hammingweight(n); if(denominator(i) == 1 && i <= len && s[i] == 0, c++; s[i] = n); n++); s }
    
  • Python
    # uses imports and definitions in A093653, A000120
    from itertools import count, islice
    def f(n): q, r = divmod(A093653(n), A000120(n)); return q if r == 0 else 0
    def agen():
        n, adict = 1, dict()
        for k in count(1):
            v = f(k)
            if v not in adict: adict[v] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 48))) # Michael S. Branicky, Feb 15 2023

Formula

a(n) <= 2^(n-1).

A373093 The fixed point of the iterations of the map x -> A093653(x) that start at n.

Original entry on oeis.org

1, 2, 3, 3, 3, 6, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 6, 6, 6, 3, 6, 3, 3, 3, 3, 6, 3, 3, 6, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 6, 3, 3, 6, 6, 6, 3, 6, 3, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 6, 3
Offset: 1

Views

Author

Amiram Eldar, May 23 2024

Keywords

Comments

Except for n = 1 and 2, all terms are either 3 or 6.
Do the asymptotic densities of the occurrences of 3 and 6 exist? The numbers of occurrences of 6 for n that do not exceed 10^k, for k = 1, 2, ..., are 2, 24, 234, 2735, 25321, 242398, 2605532, 27441386, 268518855, 2561508455, ... .

Examples

			The iterations for the n = 1..7 are:
  n  a(n)  iterations
  -  ----  -----------
  1    1   1
  2    2   2
  3    3   3
  4    3   4 -> 3
  5    3   5 -> 3
  6    6   6
  7    3   7 -> 4 -> 3
		

Crossrefs

Programs

  • Mathematica
    d[n_] := DivisorSum[n, Plus @@ IntegerDigits[#, 2] &]; a[n_] := FixedPointList[d, n][[-1]]; Array[a, 100]
  • PARI
    a(n) = {while(6 % n, n = sumdiv(n, d, hammingweight(d))); n;}

A338455 Starts of runs of 5 consecutive numbers with the same total binary weight of their divisors (A093653).

Original entry on oeis.org

1307029927, 2116078861, 2665774183, 2809370965, 4108623302, 4493733751, 5333670902, 5497285284, 5679049670, 8209799382, 9665369455, 9708528486, 10353426151, 10606564910, 12777118615, 12795699493, 13660293367, 13847206214, 14351020663, 15735895813, 17912257013
Offset: 1

Views

Author

Amiram Eldar, Oct 28 2020

Keywords

Comments

Numbers k such that A093653(k) = A093653(k+1) = A093653(k+2) = A093653(k+3) = A093653(k+4).
Can 6 consecutive numbers have the same total binary weight of their divisors? If they exist, then they are larger than 10^11.

Examples

			1307029927 is a term since A093653(1307029927) = A093653(1307029928) = A093653(1307029929) = A093653(1307029930) = A093653(1307029931) = 72.
		

Crossrefs

Cf. A093653.
Subsequence of A338452, A338453 and A338454.
Similar sequences: A045933, A045941, A049051.

Programs

  • Mathematica
    f[n_] := DivisorSum[n, DigitCount[#, 2, 1] &]; s = {}; m = 5; fs = f /@ Range[m]; Do[If[Equal @@  fs, AppendTo[s, n - m]]; fs = Rest @ AppendTo[fs, f[n]], {n, m + 1, 10^7}]; s
Showing 1-10 of 34 results. Next