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.

Previous Showing 91-100 of 104 results. Next

A285720 Number of ways to write n as a sum of two unordered squarefree numbers so that their addition in base-2 does not produce carries.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 11, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 3, 0, 0, 0, 11, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 13, 0, 0, 0, 3, 0, 0, 0, 9, 0
Offset: 1

Views

Author

Antti Karttunen, May 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Abs[MoebiusMu[i] MoebiusMu[n - i]] Boole[BitXor[i, n - i] == n], {i, Floor[n/2]}], {n, 120}] (* Michael De Vlieger, May 03 2017 *)
  • Python
    from sympy import mobius
    def a003987(n, i): return i^(n - i) == n
    def a(n): return sum([abs(mobius(i)*mobius(n - i))*(1*a003987(n, i)) for i in range(1, n//2 + 1)])
    print([a(n) for n in range(1,121)]) # Indranil Ghosh, May 02 2017
  • Scheme
    (define (A285720 n) (let loop ((k (A013928 n)) (s 0)) (if (or (zero? k) (< (A005117 k) (- n (A005117 k)))) s (loop (- k 1) (+ s (if (and (= 1 (A008966 (- n (A005117 k)))) (zero? (A004198bi (A005117 k) (- n (A005117 k))))) 1 0)))))) ;; Where A004198bi implements bitwise-AND (A004198).
    

Formula

a(n) = Sum_{i=1..floor(n/2)} abs(mu(i)*mu(n-i))*[A003987(i,n-i) == n]. (Here [] is Iverson bracket, giving in this case 1 only if (i XOR (n-i)) is equal to n, and 0 otherwise. mu is Moebius mu function, A008683.)
a(n) <= A071068(n).
a(n) <= A088512(n).

A057639 First differences of zero-sites (A028442) of Mertens's function A002321.

Original entry on oeis.org

37, 1, 18, 7, 28, 8, 44, 4, 1, 9, 1, 3, 1, 2, 48, 17, 1, 3, 1, 2, 16, 75, 2, 1, 1, 20, 2, 1, 2, 4, 1, 1, 2, 27, 8, 2, 1, 1, 2, 1, 5, 1, 5, 1, 2, 1, 1, 1, 2, 1, 109, 4, 66, 1, 27, 1, 1, 144, 4, 8, 2, 1, 2, 13, 1, 2, 9, 1, 1, 24, 1, 3, 16, 8, 6, 1, 2, 3, 4, 2, 1, 2, 5, 1, 2, 4, 3, 2, 1, 3, 1, 82, 3, 5
Offset: 1

Views

Author

Labos Elemer, Oct 11 2000

Keywords

Comments

Mertens's function (A002321) is oscillating. The width of its waves is given here.

Crossrefs

Programs

  • Mathematica
    Differences[Position[Accumulate[Array[MoebiusMu,1500]],0]//Flatten] (* Harvey P. Dale, Nov 10 2016 *)
  • PARI
    lista(kmax) = {my(s = 0, k1 = 2); for(k2 = 3, kmax, s += moebius(k2); if(s == 0, print1(k2 - k1, ", "); k1 = k2));} \\ Amiram Eldar, Jun 09 2024

Formula

a(n) = A028442(n+1) - A028442(n).

Extensions

Offset corrected by Amiram Eldar, Jun 09 2024

A068576 Numbers k such that Sum_{j=1..k} mu(j)^2 = floor(6*k/Pi^2).

Original entry on oeis.org

28, 56, 153, 172, 173, 175, 176, 177, 178, 180, 181, 344, 351, 352, 353, 354, 356, 357, 361, 362, 363, 365, 366, 367, 368, 370, 371, 373, 374, 375, 383, 386, 391, 393, 394, 395, 396, 397, 400, 405, 408, 425, 428, 640, 752, 848, 849, 850, 851, 852, 853, 854
Offset: 1

Views

Author

Benoit Cloitre, Mar 26 2002

Keywords

Crossrefs

Programs

  • Mathematica
    seq[max_] := Flatten @ Position[Accumulate @ Array[Boole @ SquareFreeQ[#] &, max] - Floor[6*Range[max]/Pi^2], 0]; seq[1000] (* Amiram Eldar, Feb 17 2021 *)
  • PARI
    isok(k) = sum(j=1, k, moebius(j)^2) == 6*k\Pi^2; \\ Michel Marcus, Feb 15 2021

A070544 Number of squarefree numbers s such that n < s < 2n.

Original entry on oeis.org

0, 1, 1, 3, 2, 3, 3, 5, 6, 6, 6, 8, 7, 7, 7, 9, 9, 11, 11, 13, 13, 14, 13, 15, 15, 15, 16, 17, 17, 18, 18, 19, 19, 20, 20, 22, 22, 22, 22, 24, 23, 24, 24, 26, 27, 27, 27, 29, 30, 30, 30, 32, 32, 34, 34, 36, 36, 37, 36, 38, 37, 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, 44, 44, 44, 45
Offset: 1

Views

Author

Benoit Cloitre, May 02 2002

Keywords

Crossrefs

Programs

Formula

Limit_{n -> oo} a(n)/n = 6/Pi^2 (A059956).
From Wesley Ivan Hurt, Jan 08 2022: (Start)
a(n) = Sum_{k=1..n-1} mu(2n-k)^2.
a(n) = Sum_{k=n+1..2n-1} mu(k)^2.
a(n) = Sum_{k=(n^2-n+2)/2..(n^2+n-2)/2} mu(A128076(k))^2. (End)
a(n) = A013928(2*n) - A013928(n) - A008966(n). - Amiram Eldar, Apr 29 2025

A230490 Size of largest subset of [1..n] containing no three terms in a geometric progression with integer ratio.

Original entry on oeis.org

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

Views

Author

Nathan McNew, Oct 20 2013

Keywords

Comments

Trivial lower bound: a(n) >= A013928(n+1). - Charles R Greathouse IV, Oct 20 2013
McNew proves that if n is sufficiently large, then the n-th term is between 0.818n and 0.820n. - Kevin O'Bryant, Aug 17 2015

Examples

			The integers [1..9] include the three geometric progressions (1,2,4) (2,4,8) and (1,3,9), which cannot all be precluded with any 1 exclusion, but 2 exclusions suffice. Thus the size of the largest subsets of [1..9] free of integer ratio geometric progressions is 7.
		

Crossrefs

Cf. A003002, A013928, A208746 is similar but also allows progressions with rational ratio, like (4,6,9).

Programs

  • PARI
    ok(v)=for(i=3,#v,my(k=v[i]);fordiv(core(k,1)[2],d,if(d>1 && setsearch(v,k/d) && setsearch(v,k/d^2), return(0)))); 1
    a(n)=my(v=select(k->4*k>n&&issquarefree(k),vector(n,i,i)), u=setminus(vector(n, i,i),v),r,H);for(i=1,2^#u-1,H=hammingweight(i); if(H>r && ok(vecsort(concat(v,vecextract(u,i)),,8)),r=H));#v+r \\ Charles R Greathouse IV, Oct 20 2013

A243284 a(n) = the number of distinct ways of writing such products m = k^2 * j, 0 < j <= k, (j and k natural numbers) that m is in range [1,n]; Partial sums of A102354.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 17
Offset: 1

Views

Author

Antti Karttunen, Jun 02 2014

Keywords

Comments

a(n) = the number of distinct ways of writing such products m = k^2 * j, 0 < j <= k, (j and k natural numbers) that m is in range [1,n].
Different ways to write product for the same m are counted separately, e.g. for 64, both 8^2 * 1 and 4^2 * 4 are counted, so a(64) = a(63)+2 = 13+2 = 15.
Differs from A243283 for the first time at n=48, where a(48)=11, while A243283(48)=10. This is because 48 = 2*2*2*2*3 is the first integer which can be represented in the form k^2 * j, 0 < j <= k (namely as 48 = 4^2 * 3), even though it is not a member of A070003.

Crossrefs

Partial sums of A102354.

A246419 Numbers n such that n^6 - 2 is not squarefree.

Original entry on oeis.org

10, 22, 50, 143, 204, 267, 311, 312, 423, 455, 461, 479, 506, 556, 579, 600, 649, 818, 845, 889, 987, 1008, 1104, 1108, 1134, 1178, 1258, 1273, 1333, 1343, 1416, 1423, 1467, 1537, 1610, 1637, 1712, 1756, 1779, 2001, 2005, 2045, 2065, 2066, 2104, 2166, 2205
Offset: 1

Views

Author

Mark E. Shoulson, Aug 25 2014

Keywords

Examples

			10^6 - 2 = 999998, which is divisible by 16129 = 127^2, so 10 is in the sequence.
11^6 - 2 = 1771559, which is prime, and 12^6 - 2 = 2985982 = 2 * 17 * 31 * 2833 (all prime), so neither of these numbers is in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..3000] | not IsSquarefree(n^6-2)]; // Vincenzo Librandi, Oct 16 2014
  • Maple
    remove(t -> numtheory:-issqrfree(t^6-2), [$1..3000]); # Robert Israel, Aug 25 2014
  • Mathematica
    Select[Range[2000], MoebiusMu[#^6 - 2] == 0 &] (* Alonso del Arte, Aug 25 2014 *)
  • PARI
    isok(n) = ! issquarefree(n^6-2); \\ Michel Marcus, Oct 11 2014
    
  • Python
    from sympy import factorint
    [i for i in range(1, 500) if any(v>1 for v in factorint(i**6-2).values())]
    

A285881 Number of even squarefree numbers <= n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 27 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Boole[EvenQ[k] && SquareFreeQ[k]], {k, 1, n}], {n, 85}]
    nmax = 85; Rest[CoefficientList[Series[Sum[Boole[EvenQ[k] && MoebiusMu[k]^2 == 1] x^k/(1 - x), {k, 1, nmax}], {x, 0, nmax}], x]]
  • Python
    from sympy.ntheory.factor_ import core
    def a(n): return sum([1 for k in range(1, n + 1) if k%2==0 and core(k)==k]) # Indranil Ghosh, Apr 28 2017

Formula

G.f.: Sum_{k>=1} x^A039956(k)/(1 - x).
a(n) ~ 2*n/Pi^2.

A294062 Sum of the differences of the larger and smaller parts in the partitions of 2n into two parts with the smaller part squarefree.

Original entry on oeis.org

0, 2, 6, 12, 18, 26, 36, 48, 60, 72, 86, 102, 118, 136, 156, 178, 200, 224, 248, 274, 300, 328, 358, 390, 422, 454, 488, 522, 556, 592, 630, 670, 710, 752, 796, 842, 888, 936, 986, 1038, 1090, 1144, 1200, 1258, 1316, 1374, 1434, 1496, 1558, 1620, 1682, 1746
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 22 2017

Keywords

Comments

Sum of the slopes of the tangent lines along the left side of the parabola b(x) = 2*n*x-x^2 at squarefree values of x for x in 0 < x <= n. For example, d/dx 2*n*x-x^2 = 2n-2x. So for a(6), the squarefree values of x are x=1,2,3,5,6 and so a(6) = 12-2*1 + 12-2*2 + 12-2*3 + 12-2*5 + 12-2*6 = 10 + 8 + 6 + 2 = 26. - Wesley Ivan Hurt, Mar 25 2018

Examples

			For n = 4, 8 can be partitioned into two parts with the smaller part squarefree in three ways: 7 + 1, 6 + 2, and 5 + 3, so a(4) = (7 - 1) + (6 - 2) + (5 - 3) = 12. - _Michael B. Porter_, Mar 27 2018
		

Crossrefs

Programs

  • Mathematica
    Table[2*Sum[(n - i) MoebiusMu[i]^2, {i, n}], {n, 80}]
  • PARI
    a(n) = 2 * sum(i=1, n, (n-i)*issquarefree(i)); \\ Michel Marcus, Mar 26 2018

Formula

a(n) = 2 * Sum_{i=1..n} (n - i) * mu(i)^2, where mu is the Möbius function (A008683).
a(n) = 2*(n*A013928(n) - A066779(n)). - Wesley Ivan Hurt, Jul 08 2025

A351520 Number of numbers <= n that are either squarefree, a divisor of n, or both.

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 6, 8, 7, 7, 8, 10, 9, 10, 11, 14, 12, 14, 13, 15, 14, 15, 16, 20, 17, 17, 19, 19, 18, 19, 20, 24, 21, 22, 23, 28, 24, 25, 26, 30, 27, 28, 29, 31, 31, 30, 31, 37, 32, 33, 32, 34, 33, 37, 34, 38, 35, 36, 37, 41, 38, 39, 41, 44, 40, 41, 42, 44, 43, 44, 45, 53, 46, 47, 49
Offset: 1

Views

Author

Wesley Ivan Hurt, Feb 12 2022

Keywords

Examples

			a(10) = 7; There are 7 numbers less than or equal to 10 that are either squarefree, a divisor of 10, or both. The numbers are 1,2,3,5,6,7,10.
		

Crossrefs

Cf. A000005 (tau), A013928, A034444.

Programs

  • Maple
    f:= proc(n) nops(select(t -> n mod t = 0 or numtheory:-issqrfree(t), [$1..n])) end proc:
    map(f, [$1..100]); # Robert Israel, Dec 09 2024
  • Mathematica
    Module[{nn=80,sf},sf=Select[Range[nn],SquareFreeQ[#]&];Table[Length[Union[Select[sf,#<= n&],Divisors[n]]],{n,nn}]] (* Harvey P. Dale, Jul 03 2023 *)

Formula

a(n) = tau(n) + Sum_{k=1..n} mu(k)^2 - Sum_{d|n} mu(d)^2.
a(n) = A000005(n) + A013928(n+1) - A034444(n).
Previous Showing 91-100 of 104 results. Next