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

A161664 a(n) = Sum_{i=1..n} (i - d(i)), where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

0, 0, 1, 2, 5, 7, 12, 16, 22, 28, 37, 43, 54, 64, 75, 86, 101, 113, 130, 144, 161, 179, 200, 216, 238, 260, 283, 305, 332, 354, 383, 409, 438, 468, 499, 526, 561, 595, 630, 662, 701, 735, 776, 814, 853, 895, 940, 978, 1024, 1068, 1115, 1161, 1212, 1258, 1309
Offset: 1

Views

Author

Enoch Haga, Jun 15 2009

Keywords

Comments

Partial Sums of A049820. - Omar E. Pol, Jun 18 2009
The original definition was: Safe periods for the emergence of cicada species on prime number cycles.
See Table 9 in reference, page 75, which together with the chart on page 73 (see link) provide a mathematical basis for the emergence of cicada species on prime number cycles.
Also the number of 2-element nondividing subsets of {1, ..., n}. The a(6)=7 subsets of {1,2,3,4,5,6} with two elements where no element divides the other are: {2,3}, {2,5}, {3,4}, {3,5}, {4,5}, {4,6}, {5,6}. - Alois P. Heinz, Mar 08 2011
Sum of the number of proper nondivisors of all positive integers <= n. - Omar E. Pol, Feb 13 2014

Examples

			a(8) in A000217 minus a(8) in A006218 = a(7) above (28-16=12).
Referring to the chart referenced, when n-th year = 7 there are 16 x-markers.
These represent unsafe periods for cicada emergence: 28-16=12 safe periods.
The percent of safe periods for the entire 7 years is 12/28=~42.86%; for year 7 alone the calculation is 5/7 = 71.43%, a relatively good time to emerge.
		

References

  • Enoch Haga, Eratosthenes goes bugs! Exploring Prime Numbers, 2007, pp 71-80; first publication 1994.

Crossrefs

Column 2 of triangle A187489 or of A355145.

