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.

Previous Showing 11-17 of 17 results.

A306257 a(n) = t for the minimal integer k > t such that k^2 mod n = t^2 is a perfect square.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Feb 13 2019

Keywords

Crossrefs

Cf. A000290, A077591, A306271 (values of k).

Programs

  • Maple
    a:= proc(n) local k; for k from (s-> `if`(s^2
    				

Formula

a(n) = 0 <=> n > 0 and n in { A000290 } union { A077591 }.

A380162 a(n) is the value of the Euler totient function when applied to the largest square dividing n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 6, 1, 1, 2, 1, 1, 1, 8, 1, 6, 1, 2, 1, 1, 1, 2, 20, 1, 6, 2, 1, 1, 1, 8, 1, 1, 1, 12, 1, 1, 1, 2, 1, 1, 1, 2, 6, 1, 1, 8, 42, 20, 1, 2, 1, 6, 1, 2, 1, 1, 1, 2, 1, 1, 6, 32, 1, 1, 1, 2, 1, 1, 1, 12, 1, 1, 20, 2, 1, 1, 1, 8, 54, 1, 1, 2, 1
Offset: 1

Views

Author

Amiram Eldar, Jan 13 2025

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, 1, (p-1)*p^(2*Floor[e/2]-1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2] == 1, 1, (f[i, 1]-1) * f[i, 1]^(2*(f[i, 2]\2)-1)));}

Formula

a(n) = A000010(A008833(n)).
a(n) >= 1, with equality if and only if n is squarefree (A005117).
a(n) <= A000010(n), with equality if and only if n is either a square (A000290) or twice an odd square (A077591 \ {1}).
Multiplicative with a(p) = 1, and a(p^e) = (p-1)*p^(2*floor(e/2)-1) if e >= 2.
Dirichlet g.f.: zeta(s) * zeta(2*s-2) / (zeta(2*s-1) * zeta(2*s)).
Sum_{k=1..n} a(k) ~ c * n^(3/2) / 3, where c = zeta(3/2)/(zeta(2)*zeta(3)) = 1.32118019580177760682... .

A380164 a(n) is the value of the Euler totient function when applied to the largest unitary divisor of n that is a square.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 1, 6, 1, 1, 2, 1, 1, 1, 8, 1, 6, 1, 2, 1, 1, 1, 1, 20, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 2, 6, 1, 1, 8, 42, 20, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 6, 32, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 20, 2, 1, 1, 1, 8, 54, 1, 1, 2, 1, 1, 1, 1, 1, 6, 1, 2, 1, 1, 1, 1, 1, 42, 6, 40
Offset: 1

Views

Author

Amiram Eldar, Jan 14 2025

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], 1, (p-1)*p^(e-1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2] % 2, 1, (f[i, 1]-1)*f[i, 1]^(f[i, 2]-1)));}

Formula

a(n) = A000010(A350388(n)).
a(n) >= 1, with equality if and only if n is an exponentially odd number (A268335).
a(n) <= A000010(n), with equality if and only if n is either a square (A000290) or twice an odd square (A077591 \ {1}).
Multiplicative with a(p^e) = (p-1)*p^(e-1) if e is even, and 1 otherwise.
Dirichlet g.f.: zeta(2*s-2) * zeta(2*s) * Product_{p prime} (1 + 1/p^s - 1/p^(2*s-1) - 1/p^(2*s) - 1/p^(3*s-2) + 1/p^(4*s-1)).
Sum_{k=1..n} a(k) ~ c * n^(3/2) / 3, where c = zeta(3) * Product_{p prime} (1 + 1/p^(3/2) - 1/p^2 - 1/p^(5/2) - 1/p^3 + 1/p^5) = 1.16404670858123447768... .

A380165 a(n) is the value of the Euler totient function when applied to the largest unitary divisor of n that is an exponentially odd number.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 6, 4, 1, 4, 10, 2, 12, 6, 8, 1, 16, 1, 18, 4, 12, 10, 22, 8, 1, 12, 18, 6, 28, 8, 30, 16, 20, 16, 24, 1, 36, 18, 24, 16, 40, 12, 42, 10, 4, 22, 46, 2, 1, 1, 32, 12, 52, 18, 40, 24, 36, 28, 58, 8, 60, 30, 6, 1, 48, 20, 66, 16, 44, 24, 70, 4, 72
Offset: 1

Views

Author

Amiram Eldar, Jan 14 2025

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], (p-1)*p^(e-1), 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2] % 2, (f[i, 1]-1)*f[i, 1]^(f[i, 2]-1), 1));}

Formula

a(n) = A000010(A350389(n)).
a(n) >= 1, with equality if and only if n is either a square (A000290) or twice and odd square (A077591 \ {1}).
a(n) <= A000010(n), with equality if and only if n is an exponentially odd number (A268335).
Multiplicative with a(p^e) = (p-1)*p^(e-1) if e is odd, and 1 otherwise.
Dirichlet g.f.: zeta(2*s-2) * zeta(2*s) * Product_{p prime} (1 - 1/p^s + 1/p^(s-1) - 1/p^(2*s-2) - 1/p^(3*s-1) + 1/p^(3*s)).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = zeta(4) * Product_{p prime} (1 - 2/p^2 + 2/p^3 - 2/p^4 + 1/p^5) = 0.50115112192510092436... .

