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

A340805 a(n) is the number of solutions of the equation x*(y - 1) + (2*x - y - 1)*(x mod 2) = 2*n for 0 < x <= y.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Jan 22 2021

Keywords

Comments

Also the number of times 2*n+1 appears in A340804.
Offset is 1 because the equation x*(y - 1) + (2*x - y - 1)*(x mod 2) = 0 has an infinite number of positive integer solutions satisfying the inequality x <= y, or equivalently, A005408(0) = 1 appears infinitely many times in A340804.

Examples

			a(6) = 3 since there are 3 positive integer solutions (x, y) satisfying the inequality x <= y, i.e., (2, 4), (3, 5) and (4, 7).
		

Crossrefs

Cf. A000005, A005408 (2*n+1), A038548, A340804.

Programs

  • Mathematica
    Table[Sum[Boole[d<=Floor[(1+Sqrt[1+8n])/4]]+Boole[d<=Floor[(Sqrt[1+2n]-1)/2]],{d,Divisors[n]}],{n,87}]
  • PARI
    T(n, k) = 1 + k*(n - 1) + (2*k - n - 1)*(k % 2); \\ A340804
    a(n) = sum(i=1, 2*n+1, sum(k=1, i, T(i, k) == 2*n+1)); \\ Michel Marcus, Jan 25 2021
    
  • PARI
    a(n) = sumdiv(n, d, (d <= (1 + sqrt(1 + 8*n))\4) + (d <= (sqrt(1 + 2*n) - 1)\2)); \\ Michel Marcus, Jan 25 2021

Formula

a(n) = Sum_{d|n} ([d <= floor((1 + sqrt(1 + 8*n))/4)] + [d <= floor((sqrt(1 + 2*n) - 1)/2)]), where [ ] is the Iverson bracket.
A038548(n) <= a(n) <= A000005(n).
a(p) = A000005(p) = 2 if p is a prime greater than or equal to 5.

A341829 Irregular triangle read by rows: the n-th row gives the x-values of the solutions of the equation x*(y - 1) + (2*x - y - 1)*(x mod 2) = 2*n for 0 < x <= y.

Original entry on oeis.org

2, 2, 2, 2, 3, 2, 3, 2, 3, 4, 2, 3, 2, 3, 4, 2, 3, 2, 3, 4, 2, 3, 2, 3, 4, 5, 2, 3, 2, 3, 4, 5, 2, 3, 6, 2, 3, 4, 5, 2, 3, 2, 3, 4, 5, 6, 2, 3, 2, 3, 4, 5, 2, 3, 6, 2, 3, 4, 5, 2, 3, 2, 3, 4, 5, 6, 7, 2, 3, 2, 3, 4, 5, 2, 3, 6, 7, 2, 3, 4, 5, 8, 2, 3, 2, 3, 4, 5, 6, 7
Offset: 1

Views

Author

Stefano Spezia, Feb 21 2021

Keywords

Comments

Equivalently, the n-th row gives the column indices corresponding to 2*n + 1 in the triangle A340804.

Examples

			Triangle begins:
2
2
2
2   3
2   3
2   3   4
2   3
2   3   4
2   3
2   3   4
2   3
2   3   4   5
2   3
2   3   4   5
2   3   6
2   3   4   5
2   3
2   3   4   5   6
...
		

Crossrefs

Cf. A005843, A340804, A340805 (row length or solutions number), A341830 (y-values).

Programs

  • Mathematica
    Table[Union[2Intersection[Divisors[n],Table[d,{d,Floor[(1+Sqrt[1+8n])/4]}]],2Intersection[Divisors[n],Table[d,{d,Floor[(Sqrt[1+2n]-1)/2]}]]+1],{n,30}]//Flatten

A341830 Irregular triangle read by rows: the n-th row gives the y-values of the solutions of the equation x*(y - 1) + (2*x - y - 1)*(x mod 2) = 2*n for 0 < x <= y.

Original entry on oeis.org

2, 3, 4, 3, 5, 4, 6, 4, 5, 7, 6, 8, 5, 7, 9, 8, 10, 6, 9, 11, 10, 12, 5, 7, 11, 13, 12, 14, 6, 8, 13, 15, 6, 14, 16, 7, 9, 15, 17, 16, 18, 7, 8, 10, 17, 19, 18, 20, 9, 11, 19, 21, 8, 20, 22, 10, 12, 21, 23, 22, 24, 7, 9, 11, 13, 23, 25, 24, 26, 12, 14, 25, 27, 8, 10, 26, 28
Offset: 1

Views

Author

Stefano Spezia, Feb 21 2021

Keywords

Comments

Equivalently, the n-th row gives the row indices corresponding to 2*n + 1 in the triangle A340804.

Examples

			Triangle begins:
   2
   3
   4
   3   5
   4   6
   4   5   7
   6   8
   5   7   9
   8  10
   6   9  11
  10  12
   5   7  11  13
  12  14
   6   8  13  15
   6  14  16
   7   9  15  17
  16  18
   7   8  10  17  19
  ...
		

Crossrefs

Cf. A005843, A340804, A340805 (row length or solutions number), A341829 (x-values).

Programs

  • Mathematica
    Table[Union[n/Intersection[Divisors[n],Table[d,{d,Floor[(1+Sqrt[1+8n])/4]}]]+1,n/Intersection[Divisors[n],Table[d,{d,Floor[(Sqrt[1+2n]-1)/2]}]]-1],{n,27}]//Flatten
Showing 1-3 of 3 results.