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

A319341 a(n) = A000010(n) - A173557(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 3, 4, 0, 0, 2, 0, 0, 0, 7, 0, 4, 0, 4, 0, 0, 0, 6, 16, 0, 16, 6, 0, 0, 0, 15, 0, 0, 0, 10, 0, 0, 0, 12, 0, 0, 0, 10, 16, 0, 0, 14, 36, 16, 0, 12, 0, 16, 0, 18, 0, 0, 0, 8, 0, 0, 24, 31, 0, 0, 0, 16, 0, 0, 0, 22, 0, 0, 32, 18, 0, 0, 0, 28, 52, 0, 0, 12, 0, 0, 0, 30, 0, 16, 0, 22, 0, 0, 0, 30, 0, 36, 40, 36, 0, 0, 0, 36, 0
Offset: 1

Views

Author

Antti Karttunen, Sep 17 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := EulerPhi[n] - Times @@ (FactorInteger[n][[;;, 1]] - 1); a[1] = 0; Array[a, 100] (* Amiram Eldar, Dec 21 2023 *)
  • PARI
    A173557(n) = factorback(apply(p -> p-1, factor(n)[, 1]));
    A319341(n) = (eulerphi(n)-A173557(n));

Formula

a(n) = A000010(n) - A173557(n).
a(n) = A318841(n) - A051953(n).
a(A005117(n)) = 0. - Ivan N. Ianakiev, Sep 18 2018
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = A059956 - A307868 = 0.136246... . - Amiram Eldar, Dec 21 2023

A344997 a(n) = A173557(n) * A344753(n).

Original entry on oeis.org

0, 2, 4, 5, 8, 24, 12, 11, 14, 64, 20, 56, 24, 120, 144, 23, 32, 78, 36, 152, 264, 280, 44, 120, 44, 384, 44, 288, 56, 672, 60, 47, 600, 640, 624, 182, 72, 792, 816, 328, 80, 1296, 84, 680, 480, 1144, 92, 248, 90, 332, 1344, 936, 104, 240, 1360, 624, 1656, 1792, 116, 1536, 120, 2040, 888, 95, 1824, 3120, 132, 1568, 2376
Offset: 1

Views

Author

Antti Karttunen, Jun 05 2021

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (p^(e + 1) - 1)/(p - 1); a[1] = 0; a[n_] := Module[{fct = FactorInteger[n], p}, p = fct[[;; , 1]]; Times @@ (p - 1)*(Times @@ f @@@ fct + n*Times @@ (1 + 1/p) - 2*n)]; Array[a, 100] (* Amiram Eldar, Dec 08 2023 *)
  • PARI
    A173557(n) = factorback(apply(p -> p-1, factor(n)[, 1]));
    A344753(n) = sumdiv(n,d,(dA344997(n) = (A173557(n)*A344753(n));

Formula

a(n) = A173557(n) * A344753(n).
a(n) = Product(p_i - 1) * [Sum_{d|n, dA008966(n/d) * d)], where p_i are distinct primes dividing n.
Sum_{k=1..n} a(k) ~ c * n^3 / 3, where c = 1/zeta(2) - 2 * A307868 + zeta(2)*zeta(3) * Product_{p prime} (1 - 2/p^2 - 1/p^3 + 1/p^4 + 3/p^5 - 2/p^6) = 0.283799589272... . - Amiram Eldar, Dec 08 2023

A367695 Numbers k such that k and k+1 are both exponentially odd numbers (A268335).

Original entry on oeis.org

1, 2, 5, 6, 7, 10, 13, 14, 21, 22, 23, 26, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 41, 42, 46, 53, 54, 55, 56, 57, 58, 61, 65, 66, 69, 70, 73, 77, 78, 82, 85, 86, 87, 88, 93, 94, 95, 96, 101, 102, 103, 104, 105, 106, 109, 110, 113, 114, 118, 119, 122, 127, 128
Offset: 1

Views

Author

Amiram Eldar, Nov 27 2023

Keywords

Comments

The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 6, 48, 478, 4734, 47195, 471707, 4716892, 47168363, 471681183, 4716806520, ... . Apparently, the asymptotic density of this sequence exists and equals Product_{p prime} (1 - 2/(p*(p+1))) = 0.47168... (A307868).

Crossrefs

Subsequence of A268335.
Cf. A307868.
Subsequences: A007674, A325058.
Similar sequences: A071318, A121495, A340152, A367696.

Programs

  • Mathematica
    expOddQ[n_] := AllTrue[FactorInteger[n][[;; , 2]], OddQ]; Select[Range[128], And @@ expOddQ /@ {#, # + 1} &]
  • PARI
    isexpodd(n) = {my(f = factor(n)); for(i=1, #f~, if (!(f[i, 2] % 2), return (0))); 1;}
    is(n) = isexpodd(n) && isexpodd(n+1)

A327666 a(n) = Sum_{k = 1..n} (-1)^(Omega(k) - omega(k)), where Omega(k) counts prime factors of k with multiplicity and omega(k) counts distinct prime factors.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Sep 21 2019

Keywords

Comments

Partial sums of A162511.

Examples

			Omega(1) = omega(1) = 0. The difference is 0, so (-1)^0 = 1, so a(1) = 1.
Omega(2) = omega(2) = 1. The difference is 0, so (-1)^0 = 1, which is added to a(1) to give a(2) = 2.
Omega(3) = omega(3) = 1. The difference is 0, so (-1)^0 = 1, which is added to a(2) to give a(3) = 3.
Omega(4) = 2 but omega(4) = 1. The difference is 1, so (-1)^1 = -1, which is added to a(3) to give a(4) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[(-1)^(PrimeOmega[k] - PrimeNu[k]), {k, n}], {n, 70}]
    f[p_, e_] := (-1)^(e - 1); Accumulate @ Table[Times @@ f @@@ FactorInteger[n], {n, 1, 100}] (* Amiram Eldar, Sep 18 2022 *)
  • PARI
    seq(n)={my(v=vector(n)); v[1]=1; for(k=2, n, v[k] = v[k-1] + (-1)^(bigomega(k)-omega(k))); v} \\ Andrew Howroyd, Sep 23 2019
    
  • Python
    from functools import reduce
    from sympy import factorint
    def A327666(n): return sum(-1 if reduce(lambda a,b:~(a^b), factorint(i).values(),0)&1 else 1 for i in range(1,n+1)) # Chai Wah Wu, Jan 01 2023

Formula

a(1) = 1, a(n) = a(n - 1) + (-1)^(Omega(n) - omega(n)) for n > 1.
a(n) ~ c * n, where c = A307868. - Amiram Eldar, Sep 18 2022

A340065 Decimal expansion of the Product_{p>=2} 1+p^2/((p-1)^2*(p+1)^2) where p are successive prime numbers A000040.

Original entry on oeis.org

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

Views

Author

Artur Jasinski, Dec 28 2020

Keywords

Comments

This is a rational number.
This constant does not belong to the infinite series of prime number products of the form: Product_{p>=2} (p^(2*n)-1)/(p^(2*n)+1),
which are rational numbers equal to zeta(4*n)/(zeta(2*n))^2 = A114362(n+1)/A114363(n+1).
This number has decimal period length 230:
1.81(0781476121562952243125904486251808972503617945007235890014471780028943
5600578871201157742402315484804630969609261939218523878437047756874095
5137481910274963820549927641099855282199710564399421128798842257597684
51519536903039073806).

Examples

			1.8107814761215629522431259...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[N[5005/2764,105]][[1]]
  • PARI
    default(realprecision,105)
    prodeulerrat(1+p^2/((p-1)^2*(p+1)^2))

Formula

Equals 5005/2764 = 5*7*11*13/(2^2*691).
Equals Product_{n>=1} 1+A000040(n)^2/A084920(n)^2.
Equals (13/9)*A340066.
From Vaclav Kotesovec, Dec 29 2020: (Start)
Equals 3/2 * (Product_{p prime} (p^6+1)/(p^6-1)) * (Product_{p prime} (p^4+1)/(p^4-1)).
Equals 7*zeta(6)^2 / (4*zeta(12)).
Equals -7*binomial(12, 6) * Bernoulli(6)^2 / (8*Bernoulli(12)). (End)
Equals Sum_{k>=1} A005361(k)/k^2. - Amiram Eldar, Jan 23 2024

A367990 Sum of the squarefree divisors of the largest unitary divisor of n that is a square.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 1, 4, 1, 1, 3, 1, 1, 1, 3, 1, 4, 1, 3, 1, 1, 1, 1, 6, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 1, 3, 8, 6, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 4, 3, 1, 1, 1, 3, 1, 1, 1, 4, 1, 1, 6, 3, 1, 1, 1, 3, 4, 1, 1, 3, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Dec 07 2023

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[EvenQ[e], p + 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, 1));}

Formula

Multiplicative with a(p^e) = p + 1 if e is even and 1 otherwise.
a(n) = A048250(A350388(n)).
a(n) = A000203(A336643(n)).
a(n) = A048250(n)/A367991(n).
a(n) >= 1, with equality if and only if n is an exponentially odd number (A268335).
Dirichlet g.f.: zeta(2*s) * Product_{p prime} (1 + 1/p^s + 1/p^(2*s-1)).
From Vaclav Kotesovec, Apr 20 2025: (Start)
Dirichlet g.f.: zeta(s) * zeta(2*s-1) * Product_{p prime} ((p^(2*s) - p) * (p^(2*s) + p^s + p) / ((p^s+1) * p^(3*s))).
Let f(s) = Product_{p prime} ((p^(2*s)-p) * (p^(2*s)+p^s+p) / ((p^s+1) * p^(3*s))).
Sum_{k=1..n} a(k) ~ f(1) * n * (log(n) + 3*gamma - 1 + f'(1)/f(1)) / 2, where
f(1) = A307868 = Product_{p prime} (1 - 2/(p*(p+1))) = 0.4716806136129978680752356330804820874259263820069868836357372554177321167...
f'(1) = f(1) * Sum_{p prime} (7*p + 5) * log(p) / ((p-1)*(p+1)*(p+2)) = f(1) * 3.0570993566532132522378281945383016697995408795919384628849894110222383828...
and gamma is the Euler-Mascheroni constant A001620. (End)

A332845 a(n) = (-1)^omega(n) * Sum_{k=1..n} (-1)^omega(n/gcd(n, k)), where omega = A001221.

Original entry on oeis.org

1, 0, 1, 2, 3, 0, 5, 6, 7, 0, 9, 2, 11, 0, 3, 14, 15, 0, 17, 6, 5, 0, 21, 6, 23, 0, 25, 10, 27, 0, 29, 30, 9, 0, 15, 14, 35, 0, 11, 18, 39, 0, 41, 18, 21, 0, 45, 14, 47, 0, 15, 22, 51, 0, 27, 30, 17, 0, 57, 6, 59, 0, 35, 62, 33, 0, 65, 30, 21, 0, 69, 42, 71
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 26 2020

Keywords

Crossrefs

Cf. A000010, A001221, A016825 (positions of 0's), A049060, A058026, A074722, A076479, A307868.

Programs

  • Mathematica
    Table[(-1)^PrimeNu[n] Sum[(-1)^PrimeNu[n/GCD[n, k]], {k, 1, n}], {n, 1, 73}]
    Table[(-1)^PrimeNu[n] Sum[(-1)^PrimeNu[d] EulerPhi[d], {d, Divisors[n]}], {n, 1, 73}]
    f[p_, e_] := p^e - 2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; s = Array[a, 100] (* Amiram Eldar, Nov 01 2022 *)
  • PARI
    a(n) = (-1)^omega(n) * sum(k=1, n, (-1)^omega(n/gcd(n, k))); \\ Michel Marcus, Feb 26 2020
    
  • PARI
    a(n) = {my(f = factor(n)); prod(i=1, #f~, f[i,1]^f[i,2] - 2); } \\ Amiram Eldar, Nov 01 2022

Formula

a(n) = (-1)^omega(n) * Sum_{d|n} (-1)^omega(d) * phi(d).
a(p) = p - 2, where p is prime.
From Amiram Eldar, Nov 01 2022: (Start)
Multiplicative with a(p^e) = p^e - 2.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} (1 - 2/(p*(p+1))) = A307868 / 2 = 0.2358403068... . (End)

A340066 Decimal expansion of the Product_{p>=3} 1+p^2/((p-1)^2*(p+1)^2) where p are successive prime numbers A000040.

Original entry on oeis.org

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

Views

Author

Artur Jasinski, Dec 28 2020

Keywords

Comments

This is a rational number.
This constant does not belong to the infinite series of prime number products of the form: Product_{p>=2} (p^(2*n)-1)/(p^(2*n)+1),
which are rational numbers equal to zeta(4*n)/zeta^2(2*n) = A114362(n+1)/A114363(n+1).
This number has decimal period length 230:
1.25(3617945007235890014471780028943560057887120115774240231548480463096960
9261939218523878437047756874095513748191027496382054992764109985528219
9710564399421128798842257597684515195369030390738060781476121562952243
12590448625180897250).

Examples

			1.25361794500723589001447178...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[N[3465/2764, 105]][[1]]
  • PARI
    default(realprecision, 105)
    prodeulerrat(1+p^2/((p-1)^2*(p+1)^2),1,3)

Formula

Equals 3465/2764 = 3^2*5*7*11/(2^2*691).
Equals Product_{n>=2} 1+A000040(n)^2/A084920(n)^2.
Equals (9/13)*A340065.

A367822 Decimal expansion of the asymptotic mean of psi(k)/phi(k), where psi(k) is the Dedekind psi function (A001615) and phi(k) is the Euler totient function (A000010).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Dec 02 2023

Keywords

Examples

			3.27957715098478360737291949891463398399913070810526...
		

Crossrefs

Cf. A000010, A001615, A013661, A307868 (mean of the inverse ratio).

Programs

  • Mathematica
    $MaxExtraPrecision = 1000; m = 1000; c = LinearRecurrence[{2, -3, 2}, {0, 4, 6}, m]; RealDigits[2 * Exp[NSum[Indexed[c, n]*(PrimeZetaP[n] - 1/2^n)/n, {n, 2, m}, NSumTerms -> m, WorkingPrecision -> m]], 10, 100][[1]]
  • PARI
    prodeulerrat(1 + 2/(p*(p-1)))

Formula

Equals lim_{m->oo} (1/m) * Sum_{k=1..m} psi(k)/phi(k).
Equals Product_{p prime} (1 + 2/(p*(p-1))).
Equals zeta(2) * Product_{p prime} (1 + 1/p^2 + 2/p^3).
Previous Showing 11-19 of 19 results.