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.

A337362 Number of pairs of divisors of n, (d1,d2), with d1 <= d2 such that d1 and d2 are nonconsecutive integers.

Original entry on oeis.org

1, 2, 3, 5, 3, 8, 3, 9, 6, 9, 3, 18, 3, 9, 10, 14, 3, 19, 3, 19, 10, 9, 3, 33, 6, 9, 10, 20, 3, 33, 3, 20, 10, 9, 10, 42, 3, 9, 10, 34, 3, 33, 3, 20, 21, 9, 3, 52, 6, 20, 10, 20, 3, 34, 10, 34, 10, 9, 3, 73, 3, 9, 21, 27, 10, 34, 3, 20, 10, 35, 3, 74, 3, 9, 21, 20, 10, 34, 3, 53, 15
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 24 2020

Keywords

Comments

Number of distinct rectangles that can be made using the divisors of n as side lengths and whose length is never one more than its width.

Examples

			a(6) = 8; The divisors of 6 are {1,2,3,6}. There are 8 divisor pairs, (d1,d2), with d1 <= d2 that do not contain consecutive integers. They are (1,1), (1,3), (1,6), (2,2), (2,6), (3,3), (3,6) and (6,6). So a(6) = 8.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - KroneckerDelta[i + 1, k]) (1 - Ceiling[n/k] + Floor[n/k]) (1 - Ceiling[n/i] + Floor[n/i]), {i, k}], {k, n}], {n, 100}]
  • PARI
    a(n) = sumdiv(n, d1, sumdiv(n, d2, (d1<=d2) && (d1 + 1 != d2))); \\ Michel Marcus, Aug 25 2020

Formula

a(n) = Sum_{d1|n, d2|n, d1<=d2} (1 - [d1 + 1 = d2]), where [] is the Iverson bracket.
a(n) = A337363(n) + A000005(n).
a(n) = A184389(n) - A129308(n). - Ridouane Oudra, Apr 15 2023

A337333 Number of pairs of odd divisors of n, (d1,d2), such that d1 <= d2.

Original entry on oeis.org

1, 1, 3, 1, 3, 3, 3, 1, 6, 3, 3, 3, 3, 3, 10, 1, 3, 6, 3, 3, 10, 3, 3, 3, 6, 3, 10, 3, 3, 10, 3, 1, 10, 3, 10, 6, 3, 3, 10, 3, 3, 10, 3, 3, 21, 3, 3, 3, 6, 6, 10, 3, 3, 10, 10, 3, 10, 3, 3, 10, 3, 3, 21, 1, 10, 10, 3, 3, 10, 10, 3, 6, 3, 3, 21, 3, 10, 10, 3, 3, 15, 3, 3, 10, 10
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 23 2020

Keywords

Comments

Number of distinct rectangles that can be made whose side lengths are odd divisors of n.

Examples

			a(15) = 10; There are 10 pairs of odd divisors of 15, (d1,d2), such that d1<=d2. They are: (1,1), (1,3), (1,5), (1,15), (3,3), (3,5), (3,15), (5,5), (5,15), (15,15). So a(15) = 10.
a(16) = 1; (1,1) is the only pair of odd divisors of 16, (d1,d2), such that d1<=d2. So a(16) = 1.
a(17) = 3; There are 3 pairs of odd divisors of 17, (d1,d2), such that d1<=d2. They are (1,1), (1,17) and (17,17). So a(17) = 3.
a(18) = 6; There are 6 pairs of odd divisors of 18, (d1,d2), such that d1<=d2. They are: (1,1), (1,3), (1,9), (3,3), (3,9) and (9,9). So a(18) = 6.
		

Crossrefs

Cf. A000079, A000217, A001227 (number of odd divisors), A335841.

Programs

  • Mathematica
    Table[Sum[Sum[Mod[i, 2]*Mod[k, 2] (1 - Ceiling[n/k] + Floor[n/k]) (1 - Ceiling[n/i] + Floor[n/i]), {i, k}], {k, n}], {n, 100}]
  • PARI
    A337333(n) = binomial(numdiv(n>>valuation(n,2))+1,2); \\ Antti Karttunen, Dec 12 2021

Formula

a(n) = Sum_{d1|n, d2|n, d1 and d2 odd, d1<=d2} 1.
From Bernard Schott, Aug 24 2020: (Start)
a(n) = 1 if and only if n = 2^k, k >= 0 (A000079).
a(n) = 3 if n is an odd prime. (End)
a(n) = A000217(A001227(n)). - Antti Karttunen, Dec 12 2021
Showing 1-2 of 2 results.