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.

A182358 Numbers n for which the number of divisors of n is congruent to 2 mod 4.

Original entry on oeis.org

2, 3, 5, 7, 11, 12, 13, 17, 18, 19, 20, 23, 28, 29, 31, 32, 37, 41, 43, 44, 45, 47, 48, 50, 52, 53, 59, 61, 63, 67, 68, 71, 73, 75, 76, 79, 80, 83, 89, 92, 97, 98, 99, 101, 103, 107, 109, 112, 113, 116, 117, 124, 127, 131, 137, 139, 147, 148, 149, 151, 153
Offset: 1

Views

Author

Douglas Latimer, Apr 26 2012

Keywords

Comments

The product of any 2 terms a(i)*a(j) is not a member of the sequence.
tau(n) is congruent to 2 modulo 4 iff only one prime in the prime factorization of n has exponent of the form 4*m + 1, and no prime in the prime factorization of n has exponent of the form 4*k + 3.

Examples

			The divisors of 12 are: 1, 2, 3, 4, 6, 12 [6 divisors]. 6 is congruent to 2 modulo 4. Thus 12 is a member of this sequence.
		

Crossrefs

This is an extension of A000040 (the prime numbers, which each have 2 divisors). The definition of this sequence uses A000005 (the number of divisors of n).

Programs

  • Mathematica
    Select[Range[200],Mod[DivisorSigma[0,#],4]==2&] (* Harvey P. Dale, Sep 07 2020 *)
  • PARI
    {plnt=1 ;  for(k=1, 10^7,
    if(numdiv(k) % 4 == 2, print1(k, ", "); plnt++ ; if(100 <  plnt, break() )))}
    
  • PARI
    is(n)=my(p=core(n));isprime(p)&&valuation(n,p)%4==1 \\ Charles R Greathouse IV, Apr 26 2012
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2,lim,for(m=1,sqrtint(lim\p), if(m%p==0, next); t=p*m^2; for(n=1,sqrtint(sqrtint(lim\t)), listput(v, t*n^4)))); vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Apr 26 2012

Formula

Terms are of the form p * m^2 * n^4 for any prime p, m coprime to p, and n. - Charles R Greathouse IV, Apr 26 2012