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”).

Numbers k such that for some r we have phi(1) + ... + phi(k - 1) = phi(k + 1) + ... + phi(k + r), where phi(i) = A000010(i).
1

%I #31 Jan 05 2025 19:51:42

%S 3,4,6,38,40,88,244,578,581,602,1663,2196,10327,17358,28133,36163,

%T 42299,123556,149788,234900,350210,366321,620478,694950,869880,905807,

%U 934286,1907010,2005592,5026297,7675637,11492764,12844691,14400214,15444216,18798939,20300872

%N Numbers k such that for some r we have phi(1) + ... + phi(k - 1) = phi(k + 1) + ... + phi(k + r), where phi(i) = A000010(i).

%C These numbers might be called "Euler totient function sequence balancing numbers", after the Behera and Panda link.

%C Numbers k such that A002088(k-1) + A002088(k) is a term of A002088.

%H Ctibor O. Zizka, <a href="/A358936/b358936.txt">Table of k < 10^9</a>, Terms 38..45 from David A. Corneth.

%H A. Behera and G. K. Panda, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/37-2/behera.pdf">On the square roots of triangular numbers</a>, The Fibonacci Quarterly, 37.2 (1999), 98-105.

%e k = 3:

%e phi(1) + phi(2) = phi(4) = 2.

%e Thus the balancing number k = 3 is a term. The balancer r is 1.

%e k = 4:

%e phi(1) + phi(2) + phi(3) = phi(5) = 4.

%e Thus the balancing number k = 4 is a term. The balancer r is 1.

%e phi(i) = A000010(i).

%t With[{m = 30000},phi = EulerPhi[Range[m]]; s = Accumulate[phi]; Select[Range[2, m], MemberQ[s, 2*s[[#]] - phi[[#]]] &]] (* _Amiram Eldar_, Dec 07 2022 *)

%o (Python)

%o from sympy import totient as phi

%o from itertools import count, islice

%o def f(n): # function we wish to "balance"

%o return phi(n)

%o def agen(): # generator of terms

%o s, sset, i = [0, f(1), f(1)+f(2)], set(), 3

%o for k in count(2):

%o target = s[k-1] + s[k]

%o while s[-1] < target:

%o fi = f(i); nexts = s[-1] + fi; i += 1

%o s.append(nexts); sset.add(nexts)

%o if target in sset: yield k

%o print(list(islice(agen(), 17))) # _Michael S. Branicky_, Dec 07 2022

%o (PARI) upto(n) = {my(res = List(), lefttotal = 1, righttotal = 2, k = 2, nplusr = 3, sumf = 1, oldfk = 1); for(i = 1, n, while(lefttotal > righttotal, nplusr++; righttotal+=f(nplusr) ); if(lefttotal == righttotal, listput(res, k)); lefttotal+=oldfk; k++; fk = f(k); righttotal-=fk; oldfk = fk ); res }

%o f(k) = eulerphi(k) \\ _David A. Corneth_, Dec 07 2022

%Y Cf. A000010, A001109, A002088, A064018.

%K nonn

%O 1,1

%A _Ctibor O. Zizka_, Dec 07 2022

%E a(8)-a(15) from _Amiram Eldar_, Dec 07 2022

%E a(16)-a(37) from _Michael S. Branicky_, Dec 07 2022