A137933 Least common multiple of n^2 and 2.

Original entry on oeis.org

2, 4, 18, 16, 50, 36, 98, 64, 162, 100, 242, 144, 338, 196, 450, 256, 578, 324, 722, 400, 882, 484, 1058, 576, 1250, 676, 1458, 784, 1682, 900, 1922, 1024, 2178, 1156, 2450, 1296, 2738, 1444, 3042, 1600, 3362, 1764, 3698, 1936, 4050, 2116, 4418, 2304, 4802, 2500, 5202, 2704
Offset: 1

Views

Author

William A. Tedeschi, Feb 29 2008

Keywords

Crossrefs

Programs

Formula

a(n) = lcm(n^2, 2).
From R. J. Mathar, Mar 06 2008: (Start)
O.g.f.: -2x(1 + 6x^2 + x^4 + 2x^3 + 2x)/((-1+x)^3 * (x+1)^3).
a(2n) = A016742(n).
a(2n+1) = A077591(n). (End)
a(n) = n*A109043(n). - Michel Marcus, Mar 13 2018
From Amiram Eldar, Jul 06 2022: (Start)
Sum_{n>=1} 1/a(n) = 5*Pi^2/48.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/48 = -A245058. (End)

A171642 Non-deficient numbers with odd sigma such that the sum of the even divisors is twice the sum of the odd divisors.

Original entry on oeis.org

18, 162, 450, 882, 1458, 2178, 2450, 3042, 4050, 5202, 6050, 6498, 7938, 8450, 9522, 11250, 13122, 15138, 17298, 19602, 22050, 24642, 27378, 30258, 33282, 36450, 39762, 43218, 46818, 50562, 54450, 58482, 61250, 62658, 66978, 71442, 76050, 80802, 85698
Offset: 1

Views

Author

Peter Luschny, Dec 14 2009

Keywords

Comments

Numbers which are non-deficient (2n <= sigma(n)) [A023196] such that sigma(n) [A000203] is odd and the sum of the even divisors [A074400] is twice the sum of the odd divisors [A000593].
The sequence of terms which are not of the form 72*k^2 + 72*k + 18 starts: 2450, 6050, 8450, 61250, 120050, 151250, 211250, 296450.

Examples

			Divisors(18) = {1, 2, 3, 6, 9, 18}, sigma(18) = 39, and 2 + 6 + 18 = 2*(1 + 3 + 9).
		

Crossrefs

Programs

  • Maple
    with(numtheory): A171642 := proc(n) local k,s,a;
    s := sigma(n); a := add(k,k=select(x->type(x,odd),divisors(n)));
    if 3*a = s and 2*n <= s and type(s,odd) then n else NULL fi end:
  • Python
    from sympy import divisors
    A171642 = []
    for n in range(1, 10**5):
        d = divisors(n)
        s = sum(d)
        if s % 2 and 2*n <= s and s == 3*sum([x for x in d if x % 2]):
            A171642.append(n)
    # Chai Wah Wu, Aug 20 2014

A371124 a(n) is the least nonnegative integer y such that y^2 = x^2 - k*n for k and x where n > k >= 1 and n > x >= floor(sqrt(n)).

Original entry on oeis.org

0, 0, 1, 0, 2, 2, 3, 1, 0, 4, 5, 2, 6, 6, 1, 0, 8, 0, 9, 4, 2, 10, 11, 1, 0, 12, 3, 6, 14, 2, 15, 2, 4, 16, 1, 0, 18, 18, 5, 3, 20, 4, 21, 10, 2, 22, 23, 1, 0, 0, 7, 12, 26, 6, 3, 5, 8, 28, 29, 2, 30, 30, 1, 0, 4, 8, 33, 16, 10, 2, 35, 3, 36, 36, 5, 18, 2, 10
Offset: 1

Views

Author

DarĂ­o Clavijo, Mar 11 2024

Keywords

Comments

a(A000290(n)) = 0.
a(A077591(n)) = 0.
a(A005563(n)) = 1.
For each n: k = A138191(n) and x = A306284(n).

Examples

			 n  | k | x | y^2 = x^2 - k*n  | y
------------------------------------
 1  | 1 | 1 | 0^2 = 1^2 - 1*1  | 0
 2  | 2 | 2 | 0^2 = 2^2 - 2*1  | 0
 11 | 1 | 6 | 5^2 = 6^2 - 1*11 | 5
		

Crossrefs

Programs

  • Python
    from sympy.core.power import isqrt
    from sympy.ntheory.primetest import is_square
    def a(n):
      x = isqrt(n)
      while True:
        for y2 in range(x**2-n, -1, -n):
          if is_square(y2): return isqrt(y2)
        x+=1
    print([a(n) for n in range(1, 79)])
    
  • Python
    from itertools import count
    def A371124(n):
        y, a = 0, {}
        for x in count(0):
            if y in a: return a[y]
            a[y] = x
            y = (y+(x<<1)+1)%n # Chai Wah Wu, Apr 25 2024

Formula

a(n) = floor(sqrt(A306284(n)^2 - n*A138191(n))).
a(A000040(n)) = A102781(n).
Previous Showing 11-17 of 17 results.