login
a(n) = 1 if n is neither squarefree nor prime power, otherwise 0.
3

%I #17 Jul 15 2022 15:05:24

%S 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,

%T 0,1,0,0,0,1,0,0,0,1,1,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,0,1,0,0,0,0,1,

%U 0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1

%N a(n) = 1 if n is neither squarefree nor prime power, otherwise 0.

%C Terms m in A126706 are of the form p^2*k with p prime and k not a power of p. Therefore, m occurs densely in the residues r mod q = p^2*k where k <= q/p^2 for p|q, and q = A002110(j)^2 (i.e., q in A061742), only interrupted by perfect powers of p. Using this principle we can produce a sieve-like diagram for this sequence as shown in the example. - _Michael De Vlieger_, Jul 15 2022

%H Antti Karttunen, <a href="/A355447/b355447.txt">Table of n, a(n) for n = 1..100000</a>

%H Michael De Vlieger, <a href="/A355447/a355447.png">Color-coded diagram arranging n = 1..1296 mod 36</a>, showing primes in red, composite prime powers (A246547) in gold, and composite squarefree numbers (A120944) in green). Products of composite prime powers (A286708) are shown in magenta; A286708 is a subset of A126706; these and the numbers in blue comprise terms in A126706.

%H Michael De Vlieger, <a href="/A355447/a355447_1.png">Raster (i*j)</a> with i = j = 1..900, showing (900i + j) as black if in A126706, otherwise white. Effectively an image of this sequence mod 900. Contains 810000 terms of this sequence.

%H Michael De Vlieger, <a href="/A355447/a355447_2.png">Ulam-style spiral arrangement of a(n)</a> for n = 1..229441. The evident "chatter" relates to 2^2*k with k not a power of 2.

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>

%F a(n) = (1-A008966(n)) * (1-A010055(n)).

%e From _Michael De Vlieger_, Jul 15 2022: (Start)

%e This sequence arranged in 18 rows of 36 terms m, replacing 0 with "*" for composite prime powers m, otherwise "." so as to clarify the pattern:

%e ...*...**..1...*.1.1...1*.*1...*...1

%e ...1...11..1*1.1.1.1...1..1*...1...1

%e ..11...1*..1...1.1.1...1.111...1...1

%e ...1...11..1*..1*1.*...1..11...1...1

%e ..11.1.11..1...1.1.1...1*.11..11...1

%e ...1...11..1...1.1.1...1..11...1...1

%e ...1...11..1...1.1.1...1.1*11..1.1.1

%e ...*...11..1...1.1.1..11..11...1...1

%e *..1.1.11..1...1.1.1...1..11...1...1

%e 1..1...11..1.1.1.1*1...1.111...1...1

%e *.11...11..1..11.1.1...1..11...1...1

%e ...1...11..1...1.1.1...1..111..1...1

%e ...1...11..1...1.1.1...1..11...1...1

%e ...1..111..1...1.1.1.1.1..11...1...1

%e ..11...*1..1...1.1.11..1*.11...1..11

%e ...1...111.1...1.1.1...1..11...1..11

%e .1.1...11..1...1.1.1...1..111..1...1

%e ...1...11..1*..1.1.1...11.11...1...1 (End)

%t a[n_] := If[SquareFreeQ[n] || PrimePowerQ[n], 0, 1]; Array[a, 100] (* _Amiram Eldar_, Jul 14 2022 *)

%t (* Read up to 810000 terms from the 900 X 900 raster image *)

%t With[{m = 4}, Flatten[ImageData["https://oeis.org/A355447/a355447_1.png"][[1 ;; m]] /. {1. -> 0, 0. -> 1}] (* _Michael De Vlieger_, Jul 15 2022 *)

%o (PARI) A355447(n) = ((omega(n)>1) && !issquarefree(n));

%Y Characteristic function of A126706.

%Y Cf. A001221, A008966, A010055.

%Y Cf. also A354819.

%K nonn

%O 1

%A _Antti Karttunen_, Jul 13 2022