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

A349273 Number of odd divisors of prime(n) - 1.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Nov 12 2021

Keywords

Comments

a(n) is odd if and only if prime(n) is in A249410. - Jianing Song, Nov 14 2021

Crossrefs

Programs

  • Magma
    [NumberOfDivisors(p-1)/Valuation(2*p-2, 2): p in PrimesUpTo(500)];
    
  • Maple
    nod:= n -> numtheory:-tau(n/2^padic:-ordp(n,2)):
    map(nod, [seq(ithprime(i)-1,i=1..100)]); # Robert Israel, Oct 11 2024
  • Mathematica
    a[n_] := DivisorSigma[0, (k = Prime[n] - 1)/2^IntegerExponent[k, 2]]; Array[a, 100] (* Amiram Eldar, Jun 03 2021 *)
    Count[Divisors[#-1],?OddQ]&/@Prime[Range[100]] (* _Harvey P. Dale, Jan 22 2024 *)
  • PARI
    a(n) = sumdiv(prime(n)-1, d, d%2); \\ Michel Marcus, Dec 18 2021
  • Python
    from sympy import divisors, prime
    def a(n): return sum(d%2 for d in divisors(prime(n)-1))
    print([a(n) for n in range(1, 96)]) # Michael S. Branicky, Jul 04 2021
    

Formula

a(n) = A001227(A006093(n)).
Showing 1-1 of 1 results.