OFFSET
1,1
COMMENTS
A356322 relates to the first instances of exactly k consecutive 1's in this sequence.
a(n) - 1 = number of 0's between 1's in A355447.
For prime p, m such that m mod p^2, unless m = p^e, e > 1, is in A126706, as a consequence of definition of A126706. Therefore m <= 4 is common, m <= 9 much less so. Consequently, the arrangement of A126706 mod M for M in A061742 presents a quasi-modular pattern as seen in the example and raster link at A355447.
a(51265) = 7; m = 9 is not observed in the first 6577230 terms of the sequence, a dataset corresponding to terms k <= 2^24 in A126706.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
The smallest numbers that are neither squarefree nor a prime power are {12, 18, 20, 24, 28 ...}, therefore the first terms of this sequence are {6, 2, 4, 4, ...}.
MATHEMATICA
k = 0; Rest@ Reap[Do[If[And[#2 > 1, #1 != #2] & @@ {PrimeOmega[n], PrimeNu[n]}, Sow[n - k]; Set[k, n] ], {n, 270}] ][[-1, -1]]
(* Generate 317359 terms of this sequence from the image at A355447: *)
Differences@ Position[Flatten@ ImageData[Import["https://oeis.org/A355447/a355447_1.png", "PNG"]], 0.][[All, -1]]
PROG
(Python)
from math import isqrt
from sympy import primepi, integer_nthroot, mobius
def A358089(n):
def f(x): return int(n+sum(primepi(integer_nthroot(x, k)[0]) for k in range(2, x.bit_length()))+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
r, k = n+1, f(n+1)+1
while r != k:
r, k = k, f(k)+1
return r-m # Chai Wah Wu, Aug 15 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Oct 31 2022
STATUS
approved