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.

A358089 First differences of A126706.

Original entry on oeis.org

6, 2, 4, 4, 8, 4, 4, 1, 3, 2, 2, 2, 2, 4, 3, 5, 4, 3, 1, 4, 4, 4, 2, 2, 4, 2, 1, 1, 4, 4, 4, 4, 1, 3, 4, 2, 6, 3, 1, 4, 4, 3, 1, 2, 2, 1, 3, 4, 2, 2, 4, 3, 1, 3, 1, 4, 4, 4, 1, 3, 4, 2, 2, 4, 3, 1, 4, 4, 4, 4, 1, 3, 4, 2, 2, 4, 2, 2, 1, 3, 2, 2, 8, 1, 3, 4, 2
Offset: 1

Views

Author

Michael De Vlieger, Oct 31 2022

Keywords

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.

Examples

			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, ...}.
		

Crossrefs

Programs

  • 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]]
  • 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