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.
%I A078147 #36 Sep 10 2024 14:22:19 %S A078147 4,1,3,4,2,2,4,1,2,1,4,4,4,4,1,3,1,1,2,2,2,4,3,1,4,4,3,1,4,1,3,4,2,2, %T A078147 4,2,1,1,4,4,4,4,1,3,1,3,1,1,2,4,3,1,4,4,3,1,2,2,1,3,4,2,2,4,1,2,1,3, %U A078147 1,4,4,4,1,3,4,2,2,4,3,1,4,4,4,4,1,3,4,2,2,4,2,1,1,1,3,2,2,4,4,1,3,4,2,2,3 %N A078147 First differences of sequence of nonsquarefree numbers, A013929. %C A078147 Run lengths in A132345, apart from initial run of zeros. - _Reinhard Zumkeller_, Apr 22 2012 %C A078147 The asymptotic density of the occurrences of 1 in this sequence is density(A068781)/density(A013929) = (1 - 2 * A059956 + A065474)/A229099 = 0.272347... - _Amiram Eldar_, Mar 09 2021 %H A078147 Reinhard Zumkeller, <a href="/A078147/b078147.txt">Table of n, a(n) for n = 1..10000</a> %F A078147 a(n) = A013929(n+1) - A013929(n). %F A078147 a(n) = 1, 2, 3 or 4 since n = 4*k is always nonsquarefree. %F A078147 Asymptotic mean: lim_{n->oo} (1/n) Sum_{k=1..n} a(k) = Pi^2/(Pi^2-6) = 2.550546... - _Amiram Eldar_, Oct 21 2020 %e A078147 a(1) = 4 = 8 - 4. %t A078147 t=Flatten[Position[Table[MoebiusMu[w], {w, 1, 1000}], 0]]; t1=Delete[RotateLeft[t]-t, -1] %t A078147 Differences[Select[Range[300],!SquareFreeQ[#]&]] (* _Harvey P. Dale_, May 07 2012 *) %o A078147 (Haskell) %o A078147 a078147 n = a078147_list !! (n-1) %o A078147 a078147_list = zipWith (-) (tail a013929_list) a013929_list %o A078147 -- _Reinhard Zumkeller_, Apr 22 2012 %o A078147 (PARI) lista(nn) = {my(prec=0); for (n=1, nn, if (!issquarefree(n), if (prec, print1(n-prec, ", ")); prec = n;););} \\ _Michel Marcus_, Mar 26 2020 %o A078147 (Python) %o A078147 from math import isqrt %o A078147 from sympy import mobius, factorint %o A078147 def A078147(n): %o A078147 def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)) %o A078147 m, k = n, f(n) %o A078147 while m != k: m, k = k, f(k) %o A078147 return next(i for i in range(1,5) if any(d>1 for d in factorint(m+i).values())) # _Chai Wah Wu_, Sep 10 2024 %Y A078147 Cf. A068781, A013929, A132345. %Y A078147 Cf. A059956, A065474, A229099. %K A078147 easy,nonn %O A078147 1,1 %A A078147 _Labos Elemer_, Nov 26 2002 %E A078147 Offset fixed by _Reinhard Zumkeller_, Apr 22 2012