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.

A008966 a(n) = 1 if n is squarefree, otherwise 0.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Keywords

Comments

a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3*3 and 375 = 3*5^3 both have prime signature (3, 1).
The infinite lower triangular matrix with A008966 on the main diagonal and the rest zeros is the square of triangle A143255. - Gary W. Adamson, Aug 02 2008

Crossrefs

Cf. A005117, A008836 (Dirichlet inverse), A013928 (partial sums).
Parity of A002033.
Cf. A082020 (Dgf at s=2), A157289 (Dgf at s=3), A157290 (Dgf at s=4).

Programs

  • Haskell
    a008966 = abs . a008683
    -- Reinhard Zumkeller, Dec 13 2015, Dec 15 2014, May 27 2012, Jan 25 2012
    
  • Magma
    [ Abs(MoebiusMu(n)) : n in [1..100]];
    
  • Maple
    A008966 := proc(n) if numtheory[issqrfree](n) then 1 ; else 0 ; end if; end proc: # R. J. Mathar, Mar 14 2011
  • Mathematica
    A008966[n_] := Abs[MoebiusMu[n]]; Table[A008966[n], {n, 100}] (* Enrique Pérez Herrero, Apr 15 2010 *)
    Table[If[SquareFreeQ[n],1,0],{n,100}] (* or *) Boole[SquareFreeQ/@ Range[ 100]] (* Harvey P. Dale, Feb 28 2015 *)
  • MuPAD
    func(abs(numlib::moebius(n)), n):
    
  • PARI
    a(n)=if(n<1,0,direuler(p=2,n,1+X))[n]
    
  • PARI
    a(n)=issquarefree(n) \\ Michel Marcus, Feb 22 2015
    
  • Python
    from sympy import factorint
    def A008966(n): return int(max(factorint(n).values(),default=1)==1) # Chai Wah Wu, Apr 05 2023

Formula

Dirichlet g.f.: zeta(s)/zeta(2s).
a(n) = abs(mu(n)), where mu is the Moebius function (A008683).
a(n) = 0^(bigomega(n) - omega(n)), where bigomega(n) and omega(n) are the numbers of prime factors of n with and without repetition (A001222, A001221, A046660). - Reinhard Zumkeller, Apr 05 2003
Multiplicative with p^e -> 0^(e - 1), p prime and e > 0. - Reinhard Zumkeller, Jul 15 2003
a(n) = 0^(A046951(n) - 1). - Reinhard Zumkeller, May 20 2007
a(n) = 1 - A107078(n). - Reinhard Zumkeller, Oct 03 2008
a(n) = floor(rad(n)/n), where rad() is A007947. - Enrique Pérez Herrero, Nov 13 2009
A175046(n) = a(n)*A073311(n). - Reinhard Zumkeller, Apr 05 2010
a(n) = floor(A000005(n^2)/A007425(n)). - Enrique Pérez Herrero, Apr 15 2010
a(A005117(n)) = 1; a(A013929(n)) = 0; a(n) = A013928(n + 1) - A013928(n). - Reinhard Zumkeller, Jul 05 2010
a(n) * A112526(n) = A063524(n). - Reinhard Zumkeller, Sep 16 2011
a(n) = mu(n) * lambda(n) = A008836(n) * A008683(n). - Enrique Pérez Herrero, Nov 29 2013
a(n) = Sum_{d|n} 2^omega(d)*mu(n/d). - Geoffrey Critzer, Feb 22 2015
a(n) = A085357(A156552(n)). - Antti Karttunen, Mar 06 2017
Limit_{n->oo} (1/n)*Sum_{j=1..n} a(j) = 6/Pi^2. - Andres Cicuttin, Aug 13 2017
a(1) = 1; a(n) = -Sum_{d|n, d < n} (-1)^bigomega(n/d) * a(d). - Ilya Gutkovskiy, Mar 10 2021

Extensions

Deleted an unclear comment. - N. J. A. Sloane, May 30 2021

A045943 Triangular matchstick numbers: a(n) = 3*n*(n+1)/2.

Original entry on oeis.org

0, 3, 9, 18, 30, 45, 63, 84, 108, 135, 165, 198, 234, 273, 315, 360, 408, 459, 513, 570, 630, 693, 759, 828, 900, 975, 1053, 1134, 1218, 1305, 1395, 1488, 1584, 1683, 1785, 1890, 1998, 2109, 2223, 2340, 2460, 2583, 2709, 2838, 2970, 3105, 3243, 3384, 3528
Offset: 0

