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

A352788 Squares in A213544.

Original entry on oeis.org

1, 9, 25, 10510564
Offset: 1

Views

Author

Robert Israel, Apr 02 2022

Keywords

Comments

Squares that are partial sums of A023896.

Examples

			a(3) = 25 is a term because A213544(6) = 25 = 5^2.
		

Crossrefs

Programs

  • Maple
    s:= 1: R:= 1: count:= 1:
    for n from 2 to 10^6 do
    s:= s + n/2*numtheory:-phi(n);
      if issqr(s) then
         count:= count+1; R:= R, s;
      fi;
    od:
    R;
  • Mathematica
    f[1] = 1; f[n_] := n*EulerPhi[n]/2; seq[len_, max_] := Module[{s = {}, sum = 0, c = 0, n = 1}, While[c < len && n < max, sum += f[n]; n++; If[IntegerQ@Sqrt[sum], c++; AppendTo[s, sum]]]; s]; seq[4, 1000] (* Amiram Eldar, Apr 07 2022 *)
  • Python
    from itertools import count, islice
    from sympy import totient
    def A352788_gen(): # generator of terms
        c, m, ms = 0, 1, 1
        for n in count(1):
            c += 1 if n <= 2 else n*totient(n)//2
            if c == ms:
                yield c
            else:
                while c > ms:
                    ms += 2*m+1
                    m += 1
    A352788_list = list(islice(A352788_gen(),4)) # Chai Wah Wu, Apr 08 2022

A240877 Sum of the denominators of the Farey series of order n (A006843).

Original entry on oeis.org

1, 2, 4, 10, 18, 38, 50, 92, 124, 178, 218, 328, 376, 532, 616, 736, 864, 1136, 1244, 1586, 1746, 1998, 2218, 2724, 2916, 3416, 3728, 4214, 4550, 5362, 5602, 6532, 7044, 7704, 8248, 9088, 9520, 10852, 11536, 12472, 13112, 14752, 15256, 17062, 17942, 19022, 20034, 22196, 22964, 25022, 26022
Offset: 0

Views

Author

Robert G. Wilson v, Apr 13 2014

Keywords

Comments

All terms except a(0) are even.

Crossrefs

Programs

  • Mathematica
    Farey[n_] := Union[ Flatten[ Join[{0}, Table[a/b, {b, n}, {a, b}]]]]; Table[ Total[ Denominator[ Farey[ n]]], {n, 0, 50}]
  • PARI
    first(n)=my(s=1,v=vector(n+1)); v[1]=1; forfactored(k=1,n, v[k[1]+1]=s+=k[1]*eulerphi(k)); v \\ Charles R Greathouse IV, Dec 27 2017

Formula

a(n) = 1 + Sum_{k=1..n} k*A000010(k). - Isaac Saffold, Dec 03 2017
a(n) = 1 + A011755(n). - Michel Marcus, Dec 23 2017
a(n) ~ c * n^3, where c = 2/Pi^2 (A185197). - Amiram Eldar, Dec 01 2023

A307997 a(n) is the sum of A023896(k) over the totatives of n.

Original entry on oeis.org

1, 1, 2, 4, 9, 11, 25, 35, 53, 52, 109, 87, 188, 174, 218, 255, 432, 301, 622, 492, 636, 633, 1109, 725, 1288, 1113, 1468, 1287, 2275, 1121, 2801, 2305, 2598, 2499, 3227, 2266, 4760, 3550, 4229, 3449, 6556, 3311, 7628, 5527, 5846, 6199, 10017, 5736, 10453, 7282, 9654, 8832, 14451, 8143, 13060
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, May 09 2019

Keywords

Comments

a(n) <= A213544(n-1) for n >= 2, with equality if and only if n is prime. - Robert Israel, May 10 2019

Examples

			a(6) = 11 because the totatives of 6, i.e. the numbers from 1 to 6 that are coprime to 6, are 1 and 5, A023896(1) = 1 and A023896(5) = 1+2+3+4=10, and 1+10=11.
		

Crossrefs

Programs

  • Maple
    A023896:= proc(n) option remember; convert(select(t -> igcd(t,n)=1, [$1..n]),`+`) end proc:
    f:= n -> convert(map(A023896, select(t -> igcd(t,n)=1, [$1..n])),`+`):
    map(f, [$1..100]);
  • Mathematica
    A023896[n_] := If[n == 1, 1, (n/2) EulerPhi[n]];
    a[n_] := Sum[Boole[GCD[n, k] == 1] A023896[k], {k, 1, n}];
    Array[a, 100] (* Jean-François Alcover, Jul 31 2020 *)
  • PARI
    s(n) = if(n<2, n>0, n*eulerphi(n)/2); \\ A023896
    a(n) = sum(k=1, n, if (gcd(n,k)==1, s(k))); \\ Michel Marcus, May 10 2019

Formula

a(n) = Sum_{1<=k<=n; gcd(k,n)=1} A023896(k).
a(n) = Sum_{k=1..n} k*A143620(n,k).

A248832 The sum of denominators of unreduced mediants in Farey sequences of orders 1,2,..,n.

Original entry on oeis.org

2, 6, 16, 34, 72, 122, 214, 338, 516, 734, 1062, 1438, 1970, 2586, 3322, 4186, 5322, 6566, 8152, 9898, 11896, 14114, 16838, 20254, 23982, 28196, 32746, 38108, 43710, 50242, 57286, 64990, 73238, 82326, 91846, 102698, 114234, 126706, 139818
Offset: 0

Views

Author

Nehul Yadav, Oct 15 2014

Keywords

Examples

			For n=4, the unreduced mediants are 1/2, 2/4, 5/10, 9/18, hence the sum of denominators is 2+4+10+18 = 34.
		

Crossrefs

Formula

a(n) = 2*Sum_{k= 1,2,3,4..n} A213544(k).

A280458 Partial products of A023896.

Original entry on oeis.org

1, 1, 3, 12, 120, 720, 15120, 241920, 6531840, 130636800, 7185024000, 172440576000, 13450364928000, 564915326976000, 33894919618560000, 2169274855587840000, 295021380359946240000, 15931154539437096960000, 2724227426243743580160000, 217938194099499486412800000
Offset: 1

Views

Author

Jaroslav Krizek, Jan 03 2017

Keywords

Crossrefs

Cf. A023896 (sum of totatives of n), A213544 (partial sums of A023896).

Programs

  • Magma
    [&*[&+[h: h in [1..k] | GCD(h,k) eq 1]: k in [1..n]]: n in [1..100]];
  • Mathematica
    FoldList[#1 #2 &, Table[Ceiling[(n EulerPhi@ n)/2], {n, 20}]] (* Michael De Vlieger, Jan 03 2017 *)

Formula

a(n) = Sum_{i=1..n} A023896(i).
Showing 1-5 of 5 results.