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.

This page as a plain text file.
%I A358089 #17 Aug 15 2024 02:02:13
%S A358089 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,
%T A358089 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,
%U A358089 4,4,1,3,4,2,2,4,2,2,1,3,2,2,8,1,3,4,2
%N A358089 First differences of A126706.
%C A358089 A356322 relates to the first instances of exactly k consecutive 1's in this sequence.
%C A358089 a(n) - 1 = number of 0's between 1's in A355447.
%C A358089 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.
%C A358089 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.
%H A358089 Michael De Vlieger, <a href="/A358089/b358089.txt">Table of n, a(n) for n = 1..10000</a>
%e A358089 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, ...}.
%t A358089 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]]
%t A358089 (* Generate 317359 terms of this sequence from the image at A355447: *)
%t A358089 Differences@ Position[Flatten@ ImageData[Import["https://oeis.org/A355447/a355447_1.png", "PNG"]], 0.][[All, -1]]
%o A358089 (Python)
%o A358089 from math import isqrt
%o A358089 from sympy import primepi, integer_nthroot, mobius
%o A358089 def A358089(n):
%o A358089     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)))
%o A358089     m, k = n, f(n)
%o A358089     while m != k:
%o A358089         m, k = k, f(k)
%o A358089     r, k = n+1, f(n+1)+1
%o A358089     while r != k:
%o A358089         r, k = k, f(k)+1
%o A358089     return r-m # _Chai Wah Wu_, Aug 15 2024
%Y A358089 Cf. A126706, A355447, A356322.
%K A358089 nonn,easy
%O A358089 1,1
%A A358089 _Michael De Vlieger_, Oct 31 2022