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.

A056798 Prime powers with even nonnegative exponents.

This page as a plain text file.
%I A056798 #54 Aug 14 2024 01:55:28
%S A056798 1,4,9,16,25,49,64,81,121,169,256,289,361,529,625,729,841,961,1024,
%T A056798 1369,1681,1849,2209,2401,2809,3481,3721,4096,4489,5041,5329,6241,
%U A056798 6561,6889,7921,9409,10201,10609,11449,11881,12769,14641,15625,16129,16384
%N A056798 Prime powers with even nonnegative exponents.
%C A056798 Also numbers whose geometric mean of divisors is an integer. - _Ctibor O. Zizka_, Sep 29 2008
%C A056798 This is just a special case. In fact, the numbers whose geometric mean of divisors is an integer are all the squares of integers (A000290). - _Daniel Lignon_, Nov 29 2014
%H A056798 T. D. Noe, <a href="/A056798/b056798.txt">Table of n, a(n) for n = 1..10000</a>
%F A056798 a(n) = A025473(n)^(2*A025474(n)) = A000961(n)^2;
%F A056798 A001222(a(n)) mod 2 = 0;
%F A056798 A003415(a(n)) = A192083(n); A068346(a(n)) = A192084(n). - _Reinhard Zumkeller_, Jun 26 2011
%F A056798 Sum_{n>=2} 1/a(n) = A154945. - _Amiram Eldar_, Sep 21 2020
%t A056798 Take[Union[Flatten[Table[Prime[n]^k, {n, 31}, {k, 0, 14, 2}]]], 45] (* _Alonso del Arte_, Jul 05 2011 *)
%o A056798 (PARI) is(n)=my(e=isprimepower(n)); if(e, e%2==0, n==1) \\ _Charles R Greathouse IV_, Sep 18 2015
%o A056798 (Python)
%o A056798 from sympy import primepi, integer_nthroot
%o A056798 def A056798(n):
%o A056798     if n==1: return 1
%o A056798     def f(x): return int(n-2+x-sum(primepi(integer_nthroot(x,k)[0])for k in range(2,x.bit_length(),2)))
%o A056798     kmin, kmax = 1,2
%o A056798     while f(kmax) >= kmax:
%o A056798         kmax <<= 1
%o A056798     while True:
%o A056798         kmid = kmax+kmin>>1
%o A056798         if f(kmid) < kmid:
%o A056798             kmax = kmid
%o A056798         else:
%o A056798             kmin = kmid
%o A056798         if kmax-kmin <= 1:
%o A056798             break
%o A056798     return kmax # _Chai Wah Wu_, Aug 13 2024
%Y A056798 Cf. A000290, A000961, A025475, A154945.
%K A056798 nonn
%O A056798 1,2
%A A056798 _Labos Elemer_, Aug 28 2000