Views

Author

Keywords

Comments

Also, 3 times triangular numbers, a(n) = 3*A000217(n).
In the 24-bit RGB color cube, the number of color-lattice-points in r+g+b = n planes at n < 256 equals the triangular numbers. For n = 256, ..., 765 the number of legitimate color partitions is less than A000217(n) because {r,g,b} components cannot exceed 255. For n = 256, ..., 511, the number of non-color partitions are computable with A045943(n-255), while for n = 512, ..., 765, the number of color points in r+g+b planes equals A000217(765-n). - Labos Elemer, Jun 20 2005
If a 3-set Y and an (n-3)-set Z are disjoint subsets of an n-set X then a(n-3) is the number of 3-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 19 2007
a(n) is also the smallest number that may be written both as the sum of n-1 consecutive positive integers and n consecutive positive integers. - Claudio Meller, Oct 08 2010
For n >= 3, a(n) equals 4^(2+n)*Pi^(1 - n) times the coefficient of zeta(3) in the following integral with upper bound Pi/4 and lower bound 0: int x^(n+1) tan x dx. - John M. Campbell, Jul 17 2011
The difference a(n)-a(n-1) = 3*n, for n >= 1. - Stephen Balaban, Jul 25 2011 [Comment clarified by N. J. A. Sloane, Aug 01 2024]
Sequence found by reading the line from 0, in the direction 0, 3, ..., and the same line from 0, in the direction 0, 9, ..., in the square spiral whose vertices are the generalized pentagonal numbers A001318. This is one of the orthogonal axes of the spiral; the other is A032528. - Omar E. Pol, Sep 08 2011
A005449(a(n)) = A000332(3n + 3) = C(3n + 3, 4), a second pentagonal number of triangular matchstick number index number. Additionally, a(n) - 2n is a pentagonal number (A000326). - Raphie Frank, Dec 31 2012
Sum of the numbers from n to 2n. - Wesley Ivan Hurt, Nov 24 2015
Number of orbits of Aut(Z^7) as function of the infinity norm (n+1) of the representative integer lattice point of the orbit, when the cardinality of the orbit is equal to 5376 or 17920 or 20160. - Philippe A.J.G. Chevalier, Dec 28 2015
Also the number of 4-cycles in the (n+4)-triangular honeycomb acute knight graph. - Eric W. Weisstein, Jul 27 2017
Number of terms less than 10^k, k=0,1,2,3,...: 1, 3, 8, 26, 82, 258, 816, 2582, 8165, 25820, 81650, 258199, 816497, 2581989, 8164966, ... - Muniru A Asiru, Jan 24 2018
Numbers of the form 3*m*(2*m + 1) for m = 0, -1, 1, -2, 2, -3, 3, ... - Bruno Berselli, Feb 26 2018
Partial sums of A008585. - Omar E. Pol, Jun 20 2018
Column 1 of A273464. (Number of ways to select a unit lozenge inside an isosceles triangle of side length n; all vertices on a hexagonal lattice.) - R. J. Mathar, Jul 10 2019
Total number of pips in the n-th suit of a double-n domino set. - Ivan N. Ianakiev, Aug 23 2020

Examples

			From _Stephen Balaban_, Jul 25 2011: (Start)
T(n), the triangular numbers = number of nodes,
a(n-1) = number of edges in the T(n) graph:
       o    (T(1) = 1, a(0) = 0)
       o
      / \   (T(2) = 3, a(1) = 3)
     o - o
       o
      / \
     o - o  (T(3) = 6, a(2) = 9)
    / \ / \
   o - o - o
