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.

A070554 Number of positive integers, k, where k <= 2n+1 and gcd(k, 2n+1) = gcd(k+1, 2n+1) = 1.

Original entry on oeis.org

1, 1, 3, 5, 3, 9, 11, 3, 15, 17, 5, 21, 15, 9, 27, 29, 9, 15, 35, 11, 39, 41, 9, 45, 35, 15, 51, 27, 17, 57, 59, 15, 33, 65, 21, 69, 71, 15, 45, 77, 27, 81, 45, 27, 87, 55, 29, 51, 95, 27, 99, 101, 15, 105, 107, 35, 111, 63, 33, 75, 99, 39, 75, 125, 41, 129, 85, 27, 135, 137
Offset: 0

Views

Author

Leroy Quet, Nov 15 2000

Keywords

Crossrefs

Bisection of A058026.
Cf. A065474.

Programs

  • Maple
    A070554:=proc(n) local p, a:=2*n+1; for p in numtheory[factorset](2*n+1) do a:=a*(1-2/p) end do; a end proc: seq(A070554(n), n=0..100); # Ridouane Oudra, Aug 20 2024
  • Mathematica
    f[p_, e_] := (p-2) * p^(e-1); a[0] = 1; a[n_] := Times @@ f @@@ FactorInteger[2*n+1]; Array[a, 100, 0] (* Amiram Eldar, Jun 22 2025 *)
  • PARI
    a(n) = my(n = 2*n+1); n*prod(p=1, n, if (isprime(p) && !(n % p), (1-2/p), 1)); \\ Michel Marcus, Feb 02 2016
    
  • PARI
    a(n) = {my(f = factor(2*n+1)); prod(i=1, #f~, (f[i,1]-2) * f[i,1]^(f[i,2]-1));} \\ Amiram Eldar, Jun 22 2025

Formula

a(n) = A058026(2*n+1). - Ridouane Oudra, Aug 20 2024
Sum_{k=0..n} a(k) ~ c * n^2, where c = 2 * A065474. - Amiram Eldar, Jun 22 2025

Extensions

More terms from Sascha Kurz, Feb 02 2003