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.

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

A336040 Characteristic function of refactorable numbers (A033950).

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Jul 07 2020

Keywords

Examples

			a(1) = 1 since d(1) = 1 and 1 divides 1.
a(2) = 1 since d(2) = 2 and 2 divides 2.
a(3) = 0 since d(3) = 2, but 2 does not divide 3.
		

Crossrefs

Cf. A000005, A033950, A054008, A336041 (inverse Möbius transform), A335182, A335665, A349322.

Programs

  • Mathematica
    a[n_] := Boole @ Divisible[n, DivisorSigma[0, n]]; Array[a, 100] (* Amiram Eldar, Jul 08 2020 *)
  • PARI
    a(n) = n%numdiv(n) == 0; \\ Michel Marcus, Jul 07 2020

Formula

a(n) = 1 - ceiling(n/d(n)) + floor(n/d(n)), where d(n) is the number of divisors of n (A000005).
a(n) = [A054008(n) == 0], where [ ] is the Iverson bracket. - Antti Karttunen, Nov 24 2021
a(p) = 0 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

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

A335756 A cup filling problem starting with 2 empty cups of sizes 3 and n, where a(n) is the number of unreachable states (see details in comments).

Original entry on oeis.org

2, 0, 2, 12, 6, 8, 22, 12, 14, 32, 18, 20, 42, 24, 26, 52, 30, 32, 62, 36, 38, 72, 42, 44, 82, 48, 50, 92, 54, 56, 102, 60, 62, 112, 66, 68, 122, 72, 74, 132, 78, 80, 142, 84, 86, 152, 90, 92, 162, 96, 98, 172, 102, 104, 182, 108, 110, 192, 114, 116, 202, 120, 122, 212, 126, 128, 222
Offset: 0

Views

Author

Wesley Ivan Hurt, Jun 20 2020

Keywords

Comments

Start with 2 empty cups of sizes 3 and n and an unlimited supply of water. For each n, we start with (0,0), which means that both cups are empty, so it takes zero steps to reach that state. We can proceed to other states (i,j) by using one of the 3 operations on each step: "fill", "pour", or "transfer".
(1) To "fill (F)", choose a cup that is not completely full and fill it to its maximum capacity (there is an unlimited supply of water).
(2) To "pour (P)", choose a cup that is not completely empty and pour it all out so that the cup becomes empty.
(3) On a "transfer (T)", one cup is poured into the other. To transfer, choose a nonempty cup to pour from and a nonfull cup to fill up. The amount that is transferred is always the largest possible amount (up to the capacity of the cup being filled).
a(n) gives the number of states, (i,j) with i = 0..3, j = 0..n that cannot be obtained by these operations from (0,0).

Examples

			a(4) = 6; for a(4) we have one cup that can hold 3 units of water and another cup that can hold n = 4 units. Starting with empty cups at (0,0), there are fourteen states that can be reached using the given operations. For example, the state (3,2) can be obtained with the sequence (0,0)->(0,4)->(3,1)->(0,1)->(1,0)->(1,4)->(3,2) by the operations F-T-P-T-F-T. However, there are six states (1,1), (2,1), (1,2), (2,2), (1,3) and (2,3) that cannot be obtained from the three operations. So a(4) = 6.
		

References

  • B. W. Jackson and D. Thoro, Applied Combinatorics with Problem Solving. Addison-Wesley, Reading, MA, 1990, Chap. 1, pp. 5-6.

Crossrefs

Programs

  • Magma
    [2*(n-1)*Sign(n mod 3)+(10*Floor(n/3)+2)*(1-Sign(n mod 3)) : n in [0..100]];
  • Mathematica
    Array[2 #2 (#1 - 1) + (10 Floor[#1/3] + 2)*(1 - #2) & @@ {#, Sign@ Mod[#, 3]} &, 67, 0] (* Michael De Vlieger, Jun 28 2020 *)

Formula

a(n) = 2*(n-1)*sign(n mod 3) + (10*floor(n/3)+2)*(1-sign(n mod 3)).
Conjectures from Colin Barker, Jun 21 2020: (Start)
G.f.: 2*(1 + x^2 + 4*x^3 + 3*x^4 + 2*x^5) / ((1 - x)^2*(1 + x + x^2)^2).
a(n) = 2*a(n-3) - a(n-6) for n > 5.
(End)

A338140 a(n) is the smallest number with n refactorable divisors.

Original entry on oeis.org

1, 2, 8, 18, 24, 36, 108, 180, 72, 216, 288, 1944, 360, 1080, 1920, 720, 1800, 2160, 5400, 1440, 6720, 3600, 12600, 4320, 16200, 5760, 12960, 38016, 13440, 45360, 35280, 10080, 21600, 28800, 67200, 51840, 215040, 20160, 30240, 97200, 50400, 64800, 144000
Offset: 1

Views

Author

Jaroslav Krizek, Oct 24 2020

Keywords

Comments

a(n) is the greedy inverse of A336041: the smallest number with exactly n divisors d such that d / tau(d) is also an integer.
Numbers 1 and 2 are only numbers m such that d / tau(d) is an integer for all divisors d of m.

Examples

			a(3) = 8 because 8 with divisors 1, 2, 4 and 8 is the smallest number with 3 refactorable divisors: 1 / tau(1) = 1, 2 / tau(2) = 1, 8 / tau(8) = 2.
		

Crossrefs

Cf. A336041, A033950 (refactorable numbers).

Programs

  • Magma
    [Min([m: m in[1..10^5] | #[d: d in Divisors(m) | IsIntegral(d / #Divisors(d))] eq n]): n in [1..12]]
  • Mathematica
    f[n_] := DivisorSum[n, 1 &, Divisible[#, DivisorSigma[0, #]] &]; m = 43; s = Table[0, {m}]; c = 0; n = 1; While[c < m, i = f[n]; If[i <= m && s[[i]] == 0, c++; s[[i]] = n]; n++]; s (* Amiram Eldar, Oct 24 2020 *)

Formula

a(n) = min{ k: A336041(k)=n}. - R. J. Mathar, Nov 24 2020
Showing 1-6 of 6 results.