... [Corrected by _N. J. A. Sloane_, Aug 01 2024] (End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 543.

Crossrefs

The generalized pentagonal numbers b*n+3*n*(n-1)/2, for b = 1 through 12, form sequences A000326, A005449, A045943, A115067, A140090, A140091, A059845, A140672, A140673, A140674, A140675, A151542.
A diagonal of A010027.
Orbits of Aut(Z^7) as function of the infinity norm A000579, A154286, A102860, A002412, A115067, A008585, A005843, A001477, A000217.
Cf. A027480 (partial sums).
Cf. A002378 (3-cycles in triangular honeycomb acute knight graph), A028896 (5-cycles), A152773 (6-cycles).
This sequence: Sum_{k = n..2*n} k.
Cf. A304993: Sum_{k = n..2*n} k*(k+1)/2.
Cf. A050409: Sum_{k = n..2*n} k^2.
Similar sequences are listed in A316466.

Programs

Formula

a(n) is the sum of n+1 integers starting from n, i.e., 1+2, 2+3+4, 3+4+5+6, 4+5+6+7+8, etc. - Jon Perry, Jan 15 2004
a(n) = A126890(n+1,n-1) for n>1. - Reinhard Zumkeller, Dec 30 2006
a(n) + A145919(3*n+3) = 0. - Matthew Vandermast, Oct 28 2008
a(n) = A000217(2*n) - A000217(n-1); A179213(n) <= a(n). - Reinhard Zumkeller, Jul 05 2010
a(n) = a(n-1)+3*n, n>0. - Vincenzo Librandi, Nov 18 2010
G.f.: 3*x/(1-x)^3. - Bruno Berselli, Jan 21 2011
a(n) = A005448(n+1) - 1. - Omar E. Pol, Oct 03 2011
a(n) = A001477(n)+A000290(n)+A000217(n). - J. M. Bergot, Dec 08 2012
a(n) = 3*a(n-1)-3*a(n-2)+a(n-3) for n>2. - Wesley Ivan Hurt, Nov 24 2015
a(n) = A027480(n)-A027480(n-1). - Peter M. Chema, Jan 18 2017.
2*a(n)+1 = A003215(n). - Miquel Cerda, Jan 22 2018
a(n) = T(2*n) - T(n-1), where T(n) = A000217(n). In general, T(k)*T(n) = Sum_{i=0..k-1} (-1)^i*T((k-i)*(n-i)). - Charlie Marion, Dec 06 2020
E.g.f.: 3*exp(x)*x*(2 + x)/2. - Stefano Spezia, May 19 2021
From Amiram Eldar, Jan 10 2022: (Start)
Sum_{n>=1} 1/a(n) = 2/3.
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*(2*log(2)-1)/3. (End)
Product_{n>=1} (1 - 1/a(n)) = -(3/(2*Pi))*cos(sqrt(11/3)*Pi/2). - Amiram Eldar, Feb 21 2023

A073837 Sum of primes p satisfying n <= p <= 2n.

Original entry on oeis.org

2, 5, 8, 12, 12, 18, 31, 24, 41, 60, 60, 72, 72, 59, 88, 119, 119, 102, 139, 120, 161, 204, 204, 228, 228, 228, 281, 281, 281, 311, 372, 341, 341, 408, 408, 479, 552, 515, 515, 594, 594, 636, 636, 593, 682, 682, 682, 635, 732, 732, 833, 936, 936, 990, 1099, 1099
Offset: 1

Views

Author

Amarnath Murthy, Aug 12 2002

Keywords

Comments

a(n) = A034387(2*n) - A034387(n-1); a(n) <= A179213(n). [Reinhard Zumkeller, Jul 05 2010]

Examples

			a(7) = 31 = 7+11+13 (sum of primes between 7 and 14).
		

Crossrefs

Cf. A073838.

Programs

  • Maple
    for n from 1 to 150 do l := 0:for j from n to 2*n do if isprime(j) then l := l+j:fi:od:a[n] := l:od:seq(a[j],j=1..150);
  • Mathematica
    Table[Total[Select[Range[n, 2 n], PrimeQ]], {n, 56}] (* Jayanta Basu, Aug 12 2013 *)
  • PARI
    a(n)=sum(i=n,2*n,i*isprime(i))

Extensions

More terms from Sascha Kurz and Benoit Cloitre, Aug 14 2002

A179211 Number of squarefree numbers between n and 2*n (inclusive).

Original entry on oeis.org

2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 8, 9, 8, 9, 9, 11, 11, 13, 13, 15, 15, 15, 15, 15, 16, 16, 17, 19, 19, 20, 19, 21, 21, 22, 22, 24, 23, 24, 24, 25, 25, 26, 26, 27, 28, 29, 29, 30, 30, 32, 32, 34, 34, 36, 36, 38, 38, 38, 38, 39, 39, 38, 39, 41, 41, 42, 41, 43, 43, 44, 44, 46, 45, 45
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 05 2010

Keywords

Crossrefs

Programs

  • Maple
    a := n -> nops(select(issqrfree, [$n..(2*n)])):
    seq(a(n), n=1..75); # Peter Luschny, Mar 02 2017
  • Mathematica
    a[n_] := Select[Range[n, 2n], SquareFreeQ] // Length;
    Array[a, 75] (* Jean-François Alcover, Jun 22 2018 *)
  • PARI
    f(n)=my(s); forfactored(k=1,sqrtint(n), s += n\k[1]^2*moebius(k)); s
    a(n)=f(2*n)-f(n-1) \\ Charles R Greathouse IV, Nov 05 2017

Formula

a(n) = Sum_{k=n..2*n} A008966(k).
a(n) > A035250(n) for n>2;
A179212(n) = a(n+1) - a(n);
a(n) = A013928(2*n+1) - A013928(n).
a(n) ~ (6/Pi^2) * n. - Amiram Eldar, Mar 03 2021

A066779 Sum of squarefree numbers <= n.

Original entry on oeis.org

1, 3, 6, 6, 11, 17, 24, 24, 24, 34, 45, 45, 58, 72, 87, 87, 104, 104, 123, 123, 144, 166, 189, 189, 189, 215, 215, 215, 244, 274, 305, 305, 338, 372, 407, 407, 444, 482, 521, 521, 562, 604, 647, 647, 647, 693, 740, 740, 740, 740, 791, 791, 844, 844, 899, 899
Offset: 1

Views

Author

Benoit Cloitre, Jan 18 2002

Keywords

References

  • D. Suryanarayana, The number and sum of k-free integers <= x which are prime to n, Indian J. Math., Vol. 11 (1969), pp. 131-139.

Crossrefs

Programs

  • Mathematica
    Table[ n*Boole[ SquareFreeQ[n] ], {n, 1, 56}] // Accumulate (* Jean-François Alcover, Jun 18 2013 *)
  • PARI
    s=0; for (n=1, 1000, write("b066779.txt", n, " ", s+=moebius(n)^2*n) ) \\ Harry J. Smith, Mar 24 2010
    
  • PARI
    a(n)=sum(d=1,sqrtint(n),moebius(d)*d^2*binomial(n\d^2+1,2)) \\ Charles R Greathouse IV, Apr 26 2012
    
  • PARI
    a(n)=my(s,k2); forsquarefree(k=1,sqrtint(n), k2=k[1]^2; s+= k2*binomial(n\k2+1,2)*moebius(k)); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from sympy.ntheory.factor_  import core
    def a(n): return sum ([i for i in range(1, n + 1) if core(i) == i]) # Indranil Ghosh, Apr 16 2017

Formula

a(n) = Sum_{i=1..n} mu(i)^2*i.
a(n) = Sum_{k=1..n} k*A008966(k). - Reinhard Zumkeller, Jul 05 2010
a(n) = Sum_{d=1..sqrt(n)} mu(d)*d^2*floor(n/d^2)*floor(n/d^2+1)/2. - Charles R Greathouse IV, Apr 26 2012
G.f.: Sum_{k>=1} mu(k)^2*k*x^k/(1 - x). - Ilya Gutkovskiy, Apr 16 2017
a(n) ~ (3/Pi^2) * n^2 + O(n^(3/2)) (Suryanarayana, 1969). - Amiram Eldar, Mar 07 2021

A179214 Product of squarefree numbers between n and 2*n (inclusive).

Original entry on oeis.org

2, 6, 90, 210, 2100, 4620, 140140, 300300, 5105100, 96996900, 4481256780, 9369900540, 243617414040, 18739801080, 1164544781400, 2406725881560, 2700346439110320, 5559536786403600, 7816708721683461600
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 05 2010

Keywords

Comments

A073838(n) <= a(n) <= A126804(n);
a(n) = A179215(2*n)/A179215(n-1).

Examples

			a(10) = 10*11*13*14*15*17*19 = 96996900;
a(11) = 11*13*14*15*17*19*21*22 = 4481256780;
a(12) = 13*14*15*17*19*21*22*23 = 9369900540.
		

Crossrefs

Formula

a(n) = PROD(k^A008966(k): n <= k <= 2*n).

Extensions

Example corrected by Reinhard Zumkeller, Jul 19 2010
Showing 1-6 of 6 results.