login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A352788
Squares in A213544.
0
1, 9, 25, 10510564
OFFSET
1,2
COMMENTS
Squares that are partial sums of A023896.
EXAMPLE
a(3) = 25 is a term because A213544(6) = 25 = 5^2.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Robert Israel, Apr 02 2022
STATUS
approved