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.

A093696 Numbers n such that all divisors of n have an odd number of 1's in their binary expansions.

Original entry on oeis.org

1, 2, 4, 7, 8, 11, 13, 14, 16, 19, 22, 26, 28, 31, 32, 37, 38, 41, 44, 47, 49, 52, 56, 59, 61, 62, 64, 67, 73, 74, 76, 79, 82, 88, 91, 94, 97, 98, 103, 104, 107, 109, 112, 118, 121, 122, 124, 127, 128, 131, 133, 134, 137, 143, 146, 148, 151, 152, 157, 158, 164, 167, 173
Offset: 1

Views

Author

Jason Earls, May 16 2004

Keywords

Comments

Subsequence of A000069. - Michel Marcus, Feb 09 2014
Numbers all of whose divisors are odious. - Bernard Schott, Jul 22 2022

Examples

			14 is in the sequence because its divisors are [1, 2, 7, 14] and in binary: 1, 10, 111 and 1110, all have an odd number of 1's.
		

Crossrefs

Similar sequences: A062687, A190217, A337741, A337941, A355596.
A000079 is a subsequence.

Programs

  • Maple
    isA001969 := proc(n)
        if wt(n) mod 2 = 0 then
            true;
        else
            false;
        end if;
    end proc:
    isA093696 := proc(n)
        for d in numtheory[divisors](n) do
            if isA001969(d) then
                return false;
            end if;
        end do;
        true;
    end proc:
    for n from 1 to 200 do
        if isA093696(n) then
            printf("%d,",n);
        end if;
    end do: # R. J. Mathar, Feb 13 2014
  • Mathematica
    odiousQ[n_] := OddQ @ DigitCount[n, 2][[1]]; Select[Range[200], AllTrue[ Divisors[#], odiousQ ] &] (* Amiram Eldar, Dec 09 2019 *)
  • PARI
    is(n)=fordiv(n,d,if(hammingweight(d)%2==0, return(0))); 1 \\ Charles R Greathouse IV, Mar 29 2013
    
  • Python
    from sympy import divisors, isprime
    def c(n): return bin(n).count("1")&1
    def ok(n): return n > 0 and all(c(d) for d in divisors(n, generator=True))
    print([k for k in range(174) if ok(k)]) # Michael S. Branicky, Jul 24 2022

Formula

{n: A356018(n) =0 }. - R. J. Mathar, Aug 07 2022

A355596 Numbers all of whose divisors are alternating numbers (A030141).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 32, 36, 41, 43, 47, 49, 50, 54, 58, 61, 63, 67, 69, 81, 83, 87, 89, 94, 98, 101, 103, 107, 109, 123, 125, 127, 129, 141, 145, 147, 149, 161, 163, 167, 181, 183, 189, 214, 218, 250, 254, 290, 298
Offset: 1

Views

Author

Bernard Schott, Jul 12 2022

Keywords

Comments

The smallest alternating number that is not a term is 30, because of 15.

Examples

			32 is a term since all the divisors of 32, i.e., 1, 2, 4, 8, 16 and 32, are alternating numbers
		

Crossrefs

Subsequence of A030141.
Similar sequences: A062687, A190217, A329419, A337941.

Programs

  • Mathematica
    q[n_] := AllTrue[Divisors[n], !MemberQ[Differences[Mod[IntegerDigits[#], 2]], 0] &]; Select[Range[300], q] (* Amiram Eldar, Jul 12 2022 *)
  • PARI
    isokd(n, d=digits(n))=for(i=2, #d, if((d[i]-d[i-1])%2==0, return(0))); 1; \\ A030141
    isok(m) = sumdiv(m, d, isokd(d)) == numdiv(m); \\ Michel Marcus, Jul 12 2022
  • Python
    from sympy import divisors
    def p(d): return 0 if d in "02468" else 1
    def c(n):
        if n < 10: return True
        s = str(n)
        return all(p(s[i]) != p(s[i+1]) for i in range(len(s)-1))
    def ok(n):
        return c(n) and all(c(d) for d in divisors(n, generator=True))
    print([k for k in range(1, 200) if ok(k)]) # Michael S. Branicky, Jul 12 2022
    

Extensions

a(51) and beyond from Michael S. Branicky, Jul 12 2022

A340638 Integers whose number of divisors that are Zuckerman numbers sets a new record.

Original entry on oeis.org

1, 2, 4, 6, 12, 24, 72, 144, 360, 432, 1080, 2016, 2160, 6048, 8064, 15120, 24192, 48384, 88704, 120960, 241920, 266112, 532224, 1064448, 1862784, 2661120, 3725568, 5322240, 7451136, 10450944, 19160064, 20901888, 28740096, 38320128, 57480192, 99283968, 114960384
Offset: 1

Views

Author

Bernard Schott, Jan 14 2021

Keywords

Comments

A Zuckerman number is a number that is divisible by the product of its digits (A007602).
The terms in this sequence are not necessarily Zuckerman numbers. For example a(7) = 72 has product of digits = 14 and 72/14 = 36/7 = 5.142...
The first seven terms are the first seven terms of A087997, then A087997(8) = 66 while a(8) = 144.

Examples

			The 8 divisors of 24 are all Zuckerman numbers, and also, 24 is the smallest integer that has at least 8 divisors that are Zuckerman numbers, hence 24 is a term.
		

Crossrefs

Subsequence of A335038.
Similar for palindromes (A093036), repdigits (A340548), repunits (A340549), Niven numbers (A340637).

Programs

  • Mathematica
    zuckQ[n_] := (prod = Times @@ IntegerDigits[n]) > 0 && Divisible[n, prod]; s[n_] := DivisorSum[n, 1 &, zuckQ[#] &]; smax = 0; seq = {}; Do[s1 = s[n]; If[s1 > smax, smax = s1; AppendTo[seq, n]], {n, 1, 10^5}]; seq (* Amiram Eldar, Jan 14 2021 *)
  • PARI
    isokz(n) = iferr(!(n % vecprod(digits(n))), E, 0); \\ A007602
    lista(nn) = {my(m=0); for (n=1, nn, my(x = sumdiv(n, d, isokz(d));); if (x > m, m = x; print1(n, ", ")););} \\ Michel Marcus, Jan 15 2021

Extensions

More terms from David A. Corneth and Amiram Eldar, Jan 15 2021

A360073 a(n) is the greatest divisor of n divisible by the product of its own digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 5, 11, 12, 1, 7, 15, 8, 1, 9, 1, 5, 7, 11, 1, 24, 5, 2, 9, 7, 1, 15, 1, 8, 11, 2, 7, 36, 1, 2, 3, 8, 1, 7, 1, 11, 15, 2, 1, 24, 7, 5, 3, 4, 1, 9, 11, 8, 3, 2, 1, 15, 1, 2, 9, 8, 5, 11, 1, 4, 3, 7, 1, 36, 1, 2, 15, 4, 11, 6, 1, 8, 9
Offset: 1

Views

Author

Rémy Sigrist, Jan 24 2023

Keywords

Comments

Numbers divisible by the product of their digits are called Zuckerman numbers (A007602).

Examples

			For n = 10:
- the divisors of 10 are 1, 2, 5 and 10,
- 5 is divisible by 5 whereas 10 is not divisible by 1*0,
- so a(10) = 5.
		

Crossrefs

Programs

  • PARI
    a(n) = { fordiv (n, d, my (t=n/d, p=vecprod(digits(t))); if (p && t%p==0, return (t))) }

Formula

a(n) = n iff n belongs to A007602.
Showing 1-4 of 4 results.