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.

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