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 21-30 of 128 results. Next

A038567 Denominators in canonical bijection from positive integers to positive rationals <= 1.

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16
Offset: 0

Views

Author

Keywords

Comments

n occurs phi(n) times (cf. A000010).
Least k such that phi(1) + phi(2) + phi(3) + ... + phi(k) >= n. - Benoit Cloitre, Sep 17 2002
Sum of numerator and denominator of fractions arranged by Cantor's ordering (1/1, 2/1, 1/2, 1/3, 3/1, 4/1, 3/2, 2/3, 1/4, 1/5, 5/1, 6/1, ...) with equivalent fractions removed. - Ron R. King, Mar 07 2009 [This applies to a(1, 2, ...) without initial term a(0) = 1 which could correspond to 0/1. - Editor's Note.]
Care has to be taken in considering the offset which may be 0 or 1 in related sequences (see crossrefs), e.g., A038568 & A038569 also have offset 0, in A038566 offset has been changed to 1. - M. F. Hasler, Oct 18 2021

Examples

			Arrange fractions by increasing denominator then by increasing numerator: 1/1, 1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5, ...: this is A038566/A038567.
		

References

  • S. Cook, Problem 511: An Enumeration Problem, Journal of Recreational Mathematics, Vol. 9:2 (1976-77), 137. Solution by the Problem Editor, JRM, Vol. 10:2 (1977-78), 122-123.
  • Hans Lauwerier, Fractals, Princeton University Press, 1991, p. 23.

Crossrefs

A054427 gives mapping to Stern-Brocot tree.
Cf. A037162.

