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.

Showing 1-2 of 2 results.

A243348 Difference between the n-th squarefree number and n: a(n) = A005117(n) - n.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 3, 3, 4, 4, 4, 5, 6, 7, 7, 7, 9, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 16, 16, 19, 20, 21, 22, 22, 22, 23, 23, 25, 25, 25, 26, 26, 26, 27, 27, 29, 29, 29, 31, 31, 32, 32, 32, 33, 34, 35, 35, 35, 36, 39, 39, 39, 40, 40, 40, 41, 41, 41, 42, 42, 42
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2014

Keywords

Comments

a(n) <= n, as A243351(n) = 2n - A005117(n) goes never negative (please see the plot A005117(n)/n given in the links section).
No runs longer than three appear, because there must be at least one gap (cf. A053806) in each range [4k+1 .. 4(k+1)] where no term(s) of A005117 appear.
See also A120992 which gives the run lengths.
Record values of first differences: a(2) - a(1) = 0, a(4) - a(3) = 1, a(7) - a(6) = 2, a(32) - a(31) = 3, a(151) - a(150) = 4, a(516) - a(515) = 5, a(13392) - a(13391) = 6, a(131965) - a(131964) = 7, a(664314) - a(664313) = 8, a(5392319) - a(5392318) = 9, and a(134453712) - a(134453711) = 11. - Charles R Greathouse IV, Nov 05 2017

Crossrefs

A120992 gives the lengths of runs.

Programs

  • PARI
    do(x)=my(v=List([0])); forfactored(n=2,x\1, if(vecmax(n[2][,2])==1, listput(v,n[1]-#v-1))); Vec(v) \\ Charles R Greathouse IV, Nov 05 2017
    
  • Python
    from math import isqrt
    from sympy import mobius
    def A243348(n):
        def f(x): return n+x-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)
        return m-n # Chai Wah Wu, Aug 12 2024
  • Scheme
    (define (A243348 n) (- (A005117 n) n))
    

Formula

a(n) = A005117(n) - n.
a(n) = A243349(n) - A243289(n).
a(n) = n - A243351(n).
Limit_{n->oo} a(n)/A243351(n) = (Pi^2 - 6)/(12 - Pi^2) = 1.81637833.... - Charles R Greathouse IV, Jun 04 2014
a(n) ~ kn where k = Pi^2/6 - 1 = 0.644934.... - Charles R Greathouse IV, Nov 05 2017

A243289 n minus the index of the greatest prime dividing n-th squarefree number: a(n) = n - A243290(n).

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 4, 3, 3, 6, 8, 5, 5, 10, 10, 7, 11, 8, 16, 9, 16, 15, 19, 12, 17, 20, 14, 24, 15, 21, 16, 25, 17, 29, 27, 26, 20, 20, 28, 34, 36, 23, 34, 40, 25, 25, 35, 43, 43, 28, 38, 29, 46, 40, 45, 32, 51, 47, 44, 52, 36, 36, 56, 37, 61, 50, 39, 39, 64, 58
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

If A005117(n) <= 2n, or equally, if A243351 is always positive, then this sequence is certainly positive as well.

Crossrefs

Programs

  • Mathematica
    With[{t = Table[PrimePi[FactorInteger[k][[-1, 1]]], {k, Select[Range[120], SquareFreeQ]}]}, Range[Length[t]] - t] (* Amiram Eldar, Mar 04 2024 *)

Formula

a(n) = n - A243290(n).
Showing 1-2 of 2 results.