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.

A337557 Number of integers less than n with the same number of odd divisors as n.

Original entry on oeis.org

0, 1, 0, 2, 1, 2, 3, 3, 0, 4, 5, 6, 7, 8, 0, 4, 9, 1, 10, 11, 1, 12, 13, 14, 2, 15, 2, 16, 17, 3, 18, 5, 4, 19, 5, 3, 20, 21, 6, 22, 23, 7, 24, 25, 0, 26, 27, 28, 4, 5, 8, 29, 30, 9, 10, 31, 11, 32, 33, 12, 34, 35, 1, 6, 13, 14, 36, 37, 15, 16, 38, 6, 39, 40, 2, 41, 17, 18, 42, 43
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 31 2020

Keywords

Examples

			a(10) = 4 because A001227(10) = 2 and also A001227(3) = A001227(5) = A001227(6) = A001227(7) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[n - 1], Sum[Mod[d, 2], {d, Divisors[#]}] == Sum[Mod[d, 2], {d, Divisors[n]}] &]], {n, 80}]
  • PARI
    a(n)={my(t=numdiv(n/2^valuation(n, 2))); sum(k=1, n-1, numdiv(k/2^valuation(k, 2))==t)} \\ Andrew Howroyd, Oct 31 2020
    
  • PARI
    first(n) = { my(m = Map(), res = vector(n)); for(i = 1, n, q = numdiv(i >> valuation(i, 2)); if(mapisdefined(m, q), res[i] = mapget(m, q); mapput(m, q, res[i]+1); , mapput(m, q, 1) ) ); res } \\ David A. Corneth, Oct 31 2020

Formula

a(n) = |{j < n : A001227(j) = A001227(n)}|.