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.

A070228 Number of perfect powers (A001597) not exceeding 2^n.

This page as a plain text file.
%I A070228 #39 Aug 13 2024 11:20:55
%S A070228 1,1,2,3,5,8,11,16,23,31,42,58,82,114,156,217,299,417,583,814,1136,
%T A070228 1589,2224,3116,4369,6136,8623,12128,17064,24023,33839,47689,67227,
%U A070228 94805,133738,188710,266351,376019,530941,749820,1059097,1496144,2113802,2986770,4220666
%N A070228 Number of perfect powers (A001597) not exceeding 2^n.
%H A070228 Amiram Eldar, <a href="/A070228/b070228.txt">Table of n, a(n) for n = 0..6643</a> (terms 0..1000 from Robert G. Wilson v)
%F A070228 a(n) = 1 - Sum_{k=2..n} Moebius(k)*floor(2^(n/k)-1). - _Robert G. Wilson v_, Jan 20 2015
%F A070228 a(n) = A188951(n) + 1 for n > 1. - _Amiram Eldar_, May 19 2022
%e A070228 How many powers are there not exceeding 2^4?: 1, 4, 8, 9, 16. Hence a(4) = 5.
%e A070228 a(22)=2224: there are 2224 powers not exceeding 2^22.
%t A070228 f[n_] := 1 - Sum[ MoebiusMu[x]*Floor[2^(n/x) - 1], {x, 2, n}]; Array[f, 44, 0] (* _Robert G. Wilson v_, Jan 20 2015 *)
%o A070228 (PARI) a(n) = 1 - sum(k=2, n, moebius(k)*(sqrtnint(2^n,k)-1));
%o A070228 (Python)
%o A070228 from sympy import mobius, integer_nthroot
%o A070228 def A070228(n): return int(1+sum(mobius(x)*(1-integer_nthroot(1<<n,x)[0]) for x in range(2,n+1))) # _Chai Wah Wu_, Aug 13 2024
%Y A070228 Cf. A070428, A188951.
%K A070228 nonn,easy
%O A070228 0,3
%A A070228 _Donald S. McDonald_, May 14 2002
%E A070228 a(39)-a(44) from _Alex Ratushnyak_, Jan 02 2014