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.

User: Charles Kusniec

Charles Kusniec's wiki page.

Charles Kusniec has authored 21 sequences. Here are the ten most recent ones:

A377865 Smallest divisor of 2n-1 greater than or equal to sqrt(2n-1).

Original entry on oeis.org

1, 3, 5, 7, 3, 11, 13, 5, 17, 19, 7, 23, 5, 9, 29, 31, 11, 7, 37, 13, 41, 43, 9, 47, 7, 17, 53, 11, 19, 59, 61, 9, 13, 67, 23, 71, 73, 15, 11, 79, 9, 83, 17, 29, 89, 13, 31, 19, 97, 11, 101, 103, 15, 107, 109, 37, 113, 23, 13, 17, 11, 41, 25, 127, 43, 131, 19
Offset: 1

Author

Charles Kusniec, Nov 10 2024

Keywords

Crossrefs

Odd bisection of A033677.

Programs

  • Mathematica
    a[n_]:=Module[{k=1},While[!Divisible[2n-1,k] || kStefano Spezia, Nov 17 2024 *)

Formula

a(n) = A033677(2n-1).
a(n) = A377499(n) + A219695(n).

A377864 Largest divisor of 2n-1 less than or equal to sqrt(2n-1).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 1, 3, 1, 1, 5, 1, 7, 3, 1, 5, 3, 1, 1, 7, 5, 1, 3, 1, 1, 5, 7, 1, 9, 1, 5, 3, 1, 7, 3, 5, 1, 9, 1, 1, 7, 1, 1, 3, 1, 5, 9, 7, 11, 3, 5, 1, 3, 1, 7, 9, 1, 1, 3, 11, 5, 7, 1, 1, 9, 5, 1, 3, 7, 1, 11, 1, 13, 9
Offset: 1

Author

Charles Kusniec, Nov 10 2024

Keywords

Crossrefs

Odd bisection of A033676.

Programs

  • Mathematica
    a[n_]:=Module[{k=2n-1},While[!Divisible[2n-1,k] || k>Sqrt[2n-1] ,k--]; k]; Array[a,86] (* Stefano Spezia, Nov 17 2024 *)
  • PARI
    a(n) = {my(d = divisors(2*n-1)); d[ceil(#d/2)]} \\ Thomas Scheuerle, Nov 17 2024

Formula

a(n) = A033676(2n-1).
a(n) = A377499(n) - A219695(n).

A377499 a(n) is the median of the divisors of 2n-1.

Original entry on oeis.org

1, 2, 3, 4, 3, 6, 7, 4, 9, 10, 5, 12, 5, 6, 15, 16, 7, 6, 19, 8, 21, 22, 7, 24, 7, 10, 27, 8, 11, 30, 31, 8, 9, 34, 13, 36, 37, 10, 9, 40, 9, 42, 11, 16, 45, 10, 17, 12, 49, 10, 51, 52, 11, 54, 55, 20, 57, 14, 11, 12, 11, 22, 15, 64, 23, 66, 13, 12, 69, 70, 25, 12, 17, 14, 75, 76
Offset: 1

Author

Charles Kusniec, Oct 30 2024

Keywords

Comments

From Rémi Guillaume, Nov 26 2024 and Dec 05 2024: (Start)
2n-1 has only odd divisors; so the sum of any two of them is even.
a(n) and A219695(n) have opposite parity.
a(n) and n have the same parity.
a(n) = sqrt(2n-1) iff 2n-1 = (2j+1)^2 for some j >= 0, iff n is a centered square (A001844(j)); in this case, the two "median" divisors coincide with 2j+1, so their mean a(n) = 2j+1 and A219695(n) = 0.
More generally, with s a nonnegative integer:
If j >= s and n is the centered square A001844(j), then a(n-2s^2) <= 2j+1 and A219695(n-2s^2) <= 2s.
If j > (s^2)/2 and n = A001844(j), then a(n-2s^2) = 2j+1 and A219695(n-2s^2) = 2s. (P)
Basis of the proofs: 2(n-2s^2)-1 = (2j+1)^2-(2s)^2.
If j = s and n = A001844(j), then n-2s^2 = 2j+1 and 2(n-2s^2)-1 = 4j+1.
(End)

Examples

			From _Michael De Vlieger_, Nov 01 2024: (Start)
Let u = 2*n-1, let factor d <= sqrt(u) be the largest such, and let D = u/d.
For n = 2, u = 2*2-1 = 3, d = 1, D = 3, so a(2) = (1+3)/2 = 2.
For n = 5, u = 2*5-1 = 9 is a perfect square and d = D = 3, so a(5) = (3+3)/2 = 3.
For n = 8, u = 2*8-1 = 15, d = 3, D = 5, so a(8) = (3+5)/2 = 4, etc. (End)
		

Crossrefs

Cf. A219695 (associated subtrahend square base forming 2n-1), A001844 (solutions of a(n)=sqrt(2n-1)), A006254 (indices of record highs).

Programs

  • Mathematica
    {1}~Join~Table[u = 2*n + 1; (# + u/#)/2 &@ #[[Floor[Length[#]/2] ]] &@ Divisors[u], {n, 2, 120}] (* Michael De Vlieger, Nov 01 2024 *)
  • Python
    from sympy import divisors
    def A377499(n): return (d:=(f:=divisors(m:=(n<<1)-1))[len(f)-1>>1])+m//d>>1 # Chai Wah Wu, Nov 07 2024

Formula

a(n) = (A033677(2n-1) + A033676(2n-1))/2.
a(n) = A063655(2n-1)/2.
a(n) = sqrt((2n-1) + A219695(n)^2).
a(n) = n iff 2n-1 is 1 or prime (n is 1 or in A006254); in this case, A219695(n) = n-1.
From Rémi Guillaume, Nov 21 2024: (Start)
a(n) = A361565(2n-1).
sqrt(2n-1) <= a(n) <= n.
a(n) = (A377865(n) + A377864(n))/2.
a(n) = A377864(n) + A219695(n).
a(n) = A377865(n) - A219695(n). (End)

Extensions

New name from Rémi Guillaume, Feb 19 2025

A354776 Even numbers that are the sum of two squares; also numbers which are twice the sum of two squares.

Original entry on oeis.org

0, 2, 4, 8, 10, 16, 18, 20, 26, 32, 34, 36, 40, 50, 52, 58, 64, 68, 72, 74, 80, 82, 90, 98, 100, 104, 106, 116, 122, 128, 130, 136, 144, 146, 148, 160, 162, 164, 170, 178, 180, 194, 196, 200, 202, 208, 212, 218, 226, 232, 234, 242, 244, 250, 256, 260, 272, 274, 288, 290, 292, 296, 298, 306, 314, 320
Offset: 1

Author

N. J. A. Sloane, Jun 26 2022, following a suggestion from Charles Kusniec

Keywords

Comments

This is both the even subsequence of A001481, and twice A001481. It is an easy exercise to show that these two definitions produce the same sequence.

Crossrefs

Cf. A001481. Essentially the same as A128106.

Programs

  • Python
    from itertools import count, islice
    from sympy import factorint
    def A354776_gen(): # generator of terms
        return filter(lambda n:(lambda m:all(d & 3 != 3 or m[d] & 1 == 0 for d in m))(factorint(n//2)),count(0,2))
    A354776_list = list(islice(A354776_gen(),30)) # Chai Wah Wu, Jun 27 2022

A350576 a(n) = n/A055874(n) - A055874(n).

Original entry on oeis.org

0, -1, 2, 0, 4, -1, 6, 2, 8, 3, 10, -1, 12, 5, 14, 6, 16, 3, 18, 8, 20, 9, 22, 2, 24, 11, 26, 12, 28, 7, 30, 14, 32, 15, 34, 5, 36, 17, 38, 18, 40, 11, 42, 20, 44, 21, 46, 8, 48, 23, 50, 24, 52, 15, 54, 26, 56, 27, 58, 4, 60, 29, 62, 30, 64, 19, 66, 32, 68, 33, 70, 14, 72, 35, 74
Offset: 1

Author

Michel Marcus, Jan 07 2022, after a suggestion from Charles Kusniec

Keywords

Crossrefs

Cf. A005408 (odd numbers), A056737 (another difference n/d-d).

Programs

  • Mathematica
    a[n_] := Module[{k = 1}, While[Divisible[n, k], k++]; k--; n/k - k]; Array[a, 100] (* Amiram Eldar, Jan 07 2022 *)
  • PARI
    a4(n) = my(m=1); while ((n % m) == 0, m++); m - 1; \\ A055874
    a(n) = my(x=a4(n)); n/x - x;
    
  • Python
    def a(n):
        m = 2
        while n%m == 0: m += 1
        return n//(m-1) - (m-1)
    print([a(n) for n in range(1, 76)]) # Michael S. Branicky, Jan 07 2022

Formula

a(n) = A350509(n) - A055874(n).
a(n) = n-1 if n is odd.

A350509 a(n) = n/A055874(n).

Original entry on oeis.org

1, 1, 3, 2, 5, 2, 7, 4, 9, 5, 11, 3, 13, 7, 15, 8, 17, 6, 19, 10, 21, 11, 23, 6, 25, 13, 27, 14, 29, 10, 31, 16, 33, 17, 35, 9, 37, 19, 39, 20, 41, 14, 43, 22, 45, 23, 47, 12, 49, 25, 51, 26, 53, 18, 55, 28, 57, 29, 59, 10, 61, 31, 63, 32, 65, 22, 67, 34, 69, 35, 71, 18, 73, 37, 75
Offset: 1

Author

Michel Marcus, Jan 02 2022, after a suggestion from Charles Kusniec

Keywords

Crossrefs

Cf. A055874.

Programs

  • Mathematica
    a[n_] := Module[{k = 1}, While[Divisible[n, k], k++]; k--; n/k]; Array[a, 100] (* Amiram Eldar, Jan 02 2022 *)
  • PARI
    a(n) = my(m = 1); while ((n % m) == 0, m++); n/(m-1);
    
  • Python
    def a(n):
        m = 2
        while n%m == 0: m += 1
        return n//(m-1)
    print([a(n) for n in range(1, 80)]) # Michael S. Branicky, Jan 02 2022

A350380 Triangle read by rows in which row n lists A014963(d), the exponential of Mangoldt function, for each divisor d of n.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 2, 1, 5, 1, 2, 3, 1, 1, 7, 1, 2, 2, 2, 1, 3, 3, 1, 2, 5, 1, 1, 11, 1, 2, 3, 2, 1, 1, 1, 13, 1, 2, 7, 1, 1, 3, 5, 1, 1, 2, 2, 2, 2, 1, 17, 1, 2, 3, 1, 3, 1, 1, 19, 1, 2, 2, 5, 1, 1, 1, 3, 7, 1, 1, 2, 11, 1, 1, 23, 1, 2, 3, 2, 1, 2, 1, 1, 1, 5, 5, 1, 2, 13, 1
Offset: 1

Author

Michel Marcus, Dec 28 2021, following a suggestion from Charles Kusniec

Keywords

Examples

			Triangle begins:
  1;
  1, 2;
  1, 3;
  1, 2, 2;
  1, 5;
  1, 2, 3, 1;
  1, 7;
  1, 2, 2, 2;
  1, 3, 3;
  1, 2, 5, 1;
  ...
		

Crossrefs

Cf. A000027 (row products), A140255 (row sums).

Programs

  • Mathematica
    Table[Exp[MangoldtLambda[Divisors[n]]], {n, 1, 26}] // Flatten (* Amiram Eldar, Dec 28 2021 *)
  • PARI
    M(n) = ispower(n, , &n); if(isprime(n), n, 1); \\ A014963
    row(n) = apply(M, divisors(n));

Formula

a(n) = A014963(A027750(n)).

A319135 Irregular triangle read by rows in which row n lists the positive divisors of n that are <= sqrt(n) in decreasing order.

Original entry on oeis.org

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

Author

Charles Kusniec, Feb 27 2021

Keywords

Comments

Reversing rows gives A161906.

Examples

			Triangle begins:
1
1
1
2 1
1
2 1
1
2 1
3 1
2 1
1
3 2 1
1
2 1
3 1
4 2 1
		

Crossrefs

Cf. A038548 (row widths), A033676 (first column), A333750 (second column), A161906 (rows reversed), A027750, A056538, A061017, A340791, A340792.

Programs

  • PARI
    row(n) = Vecrev(select(x->(x<=sqrt(n)), divisors(n))); \\ Jinyuan Wang, Mar 13 2021

Formula

a(n) * A161908(n) = A340792(n)
A161906(n) * A340791(n) = A340792(n)
A027750(n) * A056538(n) = A061017(n)

Extensions

More terms from Jinyuan Wang, Mar 13 2021

A340792 List in which n appears ceiling(d(n)/2) = A038548(n) times, where d(n) is the number of divisors of n.

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12, 12, 13, 14, 14, 15, 15, 16, 16, 16, 17, 18, 18, 18, 19, 20, 20, 20, 21, 21, 22, 22, 23, 24, 24, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 28, 29, 30, 30, 30, 30, 31, 32, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 36
Offset: 1

Author

Charles Kusniec, Jan 21 2021

Keywords

Comments

The numbers in A075362 arranged in numerical order.

Examples

			Array begins:
   1
   2
   3
   4  4
   5
   6  6
   7
   8  8
   9  9
  10 10
  11
  12 12 12
  13
  14 14
  15 15
  16 16 16
  17
  18 18 18
  19
  20 20 20
  21 21
  22 22
  23
  24 24 24 24
		

Crossrefs

Cf. A038548 (row lengths), A075362, A161906, A340791, A061017 (comparable array).

Programs

  • PARI
    row(n) = my(d=divisors(n), r1=select(x->(x<=sqrt(n)), d), r2=Vecrev(select(x->(x>=sqrt(n)), d))); vector(#r1, k, r1[k]*r2[k]); \\ Michel Marcus, Jan 22 2021

Formula

T(n,k) = A161906(n,k) * A340791(n,k).

A340791 Irregular triangle read by rows in which row n lists the positive divisors of n that are >= sqrt(n) in decreasing order.

Original entry on oeis.org

1, 2, 3, 4, 2, 5, 6, 3, 7, 8, 4, 9, 3, 10, 5, 11, 12, 6, 4, 13, 14, 7, 15, 5, 16, 8, 4, 17, 18, 9, 6, 19, 20, 10, 5, 21, 7, 22, 11, 23, 24, 12, 8, 6, 25, 5, 26, 13, 27, 9, 28, 14, 7, 29, 30, 15, 10, 6, 31, 32, 16, 8, 33, 11, 34, 17, 35, 7, 36, 18, 12, 9, 6, 37, 38, 19
Offset: 1

Author

Charles Kusniec, Jan 21 2021

Keywords

Comments

Reversing rows gives A161908.

Examples

			Triangle begins:
   1
   2
   3
   4  2
   5
   6  3
   7
   8  4
   9  3
  10  5
  11
  12  6  4
  13
  14  7
  15  5
  16  8  4
  17
  18  9  6
  19
  20 10  5
  21  7
  22 11
  23
  24 12  8  6
		

Crossrefs

Cf. A038548 (row widths), A160180 (second column), A161908 (rows reversed), A340792.

Programs

  • PARI
    row(n) = Vecrev(select(x->(x>=sqrt(n)), divisors(n))); \\ Michel Marcus, Jan 22 2021