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-6 of 6 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

A332268 a(n) is the number of divisors of n that are Niven numbers.

Original entry on oeis.org

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

Views

Author

Marius A. Burtea, May 04 2020

Keywords

Comments

If p is a prime number, p >= 11, then a(p) = 1.
Numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 36, 40, 54, 63, 72, 81, 108, 162, 216, 243, 324, 486, 648, 972, 1944, have all divisors Niven numbers. There are only finitely many numbers all of whose divisors are Niven numbers. (A337741).
A333456(n) is the least number k such that a(k) = n. - Bernard Schott, Jul 30 2022

Examples

			For n = 4 the divisors are 1, 2, 4 and they are all Niven numbers, so a(4) = 3.
For n = 14 the divisors are 1, 2, 7 and 14. Only 1, 2 and 7 are Niven numbers, so a(14) = 3.
		

Crossrefs

Programs

  • Magma
    [#[d:d in Divisors(k)|d mod &+Intseq(d) eq 0]:k  in [1..100]];
    
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, Divisible[#, Plus @@ IntegerDigits[#]] &]; Array[a, 100] (* Amiram Eldar, May 04 2020 *)
  • PARI
    a(n) = sumdiv(n, d, !(d % sumdigits(d))); \\ Michel Marcus, May 04 2020

Formula

a(A333456(n)) = n. - Bernard Schott, Jul 30 2022

A355773 Numbers all of whose divisors are members of A333369.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 17, 19, 31, 35, 37, 39, 51, 53, 57, 59, 71, 73, 79, 91, 93, 95, 97, 111, 137, 139, 153, 157, 159, 173, 179, 193, 197, 221, 223, 227, 229, 317, 333, 359, 371, 379, 395, 397, 443, 449, 519, 537, 571, 579, 591, 593, 661, 663, 669, 719, 739
Offset: 1

Views

Author

Bernard Schott, Jul 18 2022

Keywords

Comments

All terms are necessarily odd because 2 is not in A333369

Examples

			111 is a term since all the divisors of 111, i.e., 1, 3, 37 and 111, are in A333369.
		

Crossrefs

Similar sequences: A062687, A190217, A329419, A337741
.
Subsequences: A155045, A355853.

Programs

  • Mathematica
    simQ[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; Select[Range[1000], AllTrue[Divisors[#], simQ] &] (* Amiram Eldar, Jul 19 2022 *)
  • PARI
    issimber(m) = my(d=digits(m), s=Set(d)); for (i=1, #s, if (#select(x->(x==s[i]), d) % 2 != (s[i] % 2), return (0))); return (1); \\ A333369
    isok(k) = fordiv(k, d, if (!issimber(d), return(0))); return(1); \\ Michel Marcus, Jul 19 2022
    
  • Python
    from sympy import divisors, isprime
    def c(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in set(s))
    def ok(n): return n > 0 and all(c(d) for d in divisors(n, generator=True))
    print([k for k in range(740) if ok(k)]) # Michael S. Branicky, Jul 24 2022

A337941 Numbers whose divisors are all Zuckerman numbers (A007602).

Original entry on oeis.org

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

Views

Author

Bernard Schott, Oct 01 2020

Keywords

Comments

Inspired by A337741.
Zuckerman numbers are numbers that are divisible by the product of their digits (see link).
The next term is the repunit prime R_317 which is too large to include in the data.
Primes in this sequence are 2, 3, 5, 7 and all the repunit primes (see A004023).
This sequence is infinite if and only if there are infinitely many repunit primes.

Examples

			6 is a term since all the divisors of 6, i.e., 1, 2, 3 and 6, are Zuckerman numbers.
		

Crossrefs

Subsequence of A007602.
Similar sequences: A062687, A190217, A308851, A329419, A337741.
Cf. A004022 (subsequence of prime repunits).

Programs

  • Mathematica
    zuckQ[n_] := (prod = Times @@ IntegerDigits[n]) > 0 && Divisible[n, prod]; Select[Range[24], AllTrue[Divisors[#], zuckQ] &] (* Amiram Eldar, Oct 01 2020 *)
  • PARI
    isok(m) = {fordiv(m, d, my(p=vecprod(digits(d))); if (!p || (d % p), return (0))); return (1);} \\ Michel Marcus, Oct 05 2020

A340637 Integers whose number of divisors that are Niven numbers sets a new record.

Original entry on oeis.org

1, 2, 4, 6, 12, 24, 36, 60, 72, 120, 180, 240, 360, 720, 1080, 1800, 2160, 2520, 4320, 5040, 7560, 10080, 15120, 20160, 25200, 30240, 45360, 50400, 60480, 75600, 90720, 100800, 110880, 120960, 151200, 166320, 221760, 277200, 302400, 332640, 453600, 498960, 554400
Offset: 1

Views

Author

Bernard Schott, Jan 14 2021

Keywords

Comments

A Niven number (A005349) is a number that is divisible by the sum of its digits.
The first 13 terms are the first 13 terms of A236021, then A236021(14) = 420 while a(14) = 720.

Examples

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

Crossrefs

Subsequence of A333456.
Similar for palindromes (A093036), repdigits (A340548), repunits (A340549), Zuckerman numbers (A340638).

Programs

  • Mathematica
    s[n_] := DivisorSum[n, 1 &, Divisible[#, Plus @@ IntegerDigits[#]] &]; smax = 0; seq = {}; Do[s1 = s[n]; If[s1 > smax, smax = s1; AppendTo[seq, n]], {n, 1, 10^6}]; seq (* Amiram Eldar, Jan 14 2021 *)
  • PARI
    f(n) = sumdiv(n, d, !(d % sumdigits(d))); \\ A332268
    lista(nn) = {my(m=0); for (n=1, nn, my(x = f(n)); if (x > m, m = x; print1(n, ", ")););} \\ Michel Marcus, Jan 14 2021

Extensions

More terms from Amiram Eldar, Jan 14 2021

A337819 a(n) is the smallest number k for which k*d is a Niven number, for any divisor d of n, n >= 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 9, 3, 2, 3, 6, 1, 6, 1, 1, 10, 9, 1, 2, 9, 1, 3, 9, 2, 12, 9, 10, 6, 6, 1, 3, 6, 9, 1, 10, 3, 12, 10, 2, 9, 9, 3, 9, 2, 6, 9, 18, 1, 10, 9, 6, 9, 9, 2, 12, 18, 1, 9, 12, 10, 3, 6, 9, 6, 18, 1, 7, 3, 2, 9, 10, 9, 9, 9, 1, 10
Offset: 1

Views

Author

Marius A. Burtea, Sep 23 2020

Keywords

Comments

a(n) = 1 if and only if n is in A337741.

Examples

			The numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 are in A337741, so a(1) = a(2) = ... = a(9) = a(10) = 1.
For n = 11 the divisors are 1, 11 and 10 * 1 = 10 = A005349(10) and 10 * 11 = 110 = A005349(36), so a(11) = 10.
For n = 14 the divisors are 1, 2, 7, 14 and 3 * 1 = 3 = A005349(3), 3 * 2 = 6 = A005349(6), 3 * 7 = 21 = A005349(14), 3 * 14 = 42 = A005349(20), so a(14) = 3.
For n = 40 , A337741(18) = 40, so a(40) = 1.
		

Crossrefs

Programs

  • Magma
    niven:=func; a:=[]; for n in [1..90] do k:=1; while not forall{d: d in Divisors(n)| niven(k*d)} do k:=k+1; end while; Append(~a,k); end for; a;
    
  • Mathematica
    nivenQ[n_] := Divisible[n, Plus @@ IntegerDigits[n]]; a[n_] := Module[{k = 1}, While[!AllTrue[k * Divisors[n], nivenQ], k++]; k]; Array[a, 100] (* Amiram Eldar, Sep 23 2020 *)
  • PARI
    is(n) = n%sumdigits(n)==0; \\ A005349
    isok(n, k) = fordiv(n, d, if (!is(k*d), return(0))); return(1);
    a(n) = {my(k=1); while (! isok(n,k), k++); k;} \\ Michel Marcus, Sep 24 2020
Showing 1-6 of 6 results.