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.

A378168 a(n) is the number of squares <= 10^n that are not higher powers, i.e., terms of A076467.

This page as a plain text file.
%I A378168 #23 Nov 21 2024 19:11:46
%S A378168 2,6,24,87,292,959,3089,9875,31410,99633,315589,998889,3160340,
%T A378168 9996605,31616816,99989509,316209268,999967330,3162219896,9999897769,
%U A378168 31622595517,99999679010,316227196708,999998989804,3162275866962,9999996815862,31622770946248,99999989953079
%N A378168 a(n) is the number of squares <= 10^n that are not higher powers, i.e., terms of A076467.
%H A378168 Chai Wah Wu, <a href="/A378168/b378168.txt">Table of n, a(n) for n = 1..2000</a>
%F A378168 a(n) = Sum_{k=1..floor(log_2(10^n)-1)} mu(k)*floor(10^(n/(2k))-1). - _Chai Wah Wu_, Nov 20 2024
%e A378168 a(1) = 2: squares <= 10 are 2^2 and 3^2;
%e A378168 a(2) = 6: 2 squares <= 10 and 5^2, 6^2, 7^2, 10^2, but not 4^2=2^4, 8^2=2^6, and 9^2=3^4;
%e A378168 a(3) = 24: 6 squares <= 100 and all squares between 11^2 and 31^2, except for 16^2=2^8, 25^2=5^4, and 27^2=3^6.
%t A378168 Table[Sum[MoebiusMu[k]*Floor[10^(n/(2k))-1],{k,Floor[Log2[10^n]-1]}],{n,28}] (* _James C. McMahon_, Nov 21 2024 *)
%o A378168 (Python)
%o A378168 from math import gcd
%o A378168 from sympy import integer_nthroot, mobius
%o A378168 def A378168(n): return sum(mobius(k)*(integer_nthroot(10**(n//(a:=gcd(n,b:=k<<1))), b//a)[0]-1) for k in range(1, (10**n).bit_length()-1)) # _Chai Wah Wu_, Nov 20 2024
%Y A378168 Cf. A000290, A001597, A070428, A076467, A089579.
%K A378168 nonn
%O A378168 1,1
%A A378168 _Hugo Pfoertner_, Nov 20 2024
%E A378168 a(20) onwards from _Chai Wah Wu_, Nov 20 2024