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

A227872 Number of odious divisors (A000069) of n.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Oct 25 2013

Keywords

Crossrefs

Programs

  • Maple
    A227872 := proc(n)
        option remember ;
        local a,d ;
        a := 0 ;
        for d in numtheory[divisors](n) do
            if not isA001969(d) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A227872(n),n=1..200) ; # R. J. Mathar, Aug 07 2022
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, OddQ[DigitCount[#, 2, 1]] &]; Array[a, 100] (* Amiram Eldar, Jul 23 2022 *)
  • PARI
    a(n) = sumdiv(n, d, hammingweight(d) % 2); \\ Michel Marcus, Feb 06 2016
    
  • PARI
    isod(n) = hammingweight(n) % 2; \\ A000069
    a(n) = my(v=valuation(n, 2)); n >>= v; sumdiv(n,d,isod(d)) * (v+1) \\ David A. Corneth, Jul 23 2022
    
  • Python
    from sympy import divisors
    def c(n): return bin(n).count("1")&1
    def a(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Jul 23 2022

Formula

a(n) + A356018(n) = A000005(n).
a(2^n) = n+1. - Bernard Schott, Jul 22 2022
a(n) = 1 iff n is in A093688. - Bernard Schott, Jul 23 2022
a(n) = Sum_{d|n} A010060(d). - Ridouane Oudra, Apr 12 2025

Extensions

More terms from Peter J. C. Moses, Oct 25 2013

A227891 Numbers for which the number of odious proper divisors (A000069) equals the number of evil proper divisors (A001969).

Original entry on oeis.org

1, 9, 25, 289, 441, 529, 625, 841, 1849, 2809, 3249, 5041, 6889, 7225, 7569, 7921, 10201, 12769, 15129, 15625, 19321, 21025, 22201, 26569, 31329, 38809, 46225, 48841, 53361, 55225, 66049, 69169, 72361, 76729, 78961, 83521, 85849, 93025, 96721, 100489, 103041
Offset: 1

Views

Author

Keywords

Comments

All terms are odd squares (see Shevelev links).

Examples

			1 has no proper divisors, so it is in the sequence.
9 has two proper divisors 1 (odious) and 3 (evil). Thus 9 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    isQ[n_] := Sum[Switch[Mod[Total[IntegerDigits[d, 2]], 2], 0, 1, 1, -1], {d, Most[Divisors[n]]}] == 0; Select[(2*Range[200]-1)^2, isQ] (* Jean-François Alcover, Dec 04 2015 *)
  • PARI
    is(n)=sumdiv(n,d,(-1)^hammingweight(d))==(-1)^hammingweight(n)
    select(is, vector(10^4,i,(2*i-1)^2)) \\ Charles R Greathouse IV, Oct 26 2013
    
  • PARI
    c=0; forstep(i=1, 8135, 2, n=i^2; nd=numdiv(n); d=divisors(n); ce=0; co=0; for(j=1, nd-1, if(hammingweight(d[j])%2==0, ce++, co++)); if(ce==co, c++; write("b227891.txt", c " " n))) \\ Donovan Johnson, Oct 30 2013

Formula

Common value for numbers of considered divisors is (A000005(a(n))-1)/2.

A260934 Sum of evil divisors of n. For evil numbers see A001969.

Original entry on oeis.org

0, 0, 3, 0, 5, 9, 0, 0, 12, 15, 0, 21, 0, 0, 23, 0, 17, 36, 0, 35, 3, 0, 23, 45, 5, 0, 39, 0, 29, 69, 0, 0, 36, 51, 5, 84, 0, 0, 42, 75, 0, 9, 43, 0, 77, 69, 0, 93, 0, 15, 71, 0, 53, 117, 5, 0, 60, 87, 0, 161, 0, 0, 75, 0, 70
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 04 2015

Keywords

Comments

a(n) = 0 if there is no evil divisor.

Examples

			a(6) = A000203(6) - A227873(6) = 12 - 3 = 9.
		

Crossrefs

Programs

  • Mathematica
    Total[Select[Divisors@ #, EvenQ@ First@ DigitCount[#, 2] &]] & /@ Range@ 65 (* Michael De Vlieger, Aug 04 2015 *)

Formula

a(n) = A000203(n) - A227873(n). - Vladimir Shevelev, Oct 25 2013.

Extensions

Edited by Wolfdieter Lang, Aug 23 2015

A227889 Numbers for which sum of odious proper divisors (A000069) equals sum of evil proper divisors (A001969).

Original entry on oeis.org

6, 11346, 1721418, 7449858, 11215266, 14101830, 28118346, 31755786, 37118418, 48517386, 69016314, 78075906, 258216018, 409092018, 410775306, 443414418, 453980706, 471867666, 525843960, 582427266, 758573106, 800349666, 805060626, 874923018, 1042069218, 1458081714
Offset: 1

Views

Author

Keywords

Comments

Are there terms not divisible by 6?
All the displayed terms are an odd multiple of 6, and up to a few exceptions of the form a(n)=6*p*q, where p,q have the same odd Hamming weight H(p) = H(q) >= 7. - M. F. Hasler, Oct 27 2013

Examples

			6 has odious divisors 1,2 and proper evil divisor 3. Since 1+2=3, then 6 is in the sequence.
		

Crossrefs

Programs

  • PARI
    for(n=4, 1458081714, if(isprime(n), next); nd=numdiv(n); if(nd>3, d=divisors(n); se=0; so=1; for(j=2, nd-1, if(hammingweight(d[j])%2==0, se=se+d[j], so=so+d[j])); if(se==so, print1(n ", ")))) /* Donovan Johnson, Oct 26 2013 */
    
  • PARI
    is(n,d=divisors(n))={sum(j=2, #d-1, (-1)^hammingweight(d[j])*d[j])==1} \\ - M. F. Hasler, Oct 27 2013

Formula

Common value of the considered sums of divisors is (A000203(a(n))-a(n))/2.

Extensions

a(5)-a(26) from Donovan Johnson, Oct 26 2013
Showing 1-4 of 4 results.