Programs

  • Maple
    with(numtheory): A161664:=n->add(i-tau(i), i=1..n): seq(A161664(n), n=1..100); # Wesley Ivan Hurt, Jul 15 2014
    # second Maple program:
    a:= proc(n) option remember; `if`(n<1, 0,
          a(n-1)+n-numtheory[tau](n))
        end:
    seq(a(n), n=1..55);  # Alois P. Heinz, Jun 24 2022
  • Mathematica
    a[n_] := n*(n+1)/2 - Sum[ DivisorSigma[0, k], {k, n}]; Table[a[n], {n, 55}] (* Jean-François Alcover, Nov 07 2011 *)
  • Python
    from math import isqrt
    def A161664(n): return (lambda m: n*(n+1)//2+m*m-2*sum(n//k for k in range(1, m+1)))(isqrt(n)) # Chai Wah Wu, Oct 08 2021

Formula

a(n) = A000217(n) - A006218(n).
For n>1: a(n) = Sum_{h=1..n} Sum_{m=1..1 + 2*floor(n/2 - 1/2)} Sum_{k=1 + floor(h/(m + 1))..floor(h/m - 1/m)} 1 (from Granvik at A368592). - Bill McEachen, Apr 01 2025

Extensions

Simplified definition, offset corrected and partially edited by Omar E. Pol, Jun 18 2009
New name from Wesley Ivan Hurt, Jul 15 2014

A068063 Maximum cardinality of a nondividing subset of {1, 2, ..., n}.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8
Offset: 0

Views

Author

David Wasserman, Feb 15 2002

Keywords

Comments

A set is called nondividing if no element divides the sum of any nonempty subset of the other elements.

Examples

			a(65) = 8 because 8 is the maximal cardinality of a nondividing subset of {1, 2, ..., 65}.  Two different subsets have cardinality 8:
{36,40,48,49,53,61,64,65}, {30,44,45,49,50,59,64,65}.
		

Crossrefs

Extensions

a(41)-a(65) from Alois P. Heinz, Mar 10 2011

A051014 Number of nondividing sets on {1,2,...,n}.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 14, 21, 27, 38, 52, 73, 90, 123, 159, 211, 263, 344, 413, 535, 658, 832, 1026, 1276, 1499, 1846, 2226, 2708, 3229, 3912, 4592, 5541, 6495, 7795, 9207, 10908, 12547, 14852, 17358, 20493, 23709, 27744, 31921, 37250, 43013, 49936, 57319, 66318
Offset: 0

Views

Author

Keywords

Comments

A set is called nondividing if no element divides the sum of any nonempty subset of the other elements.

Examples

			a(5) = 11 because there are 11 nondividing subsets of {1,2,3,4,5}: {}, {1}, {2}, {3}, {4}, {5}, {2,3}, {2,5}, {3,4}, {3,5}, {4,5}.
a(7) = 21: {}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {2,3}, {2,5}, {2,7}, {3,4}, {3,5}, {3,7}, {4,5}, {4,6}, {4,7}, {5,6}, {5,7}, {6,7}, {4,6,7}.
		

Crossrefs

Row sums of A187489. Cf. A068063.

Programs

  • Maple
    sums:= proc(s) option remember; local i, m;
              m:= max(s[]);
             `if`(m<1, {}, {m, seq([i,i+m][], i=sums(s minus {m}))})
           end:
    b:= proc(i,s) option remember; local j, ok, t, si;
          if i<2 then 1
        else si:= s union {i};
             ok:= true;
             for j in sums(si) while ok do
               for t in si while ok do
                 if irem(j, t)=0 and t<>j then ok:= false fi
               od
             od;
             b(i-1,s) +`if`(ok, b(i-1, si), 0)
          fi
        end:
    a:= n-> `if`(n=0, 1, 1+b(n, {})):
    seq(a(n), n=0..25);  # Alois P. Heinz, Mar 08 2011
  • Mathematica
    sums[s_] := sums[s] = Module[{m=Max[s]},
    If[m<1, {},
      Join[{m},
      Sequence@@Table[{i,i+m}, {i,sums[DeleteCases[s,m]]}]]]
    ];
    b[i_,s_] := b[i,s] = Module[{ ok,si,sij,sik},
    If[ i<2, 1, si = Union[s,{i}];
    ok = True;
    For[j=1, j <= Length[sums[si]] && ok, j++,
      sij = sums[si][[j]];
      For[k=1, k <= Length[si] && ok, k++,
        If[Divisible[sij,sik=si[[k]]]&&sij!=sik,ok=False]]];
        b[i-1, s] + If[ok, b[i-1,si],0]
      ]
    ];
    a[n_] := a[n] = If[n==0, 1, 1+b[n, {}]];
    Table[ Print[ a[n] ]; a[n], {n,0,47}]
    (* Jean-François Alcover, Oct 10 2012, after Alois P. Heinz *)

Extensions

More terms from David Wasserman, Feb 15 2002
a(41)-a(47) from Alois P. Heinz, Mar 08 2011

A187490 Number of 3-element nondividing subsets of {1, 2, ..., n}.

Original entry on oeis.org

1, 2, 6, 12, 22, 31, 49, 70, 99, 128, 176, 216, 284, 343, 423, 515, 633, 722, 860, 1007, 1173, 1333, 1552, 1729, 1989, 2223, 2502, 2809, 3138, 3416, 3819, 4226, 4658, 5049, 5570, 6016, 6601, 7146, 7719, 8371, 9100, 9686, 10461, 11208, 12039
Offset: 7

Views

Author

Alois P. Heinz, Mar 10 2011

Keywords

Comments

A set is called nondividing if no element divides the sum of any nonempty subset of the other elements.

Examples

			a(7) = 1 because there is one 3-element nondividing subset of {1,2,3,4,5,6,7}: {4,6,7}.
a(9) = 6: {4,6,7}, {4,6,9}, {5,6,8}, {5,8,9}, {6,7,9}, {6,8,9}.
		

Crossrefs

Column 3 of triangle A187489. Cf. A068063.

A187491 Number of 4-element nondividing subsets of {1, 2, ..., n}.

Original entry on oeis.org

1, 2, 3, 6, 10, 21, 32, 49, 65, 101, 150, 224, 305, 413, 525, 707, 908, 1174, 1479, 1871, 2269, 2826, 3396, 4138, 4967, 5991, 6917, 8244, 9673, 11328, 12958, 15091, 17112, 19771, 22468, 25485, 28870, 32861, 36298, 40969, 45615, 51015
Offset: 10

Views

Author

Alois P. Heinz, Mar 10 2011

Keywords

Comments

A set is called nondividing if no element divides the sum of any nonempty subset of the other elements.

Examples

			a(10) = 1 because there is one 4-element nondividing subset of {1,2,...,10}: {6,7,9,10}.
		

Crossrefs

Column 4 of triangle A187489. Cf. A068063.

A187492 Number of 5-element nondividing subsets of {1, 2, ..., n}.

Original entry on oeis.org

2, 4, 6, 11, 15, 24, 50, 83, 127, 209, 310, 431, 679, 921, 1229, 1624, 2145, 2770, 3752, 4866, 6141, 7753, 9679, 12005, 15027, 18134, 22045, 26368, 31712, 37763, 45569, 53810, 63393, 73560, 86496, 100071, 117234, 134623, 155465, 176876
Offset: 21

Views

Author

Alois P. Heinz, Mar 10 2011

Keywords

Comments

A set is called nondividing if no element divides the sum of any nonempty subset of the other elements.

Examples

			a(21) = 2 because there are two 5-element nondividing subsets of {1,2,...,21}: {12,16,18,19,21}, {12,14,18,20,21}.
		

Crossrefs

Column 5 of triangle A187489. Cf. A068063.

A187493 Number of 6-element nondividing subsets of {1, 2, ..., n}.

Original entry on oeis.org

1, 3, 4, 7, 15, 27, 45, 55, 85, 133, 199, 262, 378, 534, 803, 999, 1319, 1742, 2309, 3007, 4020, 5166, 6565, 7950, 10380, 12882, 16533, 19664, 24099, 30912, 37550, 44092, 54465, 65117, 79616, 94144, 111780, 132592, 159228, 187506, 219949, 256514
Offset: 31

Views

Author

Alois P. Heinz, Mar 10 2011

Keywords

Comments

A set is called nondividing if no element divides the sum of any nonempty subset of the other elements.

Examples

			a(31) = 1 because there is one 6-element nondividing subset of {1,2,...,31}: {16,19,23,24,28,31}.
		

Crossrefs

Column 6 of triangle A187489. Cf. A068063.

A187494 Number of 7-element nondividing subsets of {1, 2, ..., n}.

Original entry on oeis.org

1, 1, 3, 3, 5, 5, 9, 12, 21, 27, 41, 46, 74, 99, 137, 153, 203, 307, 414, 464, 612, 788, 1126, 1292, 1645, 2039, 2614, 3291, 4120, 5127, 6356, 7180, 9786
Offset: 43

Views

Author

Alois P. Heinz, Mar 10 2011

Keywords

Comments

A set is called nondividing if no element divides the sum of any nonempty subset of the other elements.

Examples

			a(43) = 1 because there is one 7-element nondividing subset of {1,2,...,43}: {24,28,31,35,36,40,43}.
		

Crossrefs

Column 7 of triangle A187489. Cf. A068063.

A187550 Number of 8-element nondividing subsets of {1, 2, ..., n}.

Original entry on oeis.org

2, 3, 4, 5, 6, 9, 12, 15, 19, 24, 35, 46, 60, 83, 102, 135
Offset: 65

Views

Author

Alois P. Heinz, Mar 11 2011

Keywords

Comments

A set is called nondividing if no element divides the sum of any nonempty subset of the other elements.

Examples

			a(65) = 2 because there are two 8-element nondividing subsets of {1,2,...,65}: {36,40,48,49,53,61,64,65}, {30,44,45,49,50,59,64,65}.
		

Crossrefs

Column 8 of triangle A187489. Cf. A068063.
Showing 1-9 of 9 results.