Programs

  • Haskell
    import Data.List (genericTake)
    a038567 n = a038567_list !! n
    a038567_list = concatMap (\x -> genericTake (a000010 x) $ repeat x) [1..]
    -- Reinhard Zumkeller, Dec 16 2013, Jul 29 2012
    
  • Maple
    with (numtheory): A038567 := proc (n) local sum, k; sum := 1: k := 2: while (sum < n) do: sum := sum + phi(k): k := k + 1: od: RETURN (k-1): end: # Ulrich Schimke (ulrschimke(AT)aol.com)
  • Mathematica
    a[n_] := (k = 0; While[ Total[ EulerPhi[ Range[k]]] <= n, k++]; k); Table[ a[n], {n, 0, 77}] (* Jean-François Alcover, Dec 08 2011, after Pari *)
    Flatten[Table[Table[n,{EulerPhi[n]}],{n,20}]] (* Harvey P. Dale, Mar 12 2013 *)
  • PARI
    a(n)=if(n<0,0,s=1; while(sum(i=1,s,eulerphi(i))
    				
  • Python
    from sympy import totient
    def a(n):
        s=1
        while sum(totient(i) for i in range(1, s + 1))Indranil Ghosh, May 23 2017
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A002088(n): # based on second formula in A018805
        if n == 0:
            return 0
        c, j = 0, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*((A002088(k1)<<1)-1)
            j, k1 = j2, n//j2
        return n*(n-1)-c+j>>1
    def A038567(n):
        kmin, kmax = 0, 1
        while A002088(kmax) <= n:
            kmax <<= 1
        kmin = kmax>>1
        while True:
            kmid = kmax+kmin>>1
            if A002088(kmid) > n:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Jun 10 2025

Formula

From Henry Bottomley, Dec 18 2000: (Start)
a(n) = A020652(n) + A020653(n) for all n > 0, e.g., a(1) = 2 = 1 + 1 = A020652(1) + A020653(1). [Corrected and edited by M. F. Hasler, Dec 10 2021]
n = a(A015614(n)) = a(A002088(n)) - 1 = a(A002088(n-1)). (End)
a(n) = A002024(A169581(n)). - Reinhard Zumkeller, Dec 02 2009
a(A002088(n)) = n for n > 1. - Reinhard Zumkeller, Jul 29 2012
a(n) = A071912(2*n+1). - Reinhard Zumkeller, Dec 16 2013
a(n) ~ c * sqrt(n), where c = Pi/sqrt(3) = 1.813799... (A093602). - Amiram Eldar, Dec 27 2024

Extensions

More terms from Erich Friedman

A001088 Product of totient function: a(n) = Product_{k=1..n} phi(k) (cf. A000010).

Original entry on oeis.org

1, 1, 1, 2, 4, 16, 32, 192, 768, 4608, 18432, 184320, 737280, 8847360, 53084160, 424673280, 3397386240, 54358179840, 326149079040, 5870683422720, 46965467381760, 563585608581120, 5635856085811200, 123988833887846400, 991910671102771200, 19838213422055424000
Offset: 0

Views

Author

Keywords

Comments

a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = gcd(i,j) for 1 <= i,j <= n [Smith and Mansion]. - Avi Peretz (njk(AT)netvision.net.il), Mar 20 2001
The matrix M(i,j) = gcd(i,j) is sequence A003989. - Michael Somos, Jun 25 2012

Examples

			a(2) = 1 because the matrix M is: [1,1; 1,2] and det(A) = 1.
		

References

  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 2, p. 598.
  • M. Petkovsek et al., A=B, Peters, 1996, p. 21.

Crossrefs

Programs

Formula

a(n) = phi(1) * phi(2) * ... * phi(n).
Limit_{n->infinity} a(n)^(1/n) / n = exp(-1) * A124175 = 0.205963050288186353879675428232497466485878059342058515016427881513657493... (see Mathoverflow link). - Vaclav Kotesovec, Jun 09 2021

Extensions

a(0)=1 prepended by Alois P. Heinz, Jul 19 2023

A020652 Numerators in canonical bijection from positive integers to positive rationals.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 3, 4, 1, 5, 1, 2, 3, 4, 5, 6, 1, 3, 5, 7, 1, 2, 4, 5, 7, 8, 1, 3, 7, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 5, 7, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 3, 5, 9, 11, 13, 1, 2, 4, 7, 8, 11, 13, 14, 1, 3, 5, 7, 9, 11, 13, 15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 5
Offset: 1

Views

Author

Keywords

Comments

a(A002088(n)) = 1 for n > 1. - Reinhard Zumkeller, Jul 29 2012
When read as an irregular table with each 1 entry starting a new row, then the n-th row consists of the set of multiplicative units of Z_{n+1}. These rows form a group under multiplication mod n. - Tom Edgar, Aug 20 2013
The pair of sequences A020652/A020653 is defined by ordering the positive fractions p/q (reduced to lowest terms) by increasing p+q, then increasing p: 1/1; 1/2, 2/1; 1/3, 3/1; 1/4, 2/3, 3/2, 4/1; 1/5, 5/1; 2/5, 3/4, 4/3, 5/2; etc. For given p+q, there are A000010(p+q) fractions, listed starting at index A002088(p+q-1). - M. F. Hasler, Mar 06 2020

Examples

			Arrange positive fractions < 1 by increasing denominator then by increasing numerator: 1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5, 4/5, 1/6 ... (this is A020652/A038567). - _William Rex Marshall_, Dec 16 2010
		

References

  • S. Cook, Problem 511: An Enumeration Problem, Journal of Recreational Mathematics, Vol. 9:2 (1976-77), 137. Solution by the Problem Editor, JRM, Vol. 10:2 (1977-78), 122-123.
  • Richard Courant and Herbert Robbins. What Is Mathematics?, Oxford, 1941, pp. 79-80.
  • H. Lauwerier, Fractals, Princeton Univ. Press, p. 23.

Crossrefs

Essentially the same as A038566, which is the main entry for this sequence.
A054424 gives mapping to Stern-Brocot tree.
Cf. A037161.

Programs

  • Haskell
    a020652 n = a020652_list !! (n-1)
    a020652_list = map fst [(u,v) | v <- [1..], u <- [1..v-1], gcd u v == 1]
    -- Reinhard Zumkeller, Jul 29 2012
    
  • Maple
    with (numtheory): A020652 := proc (n) local sum, j, k; sum := 0: k := 2: while (sum < n) do: sum := sum + phi(k): k := k + 1: od: sum := sum - phi(k-1): j := 1; while sum < n do: if gcd(j,k-1) = 1 then sum := sum + 1: fi: j := j+1: od: RETURN (j-1): end: # Ulrich Schimke (ulrschimke(AT)aol.com), Nov 06 2001
  • Mathematica
    Reap[Do[If[GCD[num, den] == 1, Sow[num]], {den, 1, 20}, {num, 1, den-1}] ][[2, 1]] (* Jean-François Alcover, Oct 22 2012 *)
  • PARI
    a(n)=my(s,j=1,k=1);while(sCharles R Greathouse IV, Feb 07 2013
    
  • Python
    from sympy import totient, gcd
    def a(n):
        s=0
        k=2
        while sIndranil Ghosh, May 23 2017, after Ulrich Schimke's MAPLE code

A104141 Decimal expansion of 3/Pi^2.

Original entry on oeis.org

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

Views

Author

Lekraj Beedassy, Mar 07 2005

Keywords

Comments

3/Pi^2 is the limit of (Sum_{k=1..n} phi(k))/n^2, where phi(k) is Euler's totient A000010(k), i.e., of A002088(n)/A000290(n) as n tends to infinity.
The previous comment in the context of Farey series means that the length of the n-th Farey series can be approximated by multiplying this constant by n^2, "and that the approximation gets proportionally better as n gets larger", according to Conway and Guy. - Alonso del Arte, May 28 2011
The asymptotic density of the sequences of squarefree numbers with even number of prime factors (A030229), odd number of prime factors (A030059), and coprime to 6 (A276378). - Amiram Eldar, May 22 2020

Examples

			3/Pi^2 = 0.303963550927013314331638389629...
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, New York: Springer-Verlag, 1995, p. 156.
  • L. E. Dickson, History of the Theory of Numbers, Vol. I pp. 126 Chelsea NY 1966.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 184.

Crossrefs

Programs

Formula

Equals Sum_{n>=1} 1/A039956(n)^2. - Amiram Eldar, May 22 2020
From Terry D. Grant, Oct 31 2020: (Start)
Equals (-1)*zeta(0)/zeta(2).
Equals 1/(zeta(2)/2).
Equals 1/A195055.
Equals (1/2)*Sum_{k>=1} mu(k)/k^2. (End)
From Hugo Pfoertner, Apr 23 2024: (Start)
Equals A059956/2.
Equals A082020/5. (End)

Extensions

More terms from Ryan Propper, Aug 04 2005

A015614 a(n) = -1 + Sum_{i=1..n} phi(i).

Original entry on oeis.org

0, 1, 3, 5, 9, 11, 17, 21, 27, 31, 41, 45, 57, 63, 71, 79, 95, 101, 119, 127, 139, 149, 171, 179, 199, 211, 229, 241, 269, 277, 307, 323, 343, 359, 383, 395, 431, 449, 473, 489, 529, 541, 583, 603, 627, 649, 695, 711, 753, 773, 805, 829, 881, 899, 939, 963
Offset: 1

Views

Author

Keywords

Comments

Number of elements in the set {(x,y): 1 <= x < y <= n, 1=gcd(x,y)}. - Michael Somos, Jun 13 1999
Number of fractions in (Haros)-Farey series of order n.
The asymptotic limit for the sequence is a(n) ~ 3*n^2/Pi^2. - Martin Renner, Dec 12 2011
2*a(n) is the number of proper fractions reduced to lowest terms with numerator and denominator less than or equal to n in absolute value. - Stefano Spezia, Aug 09 2019

Examples

			x^2 + 3*x^3 + 5*x^4 + 9*x^5 + 11*x^6 + 17*x^7 + 21*x^8 +27*x^9 + ...
		

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966, pp. 170-171.

Crossrefs

Column k=2 of triangle A186974.

Programs

  • GAP
    List([1..60],n->Sum([1..n],i->Phi(i)))-1; # Muniru A Asiru, Jul 31 2018
    
  • Haskell
    a015614 = (subtract 1) . a002088  -- Reinhard Zumkeller, Jul 29 2012
    
  • Magma
    [-1+&+[EulerPhi(i): i in [1..n]]:n in [1..56]]; // Marius A. Burtea, Aug 09 2019
    
  • Maple
    with(numtheory): a:=n->add(phi(i),i=1..n): seq(a(n)-1,n=1..60); # Muniru A Asiru, Jul 31 2018
  • Mathematica
    Table[Sum[EulerPhi[m],{m,1,n}]-1,{n,1,56}] (* Geoffrey Critzer, May 16 2014 *)
    Table[Length[FareySequence[n]]-2,{n,60}] (* Harvey P. Dale, Jan 30 2025 *)
  • PARI
    {a(n) = if( n<1, 0, sum(k=1,n,eulerphi(k), -1))} /* Michael Somos, Sep 06 2013 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A015614(n): # based on second formula in A018805
        if n == 0:
            return -1
        c, j = 2, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*(2*A015614(k1)+1)
            j, k1 = j2, n//j2
        return (n*(n-1)-c+j)//2 # Chai Wah Wu, Mar 24 2021

Formula

a(n) = -1 + A002088(n).
a(n) = (A018805(n) - 1)/2. - Reinhard Zumkeller, Apr 08 2006
For n > 1: A214803(a(n)) = A165900(n-1). - Reinhard Zumkeller, Jul 29 2012
a(n) = A018805(n) - A002088(n). - Reinhard Zumkeller, Jan 21 2013
G.f.: (1/(1 - x)) * (-x + Sum_{k>=1} mu(k) * x^k / (1 - x^k)^2). - Ilya Gutkovskiy, Feb 14 2020
a(n) = A000217(n-1) - A185670(n). - Hossein Mahmoodi, Jan 20 2022

Extensions

More terms from Reinhard Zumkeller, Apr 08 2006

A048290 Numbers m that divide Sum_{k=1..m} phi(k).

Original entry on oeis.org

1, 2, 5, 6, 16, 25, 36, 249, 617, 1296, 13763, 76268, 189074, 783665, 1102394, 3258466, 3808854, 7971034, 15748051, 27746990, 41846733, 153673168, 195853251, 302167272, 402296412, 732683468, 807656448, 844492262, 848152352, 1122039882, 2258200198, 2438160726
Offset: 1

Views

Author

Keywords

Comments

The odd terms of this sequence and A063986 are the same. - Jud McCranie, Jun 26 2005

Examples

			Euler sums are *1*, *2*, 4, 6, *10*, *12*, ..., *80*, ..., *510624*,... for n=1, 2, 3, 4, 5, 6, ..., 16, ...., 1296, ...
		

Crossrefs

Cf. A000010, A002088. See A063986 for n divides Sum_{k=1..n} k-phi(k).

Programs

  • Mathematica
    s = 0; Do[s = s + EulerPhi[n]; If[IntegerQ[s/n], Print[n]], {n, 1, 10^8}]
  • PARI
    list(lim)=my(v=List(),s); for(k=1,lim, s+=eulerphi(k); if(s%k==0, listput(v, k))); Vec(v) \\ Charles R Greathouse IV, Feb 07 2017

Formula

Sum_{k=1..m} phi(k) is about (3/Pi^2)*m^2 [cf. A002088, first formula].
Not obviously infinite; rough heuristics predict about 3/2 log(N) terms less than N, log(N) even ones and log(N)/2 odd ones.

Extensions

10 more terms computed by Dean Hickerson
One more term from Robert G. Wilson v, Sep 07 2001
More terms from Naohiro Nomoto, Mar 22 2002
5 more terms from Jud McCranie, Jun 21 2005

A005598 a(n) = 1 + Sum_{i=1..n} (n-i+1)*phi(i).

Original entry on oeis.org

1, 2, 4, 8, 14, 24, 36, 54, 76, 104, 136, 178, 224, 282, 346, 418, 498, 594, 696, 816, 944, 1084, 1234, 1406, 1586, 1786, 1998, 2228, 2470, 2740, 3018, 3326, 3650, 3994, 4354, 4738, 5134, 5566, 6016, 6490, 6980, 7510, 8052, 8636, 9240, 9868, 10518, 11214
Offset: 0

Views

Author

Keywords

Comments

Number of possible interleaving orders for n consecutive distinct values from two arithmetic progressions. ABABBBA is impossible, for example, because "ABA" implies that the spacing between B's must be greater than 1/2 the spacing between A's. But "ABBBA" implies that the B-spacing must be less than 1/2 the A-spacing. - Allan C. Wechsler, Mar 16 2005. Since the interchange of A's and B's gives essentially the same order pattern, all terms will be even for n>0.
The SemialgebraicComponents procedure in the Algebra`AlgebraicInequalities` package of Mathematica may be used to determine whether a particular pattern is possible. - John W. Layman, Mar 30 2005
Also, "digital lines": number of straight binary strings of length n [Dorst]. This was the original source for this sequence.
Also, the number of finite Sturmian words of length n. The considered orders are exactly the balanced words, which have been proved to be the factors of Sturmian sequences. An explicit formula was exhibited by Mignosi in 1991. Berstel and Pocchiola gave a geometric proof of this, using Euler's function for counting partitions of a unit cube. - Damien Jamet (jamet(AT)lirmm.fr), Apr 01 2005
The first difference of a(n) is the number of 'special' words, prefix of two Sturmian words of length n+1; see A002088. The second difference of a(n) is the number of palindromic 'bispecial' words, prefix and suffix of two Sturmian words of length n+1; see A000010. - Fred Lunnon, Sep 05 2010
Conjectured to be the number of regions in a Farey fan of order n. See A360042 for further details. - Scott R. Shannon, Jan 24 2023

Examples

			a(4) = 14 because of the 16 possible four-letter words from an alphabet of two letters, only AABB and BBAA are not possible interleaving orders for two arithmetic progressions.
For n=7, the pattern BAAAABA gives a possible ordering for the two arithmetic progressions {A, A+a, A+2a, A+3a,...} and {B, B+b, B+2b, B+3b,...} if the system of inequalities {a>0, b>0, A<B, B < A+a, A+4a<B+b, B+b < A+5a, A+5a<B+2b} has a solution. (Note: A<B is included to preclude a fifth A-term from lying between the two B-terms; similarly, A+5a<B+2b is included to preclude a second B-term from lying between the final two A-terms.) The SemialgebraicComponents procedure gives the solution {A,a,B,b}={0,1,1/8,4}; thus BAAAABA is one of the 54 possible orders of length 7. - _John W. Layman_, Mar 30 2005
		

References

  • L. Dorst and A. W. M. Smeulders, Discrete straight line segments: parameters, primitives and properties. Vision geometry (Hoboken, NJ, 1989), 45-62, Contemp. Math., 119, Amer. Math. Soc., Providence, RI, 1991.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a005598 n = 1 + sum (zipWith (*) [n, n - 1 .. 1] a000010_list)
    -- Reinhard Zumkeller, Apr 14 2013
    
  • Magma
    A005598:= func< n | n eq 0 select 1 else 1 +(&+[(n-j+1)*EulerPhi(j): j in [1..n]]) >;
    [A005598(n): n in [0..60]]; // G. C. Greubel, Dec 07 2022
    
  • Maple
    f:= m -> add((m-i+1)*phi(i),i=1..m)+1; (Jamet)
  • Mathematica
    Accumulate@Accumulate@EulerPhi@Range[0,100]+1 (* Vladimir Joseph Stephan Orlovsky, Apr 21 2011 *)
    Nest[Accumulate[#]&,EulerPhi[Range[0,50]],2]+1 (* Harvey P. Dale, Feb 07 2015 *)
  • PARI
    a(n) = 1 + sum(i=1, n, (n-i+1)*eulerphi(i)); \\ Michel Marcus, Aug 04 2016
    
  • SageMath
    @CachedFunction
    def A005598(n): return 1 + sum( (n-j+1)*euler_phi(j) for j in range(1,n+1) )
    [A005598(n) for n in range(61)] # G. C. Greubel, Dec 07 2022

Formula

a(n) = 2*A049703(n) for n >= 1.
a(n) = Sum_{i=0..n} A049695(i,n-i). - Clark Kimberling
Asymptotically, a(n) behaves like n^3/Pi^2. - Leo Dorst (leo(AT)science.uva.nl), Apr 02 2007
G.f.: 1/(1 - x) + (1/(1 - x)^2)*Sum_{k>=1} mu(k)*x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Mar 16 2017
a(n) = 1 + (n+1)*A002088(n) - A011755(n). - G. C. Greubel, Dec 07 2022

Extensions

Extended by John W. Layman, Mar 30 2005
More terms from Emeric Deutsch, Feb 04 2006
Entry revised by N. J. A. Sloane, Apr 04 2007
Minor English revisions by Jeffrey Shallit, Aug 04 2016

A098198 Decimal expansion of Pi^4/36 = zeta(2)^2.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Sep 21 2004

Keywords

Examples

			2.70580808427784547879000924135291975693687737979... = 2*A152649 = A013661^2.
		

Crossrefs

Programs

Formula

Decimal expansion of limit of q(n)= A024916(n)/A002088(n) = SummatorySigma / SummatoryTotient.
Equals Sum_{n>=1} A000005(n)/n^2. - R. J. Mathar, Dec 18 2010
Equals 10*Sum_{n>=2} (psi(n)+gamma)/n^3. - Jean-François Alcover, Feb 25 2013
Equals Zeta(4)*10/4 = A013662/0.4 = 1/A227929. - R. J. Mathar, Jul 20 2025
Equals 10 * zeta(3,1) = 10 * Sum_{n >= 1} 1/n Sum_{k >= n+1} 1/k^3 = 10 * Sum_{n >= 1} 1/n^3 * Sum_{k = 1..n-1} 1/k. - Peter Bala, Aug 07 2025

A068773 Alternating sum phi(1) - phi(2) + phi(3) - phi(4) + ... + ((-1)^(n+1))*phi(n).

Original entry on oeis.org

1, 0, 2, 0, 4, 2, 8, 4, 10, 6, 16, 12, 24, 18, 26, 18, 34, 28, 46, 38, 50, 40, 62, 54, 74, 62, 80, 68, 96, 88, 118, 102, 122, 106, 130, 118, 154, 136, 160, 144, 184, 172, 214, 194, 218, 196, 242, 226, 268, 248, 280, 256, 308, 290, 330, 306, 342, 314, 372, 356
Offset: 1

Views

Author

Klaus Brockhaus, Feb 28 2002

Keywords

Examples

			a(3) = phi(1) - phi(2) + phi(3) = 1 - 1 + 2 = 2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): seq(add((-1)^(k+1)*phi(k),k=1..n), n=1..80); # Ridouane Oudra, Mar 22 2024
  • Mathematica
    Accumulate[Array[(-1)^(# + 1) * EulerPhi[#] &, 100]] (* Amiram Eldar, Oct 14 2022 *)
  • PARI
    a068773(m)=local(s,n); s=0; for(n=1,m, if(n%2==0,s=s-eulerphi(n),s=s+eulerphi(n)); print1(s,","))
    
  • Python
    # uses code from A002088 and A049690
    def A068773(n): return A002088(n)-(A049690(n>>1)<<1) # Chai Wah Wu, Aug 04 2024

Formula

a(n) = Sum_{k=1..n} (-1)^(k+1)*phi(k).
a(n) = n^2/Pi^2 + O(n * log(n)^(2/3) * log(log(n))^(4/3)) (Tóth, 2017). - Amiram Eldar, Oct 14 2022
a(n) = 3*A002088(n) - 2*A049690(n). - Ridouane Oudra, Mar 22 2024
a(n) = A002088(n) - 2*A049690(floor(n/2)). - Chai Wah Wu, Aug 04 2024

A049690 a(n) = Sum_{k=1..n} phi(2*k), where phi = Euler totient function, cf. A000010.

Original entry on oeis.org

0, 1, 3, 5, 9, 13, 17, 23, 31, 37, 45, 55, 63, 75, 87, 95, 111, 127, 139, 157, 173, 185, 205, 227, 243, 263, 287, 305, 329, 357, 373, 403, 435, 455, 487, 511, 535, 571, 607, 631, 663, 703, 727, 769, 809, 833, 877, 923, 955, 997, 1037, 1069, 1117, 1169, 1205
Offset: 0

Views

Author

Keywords

Crossrefs

a(n)=b(2n), where b=A049689. Bisections: A099958, A190815.
Cf. A062570.

Programs

Formula

a(n) ~ 4*n^2/Pi^2. - Vaclav Kotesovec, Aug 20 2021
a(n) = A002088(n) + a(floor(n/2)). - Chai Wah Wu, Aug 04 2024

Extensions

More terms from Vladeta Jovovic, May 18 2001
Previous Showing 21-30 of 128 results. Next