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.

A188951 Number of perfect powers (A001597) < 2^n.

This page as a plain text file.
%I A188951 #18 Aug 13 2024 11:21:19
%S A188951 0,1,1,2,4,7,10,15,22,30,41,57,81,113,155,216,298,416,582,813,1135,
%T A188951 1588,2223,3115,4368,6135,8622,12127,17063,24022,33838,47688,67226,
%U A188951 94804,133737,188709,266350,376018,530940,749819,1059096,1496143,2113801,2986769
%N A188951 Number of perfect powers (A001597) < 2^n.
%H A188951 Amiram Eldar, <a href="/A188951/b188951.txt">Table of n, a(n) for n = 0..6643</a>
%F A188951 a(n) = A070228(n) - 1 for n > 1. - _Amiram Eldar_, May 19 2022
%e A188951 For n=3, the perfect powers smaller than 2^3=8 are: 1 and 4. So a(3) = 2.
%t A188951 Join[{0,1}, Table[-Sum[MoebiusMu[x]*Floor[2^(n/x) - 1], {x, 2, n}], {n, 2, 50}]]
%o A188951 (PARI) a(n) = sum(k=1, 2^n-1, (k==1) || ispower(k)); \\ _Michel Marcus_, Apr 11 2016
%o A188951 (Python)
%o A188951 from sympy import mobius, integer_nthroot
%o A188951 def A188951(n): return int(sum(mobius(x)*(1-integer_nthroot(1<<n,x)[0]) for x in range(2,n+1))) if n!=1 else 1 # _Chai Wah Wu_, Aug 13 2024
%Y A188951 Cf. A001597, A070228, A070428 (perfect powers not exceeding 10^n).
%K A188951 nonn
%O A188951 0,4
%A A188951 _T. D. Noe_, Apr 20 2011