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.
%I A161664 #61 Apr 04 2025 22:26:48 %S A161664 0,0,1,2,5,7,12,16,22,28,37,43,54,64,75,86,101,113,130,144,161,179, %T A161664 200,216,238,260,283,305,332,354,383,409,438,468,499,526,561,595,630, %U A161664 662,701,735,776,814,853,895,940,978,1024,1068,1115,1161,1212,1258,1309 %N A161664 a(n) = Sum_{i=1..n} (i - d(i)), where d(n) is the number of divisors of n (A000005). %C A161664 Partial Sums of A049820. - _Omar E. Pol_, Jun 18 2009 %C A161664 The original definition was: Safe periods for the emergence of cicada species on prime number cycles. %C A161664 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. %C A161664 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 %C A161664 Sum of the number of proper nondivisors of all positive integers <= n. - _Omar E. Pol_, Feb 13 2014 %D A161664 Enoch Haga, Eratosthenes goes bugs! Exploring Prime Numbers, 2007, pp 71-80; first publication 1994. %H A161664 Alois P. Heinz, <a href="/A161664/b161664.txt">Table of n, a(n) for n = 1..10000</a> %H A161664 A. Baker, <a href="http://dx.doi.org/10.1093/mind/fzi223">Are there Genuine Mathematical Explanations of Physical Phenomena?</a>, Mind 114 (454) (2005) 223-238. %H A161664 Enoch Haga, <a href="/A161664/a161664.pdf">Prime Safe Periods</a> %H A161664 G. F. Webb, <a href="https://doi.org/10.3934/dcdsb.2001.1.387">The prime number periodical Cicada problem</a>, Discr. Cont. Dyn. Syst. 1 (3) (2001) 387. %H A161664 Wildforests, <a href="http://wiki.wildforests.co/topic/Cicada">Cicada</a>, visited Dec. 2012. - From _N. J. A. Sloane_, Dec 25 2012 %F A161664 a(n) = A000217(n) - A006218(n). %F A161664 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 %e A161664 a(8) in A000217 minus a(8) in A006218 = a(7) above (28-16=12). %e A161664 Referring to the chart referenced, when n-th year = 7 there are 16 x-markers. %e A161664 These represent unsafe periods for cicada emergence: 28-16=12 safe periods. %e A161664 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. %p A161664 with(numtheory): A161664:=n->add(i-tau(i), i=1..n): seq(A161664(n), n=1..100); # _Wesley Ivan Hurt_, Jul 15 2014 %p A161664 # second Maple program: %p A161664 a:= proc(n) option remember; `if`(n<1, 0, %p A161664 a(n-1)+n-numtheory[tau](n)) %p A161664 end: %p A161664 seq(a(n), n=1..55); # _Alois P. Heinz_, Jun 24 2022 %t A161664 a[n_] := n*(n+1)/2 - Sum[ DivisorSigma[0, k], {k, n}]; Table[a[n], {n, 55}] (* _Jean-François Alcover_, Nov 07 2011 *) %o A161664 (Python) %o A161664 from math import isqrt %o A161664 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 %Y A161664 Cf. A000005, A000217, A049820, A006218, A051014. %Y A161664 Column 2 of triangle A187489 or of A355145. %K A161664 easy,nonn %O A161664 1,4 %A A161664 _Enoch Haga_, Jun 15 2009 %E A161664 Simplified definition, offset corrected and partially edited by _Omar E. Pol_, Jun 18 2009 %E A161664 New name from _Wesley Ivan Hurt_, Jul 15 2014