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-6 of 6 results.

A004709 Cubefree numbers: numbers that are not divisible by any cube > 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85
Offset: 1

Views

Author

Steven Finch, Jun 14 1998

Keywords

Comments

Numbers n such that no smaller number m satisfies: kronecker(n,k)=kronecker(m,k) for all k. - Michael Somos, Sep 22 2005
The asymptotic density of cubefree integers is the reciprocal of Apery's constant 1/zeta(3) = A088453. - Gerard P. Michon, May 06 2009
The Schnirelmann density of the cubefree numbers is 157/189 (Orr, 1969). - Amiram Eldar, Mar 12 2021
From Amiram Eldar, Feb 26 2024: (Start)
Numbers whose sets of unitary divisors (A077610) and bi-unitary divisors (A222266) coincide.
Number whose all divisors are (1+e)-divisors, or equivalently, numbers k such that A049599(k) = A000005(k). (End)

Crossrefs

Complement of A046099.
Cf. A005117 (squarefree), A067259 (cubefree but not squarefree), A046099 (cubeful).
Cf. A160112, A160113, A160114 & A160115: On the number of cubefree integers. - Gerard P. Michon, May 06 2009
Cf. A030078.

Programs

  • Haskell
    a004709 n = a004709_list !! (n-1)
    a004709_list = filter ((== 1) . a212793) [1..]
    -- Reinhard Zumkeller, May 27 2012
    
  • Maple
    isA004709 := proc(n)
        local p;
        for p in ifactors(n)[2] do
            if op(2,p) > 2 then
                return false;
            end if;
        end do:
        true ;
    end proc:
  • Mathematica
    Select[Range[6!], FreeQ[FactorInteger[#], {, k /; k > 2}] &] (* Jan Mangaldan, May 07 2014 *)
  • PARI
    {a(n)= local(m,c); if(n<2, n==1, c=1; m=1; while( cvecmax(factor(m)[,2]), c++)); m)} /* Michael Somos, Sep 22 2005 */
    
  • Python
    from sympy.ntheory.factor_ import core
    def ok(n): return core(n, 3) == n
    print(list(filter(ok, range(1, 86)))) # Michael S. Branicky, Aug 16 2021
    
  • Python
    from sympy import mobius, integer_nthroot
    def A004709(n):
        def f(x): return n+x-sum(mobius(k)*(x//k**3) for k in range(1, integer_nthroot(x,3)[0]+1))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 05 2024

Formula

A066990(a(n)) = a(n). - Reinhard Zumkeller, Jun 25 2009
A212793(a(n)) = 1. - Reinhard Zumkeller, May 27 2012
A124010(a(n),k) <= 2 for all k = 1..A001221(a(n)). - Reinhard Zumkeller, Mar 04 2015
Sum_{n>=1} 1/a(n)^s = zeta(s)/zeta(3*s), for s > 1. - Amiram Eldar, Dec 27 2022

A160112 Number of cubefree integers not exceeding 10^n.

Original entry on oeis.org

1, 9, 85, 833, 8319, 83190, 831910, 8319081, 83190727, 831907372, 8319073719, 83190737244, 831907372522, 8319073725828, 83190737258105, 831907372580692, 8319073725807178, 83190737258070643, 831907372580707771
Offset: 0

Views

Author

Gerard P. Michon, May 02 2009, May 06 2009

Keywords

Comments

An alternate definition specifying "less than 10^n" would yield the same sequence except for the first 3 terms: 0, 8, 84, 833, 8319, etc. (since powers of 10 beyond 1000 are not cubefree anyhow).
The limit of a(n)/10^n is the inverse of Apery's constant, 1/zeta(3), whose digits are given by A088453.

Examples

			a(0)=1 because 1 <= 10^0 is not a multiple of the cube of a prime.
a(1)=9 because the 9 numbers 1,2,3,4,5,6,7,9,10 are cubefree; 8 is not.
a(2)=85 because there are 85 cubefree integers equal to 100 or less.
a(3)=833 because there are 833 cubefree integers below 1000 (which is not cubefree itself).
		

Crossrefs

A004709 (cubefree numbers). A088453 (limit of the string of digits). A160113 (binary counterpart for cubefree integers). A071172 & A053462 (decimal counterpart for squarefree integers). A143658 (binary counterpart for squarefree integers).

Programs

  • Maple
    with(numtheory): A160112:=n->add(mobius(i)*floor(10^n/(i^3)), i=1..10^n): (1,9,85,seq(A160112(n), n=3..5)); # Wesley Ivan Hurt, Aug 01 2015
  • Mathematica
    Table[ Sum[ MoebiusMu[x]*Floor[10^n/(x^3)], {x, 10^(n/3)}], {n, 0, 18}] (* Robert G. Wilson v, May 27 2009 *)
  • Python
    from sympy import mobius, integer_nthroot
    def A160112(n): return sum(mobius(k)*(10**n//k**3) for k in range(1, integer_nthroot(10**n,3)[0]+1)) # Chai Wah Wu, Aug 06 2024
    
  • Python
    from bitarray import bitarray
    from sympy import integer_nthroot
    def A160112(n): # faster program
        q = 10**n
        m = integer_nthroot(q,3)[0]+1
        a, b = bitarray(m), bitarray(m)
        a[1], p, i, c = 1, 2, 4, q-sum(q//k**3 for k in range(2,m))
        while i < m:
            j = 2
            while i < m:
                if j==p:
                    c -= (b[i]^1 if a[i] else -1)*(q//i**3)
                    j, a[i], b[i] = 0, 1, 1
                else:
                    t1, t2 = a[i], b[i]
                    if (t1&t2)^1:
                        a[i], b[i] = (t1^1)&t2, ((t1^1)&t2)^1
                        c += (t2 if t1 else 2)*(q//i**3) if (t1^1)&t2 else (t2-2 if t1 else 0)*(q//i**3)
                i += p
                j += 1
            p += 1
            while a[p]|b[p]:
                p += 1
            i = p<<1
        return c # Chai Wah Wu, Aug 06 2024

Formula

a(n) = Sum_{i=1..floor(10^(n/3))} A008683(i)*floor(10^n/i^3).

A191666 Dispersion of A042964 (numbers congruent to 2 or 3 mod 4), by antidiagonals.

Original entry on oeis.org

1, 2, 4, 3, 7, 5, 6, 14, 10, 8, 11, 27, 19, 15, 9, 22, 54, 38, 30, 18, 12, 43, 107, 75, 59, 35, 23, 13, 86, 214, 150, 118, 70, 46, 26, 16, 171, 427, 299, 235, 139, 91, 51, 31, 17, 342, 854, 598, 470, 278, 182, 102, 62, 34, 20, 683, 1707, 1195, 939, 555, 363
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2011

Keywords

Comments

Row 1: A005578
Row 2: A160113
For a background discussion of dispersions, see A191426.
...
Each of the sequences (4n, n>2), (4n+1, n>0), (3n+2, n>=0), generates a dispersion. Each complement (beginning with its first term >1) also generates a dispersion. The six sequences and dispersions are listed here:
...
A191663=dispersion of A042948 (0 or 1 mod 4 and >1)
A054582=dispersion of A005843 (0 or 2 mod 4 and >1; evens)
A191664=dispersion of A014601 (0 or 3 mod 4 and >1)
A191665=dispersion of A042963 (1 or 2 mod 4 and >1)
A191448=dispersion of A005408 (1 or 3 mod 4 and >1, odds)
A191666=dispersion of A042964 (2 or 3 mod 4)
...
EXCEPT for at most 2 initial terms (so that column 1 always starts with 1):
A191663 has 1st col A042964, all else A042948
A054582 has 1st col A005408, all else A005843
A191664 has 1st col A042963, all else A014601
A191665 has 1st col A014601, all else A042963
A191448 has 1st col A005843, all else A005408
A191666 has 1st col A042948, all else A042964
...
There is a formula for sequences of the type "(a or b mod m)", (as in the Mathematica program below):
If f(n)=(n mod 2), then (a,b,a,b,a,b,...) is given by
a*f(n+1)+b*f(n), so that "(a or b mod m)" is given by
a*f(n+1)+b*f(n)+m*floor((n-1)/2)), for n>=1.

Examples

			Northwest corner:
1...2...3....6...11
4...7...14....27...54
5...10...19...38...75
8...15..30...59...118
8...18..35...70...139
		

Crossrefs

Programs

  • Mathematica
    (* Program generates the dispersion array T of the increasing sequence f[n] *)
    r = 40; r1 = 12;  c = 40; c1 = 12;
    a = 2; b = 3; m[n_] := If[Mod[n, 2] == 0, 1, 0];
    f[n_] := a*m[n + 1] + b*m[n] + 4*Floor[(n - 1)/2]
    Table[f[n], {n, 1, 30}]  (* A042964: (2+4k,3+4k) *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191666 *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191666  *)

A160115 Fluctuations of the number of cubefree integers not exceeding 2^n.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 2, 2, 3, 0, -1, -1, 1, 2, 0, -1, 0, 2, 6, 1, 2, 7, 5, -1, -7, -4, 4, -7, -21, -7, -2, 30, 2, 14, -8, 7, -1, -7, -12, -1, 21, 28, 7, -29, -33, -76, -88, 15, 47, 58, -51, -112, 293, 122, 316, -96, -42, -259, 140, -111, 6, -790, -342, 146, 395, 1087
Offset: 0

Views

Author

Gerard P. Michon, May 06 2009

Keywords

Comments

The asymptotic density of cubefree integers is the reciprocal of Apery's constant 1/zeta(3) = 0.83190737258... The number of cubefree integers not exceeding N is thus roughly N/zeta(3). When N is a power of 2, this sequence gives the difference between the actual number (A160113) and that linear estimate (rounded to the nearest integer).

Crossrefs

A004709 (cubefree integers). A160112 & A160113 (counting cubefree integers).

Formula

a(n) = A160113(n)-round(2^n/zeta(3))

A160114 Fluctuations of the number of cubefree integers not exceeding 10^n.

Original entry on oeis.org

0, 1, 2, 1, 0, -1, 3, 7, -10, -1, -7, -14, -59, 21, 34, -15, 103, -104, 302, -38, -514, -290, 1130, 504, 2466, 6813, -1854, 1590, -4879, 3963, -4767, -22709
Offset: 0

Views

Author

Gerard P. Michon, May 06 2009

Keywords

Comments

The asymptotic density of cubefree integers is the reciprocal of Apery's constant 1/zeta(3) = 0.83190737258... The number of cubefree integers not exceeding N is thus roughly N/zeta(3). When N is a power of 10, this sequence gives the difference between the actual number (A160112) and that linear estimate (rounded to the nearest integer).

Crossrefs

A004709 (cubefree integers). A160112 & A160113 (counting cubefree integers).

Formula

a(n) = A160112(n)-round(10^n/zeta(3))

Extensions

a(30)-a(31) from Chai Wah Wu, Aug 08 2024

A171231 a(n) = (10*2^n + 3 - (-1)^n)/6.

Original entry on oeis.org

2, 4, 7, 14, 27, 54, 107, 214, 427, 854, 1707, 3414, 6827, 13654, 27307, 54614, 109227, 218454, 436907, 873814, 1747627, 3495254, 6990507, 13981014, 27962027, 55924054, 111848107, 223696214, 447392427, 894784854, 1789569707
Offset: 0

Views

Author

Paul Curtz, Dec 05 2009

Keywords

Comments

From 14, the last 2 digits are of period 4: repeat [14, 27, 54, 07]. - Paul Curtz, Nov 22 2024

Crossrefs

Cf. A000035, A000975, A048573, A136412 (1st bisection), 2*A136412 (2nd bisection).

Programs

  • Magma
    [( 10*2^n+3-(-1)^n )/6: n in [0..40]]; // Vincenzo Librandi, Aug 05 2011
  • Mathematica
    LinearRecurrence[{2,1,-2},{2,4,7},40] (* Harvey P. Dale, Feb 11 2015 *)
  • PARI
    a(n)=(10<Charles R Greathouse IV, Jul 07 2011
    

Formula

a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3), n >= 3.
a(n+1) - a(n) = A048573(n-1).
a(n) = 2*A000975(n+1) - 3*A000975(n-1).
a(n) - a(n-2) = 5*2^n.
a(n+1) - 2*a(n) = ((-1)^n-1)/2 = -A000035(n).
G.f.: ( 2-3*x^2 ) / ( (x-1)*(2*x-1)*(1+x) ). - R. J. Mathar, Jul 07 2011
a(n) = ceiling( (5/3)*(2^n) ). - Wesley Ivan Hurt, Jun 28 2013

Extensions

Definition replaced by the Lava formula of 2009. Contents converted to formulas. - R. J. Mathar, Jul 07 2011
Showing 1-6 of 6 results.