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.

A062965 Positive numbers which are one less than a perfect square that is also another power.

This page as a plain text file.
%I A062965 #38 Mar 24 2025 13:51:03
%S A062965 15,63,80,255,624,728,1023,1295,2400,4095,6560,9999,14640,15624,16383,
%T A062965 20735,28560,38415,46655,50624,59048,65535,83520,104975,117648,130320,
%U A062965 159999,194480,234255,262143,279840,331775,390624,456975,531440,614655
%N A062965 Positive numbers which are one less than a perfect square that is also another power.
%D A062965 William Dunham, Euler: The Master of Us All, The Mathematical Association of America, Washington D.C., 1999, p. 65.
%D A062965 Leonhard Euler, "Variae observationes circa series infinitas," Opera Omnia, Ser. 1, Vol. 14, pp. 216-244.
%D A062965 Nicolao Fvss, "Demonstratio Theorematvm Qvorvndam Analyticorvm," Nova Acta Academiae Scientiarum Imperialis Petropolitanae, 8 (1794) 223-226.
%H A062965 Amiram Eldar, <a href="/A062965/b062965.txt">Table of n, a(n) for n = 1..10000</a>
%H A062965 Leonhard Euler, <a href="https://scholarlycommons.pacific.edu/euler-works/72/">Variae observationes circa series infinitas</a>.
%H A062965 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PerfectPower.html">Perfect Power</a>.
%F A062965 From _Terry D. Grant_, Oct 25 2020: (Start)
%F A062965 a(n) = A001597(n+1)^2 - 1.
%F A062965 Sum_{k>=1} 1/a(k) = 7/4 - Pi^2/6 = 7/4 - zeta(2).
%F A062965 Sum_{k>=1} 1/(a(k)+1) = Sum_{k>=2} mu(k)*(1-zeta(2*k)).
%F A062965 (End)
%e A062965 a(2) = 63 because the perfect square 64 = 8^2 = 4^3.
%t A062965 Take[ Select[ Range[ 2, 150 ], GCD@@(Last/@FactorInteger[ # ])>1& ]^2-1] (* corrected by _Jon Maiga_, Sep 28 2019 *)
%o A062965 (Python)
%o A062965 from sympy import mobius, integer_nthroot
%o A062965 def A062965(n):
%o A062965     def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
%o A062965     kmin, kmax = 1,2
%o A062965     while f(kmax) >= kmax:
%o A062965         kmax <<= 1
%o A062965     while True:
%o A062965         kmid = kmax+kmin>>1
%o A062965         if f(kmid) < kmid:
%o A062965             kmax = kmid
%o A062965         else:
%o A062965             kmin = kmid
%o A062965         if kmax-kmin <= 1:
%o A062965             break
%o A062965     return kmax**2-1 # _Chai Wah Wu_, Aug 14 2024
%Y A062965 Cf. A037450, A062834, A062757, A001597.
%Y A062965 Cf. A131605.
%K A062965 nonn
%O A062965 1,1
%A A062965 _Jason Earls_, Jul 16 2001
%E A062965 More terms from _Dean Hickerson_, Jul 24 2001