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.

A085945 Number of subsets of {1,2,...,n} with relatively prime elements.

Original entry on oeis.org

1, 2, 5, 11, 26, 53, 116, 236, 488, 983, 2006, 4016, 8111, 16238, 32603, 65243, 130778, 261566, 523709, 1047479, 2095988, 4192115, 8386418, 16772858, 33550058, 67100393, 134209001, 268418531, 536853986, 1073707991, 2147449814, 4294900694, 8589866963
Offset: 1

Views

Author

Vladeta Jovovic, Aug 17 2003

Keywords

Examples

			For n=4 there are 11 such subsets: {1}, {1,2}, {1,3}, {1,4}, {2,3}, {3,4}, {1,2,3}, {1,2,4}, {1,3,4}, {2,3,4}, {1,2,3,4}.
		

Crossrefs

Row sums of A143446.
Column k=2 of A143327.

Programs

  • Maple
    b:= n-> add(`if`(d=n, 2^(n-1), -b(d)), d=numtheory[divisors](n)):
    a:= proc(n) option remember; b(n)+`if`(n<2, 0, a(n-1)) end:
    seq(a(n), n=1..35);  # Alois P. Heinz, Oct 05 2018
  • Mathematica
    Table[Sum[MoebiusMu[k] (2^Floor[n/k] - 1), {k, 1, n}], {n, 1, 31}]  (* Geoffrey Critzer, Jan 03 2012 *)
  • PARI
    a(n)=sum(k=1,n,moebius(k)*(2^floor(n/k)-1)) \\ Charles R Greathouse IV, Feb 04 2013

Formula

Partial sums of A000740. G.f.: 1/(1-x)* Sum_{k>0} mu(k)*x^k/(1-2*x^k).
a(n) = 2^n - A109511(n) - 1. - Reinhard Zumkeller, Jul 01 2005
a(n) = Sum_{k=1..n} mu(k)*(2^floor(n/k)-1). - Geoffrey Critzer, Jan 03 2012

A339667 Number of nonempty subsets of divisors of n having a common factor > 1.

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 1, 7, 3, 5, 1, 19, 1, 5, 5, 15, 1, 19, 1, 19, 5, 5, 1, 71, 3, 5, 7, 19, 1, 37, 1, 31, 5, 5, 5, 111, 1, 5, 5, 71, 1, 37, 1, 19, 19, 5, 1, 271, 3, 19, 5, 19, 1, 71, 5, 71, 5, 5, 1, 347, 1, 5, 19, 63, 5, 37, 1, 19, 5, 37, 1, 703, 1, 5, 19, 19, 5, 37, 1, 271
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 12 2020

Keywords

Examples

			a(12) = 19 subsets: {2}, {3}, {4}, {6}, {12}, {2, 4}, {2, 6}, {2, 12}, {3, 6}, {3, 12}, {4, 6}, {4, 12}, {6, 12}, {2, 4, 6}, {2, 4, 12}, {2, 6, 12}, {3, 6, 12}, {4, 6, 12} and {2, 4, 6, 12}.
		

Crossrefs

Programs

  • Mathematica
    Table[-DivisorSum[n, MoebiusMu[n/#] (2^DivisorSigma[0, #] - 1) &, # < n &], {n, 80}]
  • PARI
    A339667(n) = -sumdiv(n, d, if(d==n,0, moebius(n/d)*((2^numdiv(d))-1))); \\ Antti Karttunen, Dec 15 2021

Formula

a(n) = -Sum_{d|n, d < n} mu(n/d) * (2^tau(d) - 1), where tau = A000005, and mu = A008683.
a(n) = A100587(n) - A076078(n).
a(p) = 1 for p prime.
Showing 1-2 of 2 results.