OFFSET
0,2
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..2999
FORMULA
a(n) = 10^n - Sum_{k=1..floor(log2(10^n))} mu(k)*(floor(10^(n/k))+floor(10^(n/(2k)))-2). - Chai Wah Wu, Nov 24 2024
EXAMPLE
a(0) = 1: 1^k with any k>2 (<= 10^0);
a(1) = 2: 1 and 2^3 (<=10^1);
a(2) = 7: 2 powers <= 10 and 16, 27, 32, 64, 81 (<=10^2).
PROG
(Python)
from math import gcd
from sympy import integer_nthroot, mobius
def A377934(n): return int(integer_nthroot(10**(n//(a:=gcd(n, 4))), 4//a)[0]-sum(mobius(k)*(integer_nthroot(10**(n//(b:=gcd(n, k))), k//b)[0]+integer_nthroot(10**(n//(c:=gcd(n, d:=k<<1))), d//c)[0]-2) for k in range(3, (10**n).bit_length()))) # Chai Wah Wu, Nov 24 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Nov 24 2024
EXTENSIONS
a(28) onwards from Chai Wah Wu, Nov 24 2024
STATUS
approved