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

A349322 a(n) = Sum_{d|n} d^c(d), where c is the characteristic function of refactorable numbers (A336040).

Original entry on oeis.org

1, 3, 2, 4, 2, 5, 2, 12, 11, 5, 2, 18, 2, 5, 4, 13, 2, 32, 2, 7, 4, 5, 2, 50, 3, 5, 12, 7, 2, 9, 2, 14, 4, 5, 4, 81, 2, 5, 4, 55, 2, 9, 2, 7, 14, 5, 2, 52, 3, 7, 4, 7, 2, 34, 4, 71, 4, 5, 2, 83, 2, 5, 14, 15, 4, 9, 2, 7, 4, 9, 2, 185, 2, 5, 6, 7, 4, 9, 2, 136, 13, 5, 2, 107
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 14 2021

Keywords

Comments

For each divisor d of n, add d if d is refactorable (i.e., if the number of divisors of d divides d), otherwise add 1. For example, the divisors of 8 are 1,2,4,8 and the refactorable divisors of 8 are 1,2,8. The sum is then a(8) = 1 + 2 + 1 + 8 = 12.
Inverse Möbius transform of n^c(n), where c = A336040. - Wesley Ivan Hurt, Jun 29 2024

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, If[Divisible[#, DivisorSigma[0, #]], #, 1] &]; Array[a, 100] (* Amiram Eldar, Nov 16 2021 *)
  • PARI
    isrf(n) = n%numdiv(n)==0; \\ A336040
    a(n) = sumdiv(n, d, if (isrf(d), d, 1)); \\ Michel Marcus, Nov 16 2021

Formula

a(n) = A335182(n) + A349658(n). - Antti Karttunen, Nov 24 2021
a(p) = 2 for odd primes p. - Wesley Ivan Hurt, Nov 28 2021

A336041 Number of refactorable divisors of n.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Jul 07 2020

Keywords

Comments

Inverse Möbius transform of A336040. - Antti Karttunen, Nov 24 2021

Examples

			a(6) = 2; The divisors of 6 are {1,2,3,6}. Only two of these divisors are refactorable since d(1) = 1|1 and d(2) = 2|2, but d(3) = 2 does not divide 3 and d(6) = 4 does not divide 6.
a(7) = 1; The divisors of 7 are {1,7} and d(1) = 1|1, but d(7) = 2 does not divide 7, so a(7) = 1.
a(8) = 3; The divisors of 8 are {1,2,4,8}. 1, 2 and 8 are refactorable since d(1) = 1|1, d(2) = 2|2 and d(8) = 4|8 but d(4) = 3 does not divide 4, so a(8) = 3.
a(9) = 2; The divisors of 9 are {1,3,9}. 1 and 9 are refactorable since d(1) = 1|1 and d(9) = 3|9 but d(3) = 2 does not divide 3. Thus, a(9) = 2.
		

Crossrefs

Cf. A000005 (tau), A033950 (refactorable numbers), A336040 (refactorable characteristic), A349658 (number of nonrefactorable divisors).
Cf. also A335182, A335665.

Programs

  • Maple
    A336041 := proc(n)
        local a ;
        a := 0 ;
        for d in numtheory[divisors](n) do
            if type(d/numtheory[tau](d),integer) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A336041(n),n=1..30) ; # R. J. Mathar, Nov 24 2020
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Divisible[#, DivisorSigma[0, #]] &]; Array[a, 100] (* Amiram Eldar, Jul 08 2020 *)
  • PARI
    a(n) = sumdiv(n, d, d%numdiv(d) == 0); \\ Michel Marcus, Jul 07 2020

Formula

a(n) = Sum_{d|n} c(d), where c(n) is the refactorable characteristic of n (A336040).
a(n) = Sum_{d|n} (1 - ceiling(d/tau(d)) + floor(d/tau(d))), where tau(n) is the number of divisors of n (A000005).
a(n) = A000005(n) - A349658(n). - Antti Karttunen, Nov 24 2021
a(p) = 1 for odd primes p. - Wesley Ivan Hurt, Nov 28 2021

A335182 Sum of the refactorable divisors of n.

Original entry on oeis.org

1, 3, 1, 3, 1, 3, 1, 11, 10, 3, 1, 15, 1, 3, 1, 11, 1, 30, 1, 3, 1, 3, 1, 47, 1, 3, 10, 3, 1, 3, 1, 11, 1, 3, 1, 78, 1, 3, 1, 51, 1, 3, 1, 3, 10, 3, 1, 47, 1, 3, 1, 3, 1, 30, 1, 67, 1, 3, 1, 75, 1, 3, 10, 11, 1, 3, 1, 3, 1, 3, 1, 182, 1, 3, 1, 3, 1, 3, 1, 131, 10, 3, 1, 99
Offset: 1

Views

Author

Wesley Ivan Hurt, Jul 17 2020

Keywords

Comments

Inverse Möbius transform of n * c(n), where c(n) is the characteristic function of refactorable numbers (A336040). - Wesley Ivan Hurt, Jun 21 2024

Examples

			a(6) = 3; The divisors of 6 are {1,2,3,6}. 1 and 2 are refactorable since d(1) = 1|1 and d(2) = 2|2, so a(6) = 1 + 2 = 3.
a(7) = 1; The divisors of 7 are {1,7} and 1 is the only refactorable divisor of 7. So a(7) = 1.
a(8) = 11; The divisors of 8 are {1,2,4,8}. 1, 2 and 8 are refactorable since d(1) = 1|1, d(2) = 2|2 and d(8) = 4|8, so a(8) = 1 + 2 + 8 = 11.
a(9) = 10; The divisors of 9 are {1,3,9}. 1 and 9 are refactorable since d(1) = 1|1 and d(9) = 3|9, so a(9) = 1 + 9 = 10.
		

Crossrefs

Cf. A000005 (tau), A033950 (refactorable numbers), A336040 (refactorable characteristic), A336041 (number of refactorable divisors), A335665 (their product).
Difference of A349322 and A349658.

Programs

  • Mathematica
    a[n_] := DivisorSum[n, # &, Divisible[#, DivisorSigma[0, #]] &]; Array[a, 80] (* Amiram Eldar, Nov 24 2021 *)
  • PARI
    isr(n) = n%numdiv(n)==0; \\ A033950
    a(n) = sumdiv(n, d, if (isr(d), d)); \\ Michel Marcus, Jul 20 2020

Formula

a(n) = Sum_{d|n} d * c(d), where c = A336040.
a(n) = Sum_{d|n} d * (1 - ceiling(d/tau(d)) + floor(d/tau(d))), where tau(n) is the number of divisors of n (A000005).
a(n) = A349322(n) - A349658(n). - Antti Karttunen, Nov 24 2021
a(p) = 1 for odd primes p. - Wesley Ivan Hurt, Nov 28 2021

A335665 Product of the refactorable divisors of n.

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 1, 16, 9, 2, 1, 24, 1, 2, 1, 16, 1, 324, 1, 2, 1, 2, 1, 4608, 1, 2, 9, 2, 1, 2, 1, 16, 1, 2, 1, 139968, 1, 2, 1, 640, 1, 2, 1, 2, 9, 2, 1, 4608, 1, 2, 1, 2, 1, 324, 1, 896, 1, 2, 1, 1440, 1, 2, 9, 16, 1, 2, 1, 2, 1, 2, 1, 1934917632, 1, 2, 1, 2, 1, 2, 1, 51200
Offset: 1

Views

Author

Wesley Ivan Hurt, Jul 17 2020

Keywords

Examples

			a(6) = 2; The divisors of 6 are {1,2,3,6}. 1 and 2 are refactorable since d(1) = 1|1 and d(2) = 2|2, so a(6) = 1 * 2 = 2.
a(7) = 1; The divisors of 7 are {1,7} and 1 is the only refactorable divisor of 7. So a(7) = 1.
a(8) = 16; The divisors of 8 are {1,2,4,8}. 1, 2 and 8 are refactorable since d(1) = 1|1, d(2) = 2|2 and d(8) = 4|8, so a(8) = 1 * 2 * 8 = 16.
a(9) = 9; The divisors of 9 are {1,3,9}. 1 and 9 are refactorable since d(1) = 1|1 and d(9) = 3|9, so a(9) = 1 * 9 = 9.
		

Crossrefs

Cf. A000005 (tau), A033950 (refactorable numbers), A336040 (refactorable characteristic), A336041 (number of refactorable divisors), A335182 (their sum).
Cf. also A349322 (similar formula, but with sum instead of product).

Programs

  • Mathematica
    a[n_] := Product[If[Divisible[d, DivisorSigma[0, d]], d, 1], {d, Divisors[n]}]; Array[a, 60] (* Amiram Eldar, Nov 24 2021 *)
  • PARI
    isr(n) = n%numdiv(n)==0; \\ A033950
    a(n) = my(d=divisors(n)); prod(k=1, #d, if (isr(d[k]), d[k], 1)); \\ Michel Marcus, Jul 18 2020

Formula

a(n) = Product_{d|n} d^c(d), where c(n) is the refactorable characteristic of n (A336040).
a(n) = Product_{d|n} d^(1 - ceiling(d/tau(d)) + floor(d/tau(d))), where tau(n) is the number of divisors of n (A000005).
a(p) = 1 for odd primes p. - Wesley Ivan Hurt, Nov 28 2021

A208251 Number of refactorable numbers less than or equal to n.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Jan 12 2013

Keywords

Comments

A number is refactorable if it is divisible by the number of its divisors.

Examples

			a(1) = 1 since 1 is the first refactorable number, a(2) = 2 since there are two refactorable numbers less than or equal to 2, a(3) through a(7) = 2 since the next refactorable number is 8.
		

Crossrefs

Programs

  • Maple
    with(numtheory) a:=n->sum((1 + floor(i/tau(i)) - ceil(i/tau(i))), i=1..n);
  • Mathematica
    Accumulate[Table[If[Divisible[n, DivisorSigma[0, n]], 1, 0], {n, 1,100}]] (* Amiram Eldar, Oct 11 2023 *)
  • PARI
    a(n) = sum(i=1, n, q = i/numdiv(i); 1+ floor(q) - ceil(q)); \\ Michel Marcus, Sep 10 2018

Formula

a(n) = Sum_{i=1..n} 1 + floor(i/d(i)) - ceiling(i/d(i)), where d(n) is the number of divisors of n.

A368625 Characteristic function of non-refactorable numbers (A159973).

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 01 2024

Keywords

Crossrefs

Cf. A000005, A033950 (refactorable numbers), A054008, A159973, A336040.

Programs

  • Mathematica
    Table[(Ceiling[n/DivisorSigma[0, n]] - Floor[n/DivisorSigma[0, n]]), {n, 100}]
  • PARI
    A368625(n) = !!(n%numdiv(n)); \\ Antti Karttunen, Jan 17 2025

Formula

a(n) = ceiling(n/d(n))-floor(n/d(n)), where d(n) is the number of divisors of n (A000005).
a(n) = 1 - A336040(n).
a(n) = [A054008(n) > 0], where [ ] is the Iverson bracket. - Antti Karttunen, Jan 17 2025

Extensions

Data section extended up to a(105) by Antti Karttunen, Jan 17 2025

A368572 Number of refactorable numbers less than n that do not divide n.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Jan 06 2024

Keywords

Examples

			a(15) = 4 since there are 4 refactorable numbers that are less than 15 and do not divide 15, namely: 2, 8, 9, 12.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[(1 - Ceiling[k/DivisorSigma[0, k]] + Floor[k/DivisorSigma[0, k]]) (Ceiling[n/k] - Floor[n/k]), {k, n}], {n, 100}]

Formula

a(n) = Sum_{k=1..n} c(k) * (ceiling(n/k) - floor(n/k)), where c = A336040.

A368817 Sum of the refactorable numbers less than n that do not divide n.

Original entry on oeis.org

0, 0, 2, 0, 2, 0, 2, 0, 10, 17, 19, 17, 31, 29, 31, 21, 31, 20, 49, 47, 49, 47, 49, 27, 73, 71, 64, 71, 73, 71, 73, 63, 73, 71, 73, 32, 109, 107, 109, 99, 149, 147, 149, 147, 140, 147, 149, 103, 149, 147, 149, 147, 149, 120, 149, 139, 205, 203, 205, 191, 265, 263
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 06 2024

Keywords

Examples

			a(15) = 31. There are 4 refactorable numbers that are less than 15 that do not divide 15, namely: 2, 8, 9, 12. Their sum is 2 + 8 + 9 + 12 = 31.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[k (1 - Ceiling[k/DivisorSigma[0, k]] + Floor[k/DivisorSigma[0, k]]) (Ceiling[n/k] - Floor[n/k]), {k, n}], {n, 100}]

Formula

a(n) = Sum_{k=1..n} k * c(k) * (ceiling(n/k) - floor(n/k)), where c = A336040.

A368821 Number of compositions of n into 2 refactorable parts.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Jan 06 2024

Keywords

Examples

			a(10) = 4. There are 4 ordered ways to write 10 as the sum of two refactorable numbers: 1 + 9 = 2 + 8 = 8 + 2 = 9 + 1.
a(36) = 3. There are 3 ordered ways to write 36 as the sum of two refactorable numbers: 12 + 24 = 18 + 18 = 24 + 12.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[(1 - Ceiling[k/DivisorSigma[0, k]] + Floor[k/DivisorSigma[0, k]]) (1 - Ceiling[(n - k)/DivisorSigma[0, (n - k)]] + Floor[(n - k)/DivisorSigma[0, (n - k)]]), {k, n - 1}], {n, 100}]

Formula

a(n) = Sum_{k=1..n-1} c(k) * c(n-k), where c = A336040.
Showing 1-9 of 9 results.