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

A385494 Total number of 1's in the decimal digits of the divisors of n.

Original entry on oeis.org

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

Views

Author

Robert Israel, Aug 27 2025

Keywords

Examples

			a(11) = 3 because of the divisors of 11, there is one 1 in 1 and two in 11.
a(60) = 4 because of the divisors of 60, there is one 1 in 1, one in 10, one in 12, one in 15 and none in the other divisors.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d; add(numboccur(1, convert(d,base,10)),d=numtheory:-divisors(n)) end proc:
    map(f, [$1..100]);
  • Mathematica
    a[n_]:=Count[IntegerDigits[Divisors[n]]//Flatten,1]; Array[a,100] (* Stefano Spezia, Aug 28 2025 *)
  • PARI
    a(n) = sumdiv(n, d, #select(x->(x==1), digits(d))); \\ Michel Marcus, Aug 28 2025
  • Python
    from sympy import divisors
    def a(n): return sum(str(d).count("1") for d in divisors(n, generator=True))
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Aug 27 2025
    

A226590 Total number of 0's in binary expansion of all divisors of n.

Original entry on oeis.org

0, 1, 0, 3, 1, 2, 0, 6, 2, 4, 1, 6, 1, 2, 1, 10, 3, 7, 2, 9, 2, 4, 1, 12, 3, 4, 3, 6, 1, 6, 0, 15, 5, 8, 4, 15, 3, 6, 3, 16, 3, 8, 2, 9, 5, 4, 1, 20, 3, 9, 5, 9, 2, 10, 3, 12, 4, 4, 1, 15, 1, 2, 4, 21, 7, 14, 4, 15, 5, 12, 3, 26, 4, 8, 6, 12, 4, 10, 2, 25, 7
Offset: 1

Views

Author

Jaroslav Krizek, Aug 31 2013

Keywords

Comments

Also total number of 0's in binary expansion of concatenation of the binary numbers that are the divisors of n written in base 2 (A182621).
a(n) = 0 iff n = 1 or n is a Mersenne prime (A000668). - Bernard Schott, Apr 22 2022

Examples

			a(8) = 6 because the divisors of 8 are [1, 2, 4, 8] and in binary: 1, 10, 100, 1000, so six 0's.
		

Crossrefs

Cf. A093653 (number of 1's in binary expansion of all divisors of n).
Cf. A182627 (number of digits in binary expansion of all divisors of n).
Cf. A182621 (concatenation of the divisors of n written in base 2).

Programs

  • Mathematica
    Table[Count[Flatten[IntegerDigits[Divisors[n], 2]], 0], {n, 81}] (* T. D. Noe, Sep 04 2013 *)
  • PARI
    a(n) = sumdiv(n, d, 1+logint(d, 2) - hammingweight(d)); \\ Michel Marcus, Apr 24 2022
  • Python
    from sympy import divisors
    def a(n): return sum(bin(d)[2:].count("0") for d in divisors(n))
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Apr 20 2022
    

Formula

a(n) = A182627(n) - A093653(n).
a(2^n) = n*(n+1)/2 = A000217(n). - Bernard Schott, Apr 22 2022

A318448 a(n) = Sum_{d|n} A294898(d), where A294898(d) = A005187(d) - sigma(d).

Original entry on oeis.org

0, 0, 0, 0, 2, -2, 3, 0, 3, 2, 7, -8, 9, 4, 4, 0, 14, -4, 15, -2, 10, 12, 18, -22, 18, 16, 13, 1, 24, -14, 25, 0, 23, 26, 24, -31, 33, 28, 27, -14, 37, -6, 38, 13, 15, 34, 41, -52, 41, 22, 40, 19, 48, -10, 42, -10, 45, 46, 53, -76, 55, 48, 29, 0, 55, 12, 63, 34, 57, 18, 66, -98, 69, 64, 42, 37, 64, 16, 73, -42, 51, 72, 78, -74, 74, 74, 73, 6
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2018

Keywords

Comments

Inverse Möbius transform of A294898.

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} A294898(d).
a(n) = A318447(n) + A294898(n).
a(n) = A318446(n) - A007429(n).
a(n) = A296075(n) - A093653(n).

A324392 a(n) is the number of divisors d of n such that A000120(d) divides n, where A000120(d) gives the binary weight of d.

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 1, 4, 1, 4, 1, 6, 1, 2, 1, 5, 1, 6, 1, 6, 3, 2, 1, 8, 1, 2, 1, 3, 1, 6, 1, 6, 2, 4, 1, 9, 1, 2, 2, 8, 1, 8, 1, 3, 1, 2, 1, 10, 1, 4, 1, 3, 1, 6, 2, 4, 2, 2, 1, 12, 1, 2, 3, 7, 1, 8, 1, 6, 2, 4, 1, 12, 1, 2, 2, 3, 1, 6, 1, 10, 2, 2, 1, 12, 1, 2, 1, 4, 1, 8, 1, 6, 1, 2, 1, 12, 1, 2, 2, 6, 1, 6, 1, 4, 4
Offset: 1

Views

Author

Antti Karttunen, Mar 05 2019

Keywords

Comments

Number of such positive integers k that both k and A000120(k) [the Hamming weight of k] divide n.

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Divisible[n, DigitCount[#, 2, 1]] &]; Array[a, 100] (* Amiram Eldar, Dec 04 2020 *)
  • PARI
    A324392(n) = sumdiv(n, d, !(n%hammingweight(d)));

Formula

a(n) = Sum_{d|n} [A000120(d) does divide n], where [ ] is the Iverson bracket.
a(n) = A000005(n) - A324393(n).
a(p) = 1 for all odd primes p.

A324393 a(n) is the number of such divisors d of n that A000120(d) does not divide n, where A000120(d) gives the binary weight of d.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 05 2019

Keywords

Comments

Number of such positive integers k that divide n but A000120(k) [the Hamming weight of k] does not divide n.

Crossrefs

Cf. A000005, A000120, A324392, A306263 (positions of zeros).

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 1 &, !Divisible[n, DigitCount[#, 2, 1]] &]; Array[a, 100] (* Amiram Eldar, Dec 04 2020 *)
  • PARI
    A324393(n) = sumdiv(n, d, !!(n%hammingweight(d)));

Formula

a(n) = Sum_{d|n} [A000120(d) does not divide n], where [ ] is the Iverson bracket.
a(n) = A000005(n) - A324392(n).
a(p) = 1 for all odd primes p.

A333618 a(n) is the total number of terms (1-digits) in the dual Zeckendorf representation of all divisors of n.

Original entry on oeis.org

1, 2, 3, 4, 3, 7, 3, 7, 6, 7, 5, 12, 4, 8, 8, 11, 5, 14, 6, 12, 9, 10, 5, 20, 7, 9, 11, 14, 6, 20, 6, 17, 11, 10, 10, 23, 6, 12, 11, 21, 5, 22, 6, 17, 17, 11, 6, 30, 8, 17, 13, 17, 8, 23, 12, 22, 13, 13, 6, 33, 7, 12, 18, 23, 12, 26, 6, 17, 13, 23, 7, 37, 7, 14
Offset: 1

Views

Author

Amiram Eldar, Mar 29 2020

Keywords

Examples

			For n = 6, its divisors are 1, 2, 3 and 6. The dual Zeckendorf representations (A104326) of the divisors are 1, 10, 11 and 111. Their total number of 1's is 1 + 1 + 2 + 3 = 7, thus a(6) = 7.
		

Crossrefs

Programs

  • Mathematica
    fibTerms[n_] := Module[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; fr];
    dualZeckSum[n_] := Module[{v = fibTerms[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] == 1 && v[[i + 1]] == 0 && v[[i + 2]] == 0, v[[i]] = 0; v[[i + 1]] = 1; v[[i + 2]] = 1; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, Total[v[[i[[1, 1]] ;; -1]]]]];
    a[n_] := DivisorSum[n, dualZeckSum[#] &]; Array[a, 100]

Formula

a(n) = Sum_{d|n} A112310(d).

A339550 Numbers k such that A339549(k) = A339549(k+1).

Original entry on oeis.org

1, 9, 85, 697, 1285, 2605, 4573, 5845, 6001, 6241, 6613, 7141, 7453, 8005, 10897, 12453, 13141, 15445, 19789, 20345, 21445, 21913, 22873, 25957, 36565, 36601, 39597, 44761, 46405, 53677, 56137, 56593, 61013, 63445, 70094, 72913, 76977, 80913, 82405, 87085, 87601
Offset: 1

Views

Author

Amiram Eldar, Dec 08 2020

Keywords

Comments

Analogous to A338452 as A339549 is analogous to A093653.

Examples

			9 is a term since A339549(9) = A339549(10) = 4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Times @@ (DigitCount[#, 2, 1] & /@ Divisors[n]); Select[Range[10000], f[#] == f[# + 1] &]

A360639 Numbers k such that k and k+2 are both A000120-perfect numbers (A175522).

Original entry on oeis.org

123, 219, 695, 1261, 1851, 1943, 3543, 5963, 7031, 7613, 7769, 7861, 10081, 11357, 11629, 12083, 13211, 13791, 14185, 15699, 15835, 15929, 16241, 18649, 20197, 20989, 22521, 23449, 23521, 23963, 24461, 27215, 27829, 28263, 28367, 29485, 29651, 30359, 30901, 31803
Offset: 1

Views

Author

Amiram Eldar, Feb 15 2023

Keywords

Comments

The smallest gap between two consecutive A000120-perfect numbers is 2.
All terms of this sequence are odd.

Examples

			123 is a term since 123 and 125 are both in A175522: A093653(123)/A000120(123) = A093653(125)/A000120(125) = 12/6 = 2.
		

Crossrefs

Subsequence of A175522.

Programs

  • Mathematica
    q[n_] := DivisorSum[n, DigitCount[#, 2, 1] &] == 2 * DigitCount[n, 2, 1]; seq[kmax_] := Module[{s = {}, k = 1, q1 = False, q2}, Do[q2 = q[k]; If[q1 && q2, AppendTo[s, k-2]]; q1 = q2, {k, 3, kmax, 2}]; s]; seq[32000]
  • PARI
    lista(kmax) = {my(is1 = 0, is2); forstep(k=1, kmax, 2, is2 = (sumdiv(k, d, hammingweight(d)) == 2*hammingweight(k)); if(is1 && is2, print1(k-2, ", ")); is1 = is2); }

A339552 Numbers k such that the product of the binary weights of the divisors of k (A339549) sets a new record.

Original entry on oeis.org

1, 3, 6, 12, 14, 15, 21, 28, 30, 42, 60, 84, 90, 120, 168, 180, 210, 252, 360, 420, 540, 630, 840, 1080, 1260, 2520, 3780, 5040, 6300, 7560, 10080, 12600, 13860, 15120, 21420, 22680, 25200, 27720, 32760, 37800, 41580, 42840, 49140, 55440, 65520, 75600, 83160
Offset: 1

Views

Author

Amiram Eldar, Dec 08 2020

Keywords

Comments

Analogous to A093687 as A339549 is analogous to A093653.
The corresponding record values of A339549 are 1, 2, 4, 8, 9, 16, 18, 27, 256, 324, ... (see the link for more values).

Crossrefs

Programs

  • Mathematica
    f[n_] := Times @@ (DigitCount[#, 2, 1] & /@ Divisors[n]); c=0; fm = 0; s = {}; Do[f1 = f[n]; If[f1 > fm, fm = f1; AppendTo[s, n]], {n, 1, 10000}]; s

A354112 Total number of 1's in binary expansion of all divisors of 2^n-1.

Original entry on oeis.org

1, 3, 4, 9, 6, 17, 8, 27, 16, 33, 20, 100, 14, 44, 42, 81, 18, 186, 20, 293, 80, 118, 38, 634, 62, 77, 64, 523, 80, 813, 32, 243, 153, 99, 154, 5031, 58, 110, 189, 1918, 67, 1624, 115, 1545, 761, 226, 120, 9366, 64, 1728, 472, 1861, 135, 2162, 945, 3471, 261, 1056, 101, 73418
Offset: 1

Views

Author

Michel Marcus, May 17 2022

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> add(add(i, i=Bits[Split](d)), d=numtheory[divisors](2^n-1)):
    seq(a(n), n=1..60);  # Alois P. Heinz, May 17 2022
  • Mathematica
    a[n_] := Total[DigitCount[Divisors[2^n - 1], 2, 1]]; Array[a, 60] (* Amiram Eldar, May 17 2022 *)
  • PARI
    a(n) = sumdiv(2^n-1, d, hammingweight(d));
    
  • Python
    # if python version < 3.10, replace d.bitcount() with bin(d).count('1')
    from sympy import divisors
    def A354112(n): return sum(d.bit_count() for d in divisors(2**n-1,generator=True)) # Chai Wah Wu, May 17 2022

Formula

a(n) = A093653(A000225(n)).
Previous Showing 21-30 of 34 results. Next