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.

Original entry on oeis.org

1, 2, 3, 7, 9, 10, 11, 12, 13, 14, 17, 19, 23, 25, 27, 28, 29, 31, 32, 34, 35, 37, 41, 43, 45, 49, 50, 51, 52, 53, 54, 56, 58, 59, 61, 62, 65, 67, 69, 71, 73, 75, 77, 79, 81, 82, 83, 84, 86, 87, 88, 89, 92, 93, 94, 95, 97, 98, 101, 103, 107, 109, 111, 113, 115, 117, 119, 122
Offset: 1

Views

Author

Leroy Quet, May 12 2008

Keywords

Comments

Sum_{k=1..n} d(k) = Sum_{k=1..n} floor(n/k) = A006218(n).

Crossrefs

Programs

  • Maple
    N:= 500: # for terms <= N
    S:= ListTools:-PartialSums(map(numtheory:-tau, [$1..N])):
    select(t -> igcd(t,S[t])=1, [$1..N]); # Robert Israel, Feb 20 2024
  • Mathematica
    With[{r = Range[200]}, PositionIndex[CoprimeQ[r, Accumulate[DivisorSigma[0, r]]]][True]] (* Paolo Xausa, Feb 21 2024 *)
  • Python
    from math import gcd, isqrt
    def A140221_gen(startvalue=1): # generator of terms >= startvalue
        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)))
    A140221_list = list(islice(A140221_gen(),30)) # Chai Wah Wu, Oct 23 2023

Extensions

More terms from Max Alekseyev, May 10 2009