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

A070306 a(n) = 2*phi(n)/2^omega(n).

Original entry on oeis.org

2, 1, 2, 2, 4, 1, 6, 4, 6, 2, 10, 2, 12, 3, 4, 8, 16, 3, 18, 4, 6, 5, 22, 4, 20, 6, 18, 6, 28, 2, 30, 16, 10, 8, 12, 6, 36, 9, 12, 8, 40, 3, 42, 10, 12, 11, 46, 8, 42, 10, 16, 12, 52, 9, 20, 12, 18, 14, 58, 4, 60, 15, 18, 32, 24, 5, 66, 16, 22, 6, 70, 12, 72, 18, 20, 18, 30, 6, 78, 16
Offset: 1

Views

Author

Benoit Cloitre, May 12 2002

Keywords

Comments

Always an integer.

Crossrefs

Programs

  • Mathematica
    a[n_] := EulerPhi[n]/2^(PrimeNu[n] - 1); Array[a, 100] (* Amiram Eldar, Apr 29 2022 *)
  • PARI
    for(n=1,100,print1(2*eulerphi(n)/2^omega(n),","))
    
  • Python
    from sympy import totient as phi, primenu as omega
    def a(n): return 2*phi(n)//2**omega(n)
    print([a(n) for n in range(1, 43)]) # Michael S. Branicky, Apr 29 2022

Formula

Sum_{k=1..n} ~ c * n / sqrt(log(n)), where c = A271547/sqrt(Pi) (Finch and Sebah, 2006). - Amiram Eldar, Apr 29 2022

Extensions

Offset changed to 1 and a(1) inserted by Amiram Eldar, Apr 29 2022

A269472 Decimal expansion of Product_{p prime} (1-(p^2+2)/(2(p^2+1)(p+1))) / sqrt(1-1/p), a constant related to the asymptotic average number of squares modulo n.

Original entry on oeis.org

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

Views

Author

Jean-François Alcover, Apr 13 2016

Keywords

Examples

			1.2569136102101885959492115769468608949404598868075...
		

Crossrefs

Programs

  • Mathematica
    digits = 104; m0 = 100; Clear[s]; s[m_] := s[m] = Sum[(1 + 2*(-1)^n - 4*(-1)^n*ChebyshevT[n, 1/4] + 4*Switch[Mod[n, 4], 2, -1, 3, 0, 0, 1, 1, 0])/(2*n) PrimeZetaP[n], {n, 2, m}] // N[#, digits]& // Exp; s[m0]; s[m = 2 m0]; While[RealDigits[s[m], 10, digits] != RealDigits[s[m/2], 10, digits], m = 2 m; Print[m]]; RealDigits[s[m]][[1]]
    (* Second program: *)
    $MaxExtraPrecision = 1000; Clear[f]; f[p_] := (1 - (p^2 + 2)/(2 (p^2 + 1) (p + 1)))/ Sqrt[1 - 1/p]; Do[c = Rest[CoefficientList[Series[Log[f[1/x]], {x, 0, m}], x]]; Print[f[2] * Exp[N[Sum[Indexed[c, n]*(PrimeZetaP[n] - 1/2^n), {n, 2, m}], 112]]], {m, 100, 1000, 100}] (* Vaclav Kotesovec, Jun 19 2020 *)
  • PARI
    sqrt(prodeulerrat((1-(p^2+2)/(2*(p^2+1)*(p+1)))^2/(1-1/p))) \\ Amiram Eldar, May 29 2021

Extensions

Formula in name and last digit corrected by Vaclav Kotesovec, Jun 19 2020
Showing 1-2 of 2 results.