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.

A140221 A number n is included if n is coprime to Sum_{k=1..n} d(k), where d(k) is the number of divisors of k.

This page as a plain text file.
%I A140221 #22 Feb 21 2024 08:22:29
%S A140221 1,2,3,7,9,10,11,12,13,14,17,19,23,25,27,28,29,31,32,34,35,37,41,43,
%T A140221 45,49,50,51,52,53,54,56,58,59,61,62,65,67,69,71,73,75,77,79,81,82,83,
%U A140221 84,86,87,88,89,92,93,94,95,97,98,101,103,107,109,111,113,115,117,119,122
%N A140221 A number n is included if n is coprime to Sum_{k=1..n} d(k), where d(k) is the number of divisors of k.
%C A140221 Sum_{k=1..n} d(k) = Sum_{k=1..n} floor(n/k) = A006218(n).
%H A140221 Robert Israel, <a href="/A140221/b140221.txt">Table of n, a(n) for n = 1..10000</a>
%p A140221 N:= 500: # for terms <= N
%p A140221 S:= ListTools:-PartialSums(map(numtheory:-tau, [$1..N])):
%p A140221 select(t -> igcd(t,S[t])=1, [$1..N]); # _Robert Israel_, Feb 20 2024
%t A140221 With[{r = Range[200]}, PositionIndex[CoprimeQ[r, Accumulate[DivisorSigma[0, r]]]][True]] (* _Paolo Xausa_, Feb 21 2024 *)
%o A140221 (Python)
%o A140221 from math import gcd, isqrt
%o A140221 def A140221_gen(startvalue=1): # generator of terms >= startvalue
%o A140221     return filter(lambda n: gcd(n,-(s:=isqrt(n))**2+(sum(n//k for k in range(1,s+1))<<1))==1,count(max(startvalue,1)))
%o A140221 A140221_list = list(islice(A140221_gen(),30)) # _Chai Wah Wu_, Oct 23 2023
%Y A140221 Cf. A006218, A050226, A140222.
%K A140221 nonn
%O A140221 1,2
%A A140221 _Leroy Quet_, May 12 2008
%E A140221 More terms from _Max Alekseyev_, May 10 2009