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

A353735 Number of n-digit terms in A333369.

Original entry on oeis.org

5, 24, 130, 792, 5080, 34584, 247360, 1817112, 13918720, 108848664, 869866240, 7169995032, 59085276160, 505735077144, 4311229112320, 37428004374552, 335520388710400, 2861870689152024, 27669446179225600, 223578655251963672, 2398913308953149440, 17708639883984065304
Offset: 1

Views

Author

Michael S. Branicky, May 06 2022

Keywords

Comments

Also the number of n-digit simbers, where a simber is a positive integer in which any odd digit, if present, occurs an odd number of times, and any even digit, if present, occurs an even number of times.

Examples

			There are five 1-digit terms in A333369: 1, 3, 5, 7, 9. Thus, a(1) = 5.
		

Crossrefs

Programs

  • Python
    def isA333369(n):
        digits = list(map(int, str(n)))
        return all(digits.count(d)%2 == d%2 for d in set(digits))
    def a(n): return sum(1 for i in range(10**(n-1), 10**n) if isA333369(i))
    print([a(n) for n in range(1, 7)]) # Michael S. Branicky, May 06 2022

Formula

From Bernard Schott, Jul 11 2022: (Start)
Conjecture 1: lim_{n->oo} a(2n+1)/a(2n-1) = 100.
Conjecture 2: lim_{n->oo} a(2n+2)/a(2n) = 81. (End)

A355771 a(n) is the smallest integer that has exactly n divisors from A333369.

Original entry on oeis.org

1, 3, 9, 15, 45, 105, 195, 315, 945, 900, 1575, 2100, 3900, 6825, 11655, 10500, 6300, 18900, 25200, 35100, 27300, 31500, 44100, 94500, 157500, 107100, 81900, 233100, 220500, 598500, 245700, 333900, 409500, 491400, 900900, 573300, 600600, 1228500, 1669500, 1965600
Offset: 1

Views

Author

Bernard Schott, Jul 17 2022

Keywords

Examples

			15 has 4 divisors: {1, 3, 5, 15} all of which are in A333369 integers, and no smaller number has this property, hence a(4) = 15.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; f[n_] := DivisorSum[n, 1 &, q[#] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[40, 10^7] (* Amiram Eldar, Jul 17 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
    a(n) = my(k=1); while (sumdiv(k, d, issimber(d)) != n, k++); k; \\ Michel Marcus, Jul 18 2022
    
  • Python
    from sympy import divisors
    from itertools import count, islice
    def c(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in set(s))
    def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    def agen():
        n, adict = 1, dict()
        for k in count(1):
            fk = f(k)
            if fk not in adict: adict[fk] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 29))) # Michael S. Branicky, Jul 23 2022

Extensions

More terms from Amiram Eldar, Jul 17 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

A355770 a(n) is the number of terms of A333369 that divide n.

Original entry on oeis.org

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

Views

Author

Bernard Schott, Jul 16 2022

Keywords

Crossrefs

Programs

  • Mathematica
    q[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; a[n_] := DivisorSum[n, 1 &, q[#] &]; Array[a, 100] (* Amiram Eldar, Jul 16 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
    a(n) = sumdiv(n, d, issimber(d)); \\ Michel Marcus, Jul 18 2022
  • Python
    from sympy import divisors
    def c(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in set(s))
    def a(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Jul 16 2022
    

Extensions

More terms from Michael S. Branicky, Jul 16 2022

A355853 Primes in A333369.

Original entry on oeis.org

3, 5, 7, 13, 17, 19, 31, 37, 53, 59, 71, 73, 79, 97, 137, 139, 157, 173, 179, 193, 197, 223, 227, 229, 317, 359, 379, 397, 443, 449, 571, 593, 661, 719, 739, 751, 881, 883, 887, 937, 953, 971, 1009, 1117, 1151, 1171, 1223, 1229, 1447, 1511, 1579, 1597, 1663, 1667, 1669
Offset: 1

Views

Author

Bernard Schott, Jul 19 2022

Keywords

Examples

			443 is prime and 443 has two 4's and one 3 in its decimal expansion, hence 443 is a term.
		

Crossrefs

Intersection of A000040 and A333369.
Subsequence of A355773.
Supersequence of A155045.
Similar sequences: A002385, A004023.

Programs

  • Mathematica
    simQ[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; Select[Prime[Range[300]], 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(m) = isprime(m) && issimber(m); \\ Michel Marcus, Jul 19 2022
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A355853_gen(startvalue=1): # generator of terms
        return filter(lambda n:not any((str(n).count(d)^int(d))&1 for d in set(str(n))) and isprime(n),count(max(startvalue,1)))
    A355853_list = list(islice(A355853_gen(),30)) # Chai Wah Wu, Jul 21 2022

Extensions

Extended by Michel Marcus, Jul 19 2022

A356177 Palindromes in A333369.

Original entry on oeis.org

1, 3, 5, 7, 9, 22, 44, 66, 88, 111, 212, 232, 252, 272, 292, 333, 414, 434, 454, 474, 494, 555, 616, 636, 656, 676, 696, 777, 818, 838, 858, 878, 898, 999, 2002, 2222, 2442, 2662, 2882, 4004, 4224, 4444, 4664, 4884, 6006, 6226, 6446, 6666, 6886, 8008, 8228, 8448, 8668, 8888, 10101
Offset: 1

Views

Author

Bernard Schott, Jul 28 2022

Keywords

Comments

If a term has a decimal digit that is odd, it must have an odd number of decimal digits and all odd digits are the same. - Chai Wah Wu, Jul 29 2022
If a term has an even number of decimal digits, then it must have only even decimal digits. - Bernard Schott, Jul 30 2022

Examples

			474 is palindrome and 474 has two 4's and one 7 in its decimal expansion, hence 474 is a term.
		

Crossrefs

Intersection of A002113 and A333369.
Cf. A355770, A355771, A355772, A100706 (subsequence of repunits).

Programs

  • Mathematica
    simQ[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; Select[Range[10^4], PalindromeQ[#] && simQ[#] &] (* Amiram Eldar, Jul 28 2022 *)
  • Python
    from itertools import count, islice, product
    def simb(n): s = str(n); return all(s.count(d)%2==int(d)%2 for d in set(s))
    def pals(): # generator of palindromes
        digits = "0123456789"
        for d in count(1):
            for p in product(digits, repeat=d//2):
                if d > 1 and p[0] == "0": continue
                left = "".join(p); right = left[::-1]
                for mid in [[""], digits][d%2]:
                    yield int(left + mid + right)
    def agen(): yield from filter(simb, pals())
    print(list(islice(agen(), 55))) # Michael S. Branicky, Jul 28 2022
    
  • Python
    # faster version based on Comments
    from itertools import count, islice, product
    def odgen(d): yield from [1, 3, 5, 7, 9] if d == 1 else sorted(int(f+"".join(p)+o+"".join(p[::-1])+f) for o in "13579" for f in o + "2468" for p in product(o+"02468", repeat=d//2-1))
    def evgen(d): yield from (int(f+"".join(p)+"".join(p[::-1])+f) for f in "2468" for p in product("02468", repeat=d//2-1))
    def A356177gen():
        for d in count(1, step=2): yield from odgen(d); yield from evgen(d+1)
    print(list(islice(A356177gen(), 55))) # Michael S. Branicky, Jul 30 2022

A353007 Nonnegative integers in which any odd digit, if present, occurs an even number of times, and any even digit, if present, occurs an odd number of times.

Original entry on oeis.org

0, 2, 4, 6, 8, 11, 20, 24, 26, 28, 33, 40, 42, 46, 48, 55, 60, 62, 64, 68, 77, 80, 82, 84, 86, 99, 101, 110, 112, 114, 116, 118, 121, 141, 161, 181, 204, 206, 208, 211, 222, 233, 240, 246, 248, 255, 260, 264, 268, 277, 280, 284, 286, 299, 303, 323, 330, 332, 334
Offset: 1

Views

Author

Bernard Schott, Apr 15 2022

Keywords

Comments

Like the converse of A333369.

Examples

			181 is a 3-digit term because it has two 1's and one 8.
		

Crossrefs

Cf. A333369.

Programs

  • Maple
    filter:= proc(n) local L;
        L:= map(rhs-lhs,Statistics:-Tally(convert(n,base,10)));
        andmap(type,L,odd)
    end proc:
    select(filter, [$0..1000]); # Robert Israel, Jul 31 2024
  • Mathematica
    q[n_] := AllTrue[Tally @ IntegerDigits[n], OddQ[Plus @@ #] &]; Select[Range[0, 300], q] (* Amiram Eldar, Apr 15 2022 *)
  • PARI
    isok(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); \\ Michel Marcus, Apr 15 2022
    
  • Python
    def ok(n): s = str(n); return all(s.count(d)%2 != int(d)%2 for d in set(s))
    print([k for k in range(335) if ok(k)]) # Michael S. Branicky, Apr 15 2022

A355772 Positions of records in A355770.

Original entry on oeis.org

1, 3, 9, 15, 45, 105, 195, 315, 900, 1575, 2100, 3900, 6300, 18900, 25200, 27300, 31500, 44100, 81900, 220500, 245700, 333900, 409500, 491400, 573300, 600600, 1201200, 2402400, 3603600, 4804800, 7207200, 10810800, 14414400, 20420400, 21621600, 40840800, 43243200
Offset: 1

Views

Author

Bernard Schott, Jul 18 2022

Keywords

Comments

Corresponding records are 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 17, ...

Examples

			a(5) = 45 is in the sequence because A355770(45) = 5 is larger than any earlier value in A355770.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; f[n_] := DivisorSum[n, 1 &, q[#] &]; fm = -1; s = {}; Do[If[(fn = f[n]) > fm, fm = fn; AppendTo[s, n]], {n, 1, 10^5}]; s (* Amiram Eldar, Jul 18 2022 *)
  • Python
    from sympy import divisors
    from itertools import count, islice
    def c(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in set(s))
    def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    def agen(record=-1):
        for k in count(1):
            if f(k) > record: record = f(k); yield k
    print(list(islice(agen(), 20))) # Michael S. Branicky, Jul 25 2022

Extensions

a(21)-a(31) from Michel Marcus, Jul 18 2022
a(32)-a(37) from Amiram Eldar, Jul 18 2022

A353736 Number of n-digit terms in A353007.

Original entry on oeis.org

5, 21, 122, 765, 5000, 34581, 249152, 1843485, 14184320, 111117141, 890892032, 7338139005, 60554071040, 518102719701, 4409318285312, 38356828343325, 341939662684160, 2933245707834261, 28085287524564992, 229163829314312445, 2425706018857287680, 18151248585662332821
Offset: 1

Views

Author

Michael S. Branicky, May 06 2022

Keywords

Comments

From Bernard Schott, Jul 14 2022: (Start)
Conjecture 1: lim_{n->oo} a(2n+1)/a(2n-1) = 100.
Conjecture 2: lim_{n->oo} a(2n+2)/a(2n) = 81.
These conjectures are the same as for A353735. (End)

Examples

			There are five 1-digit terms in A353007: 0, 2, 4, 6, 8. Thus, a(1) = 5.
		

Crossrefs

Programs

  • Python
    def isA353007(n):
        digits = list(map(int, str(n)))
        return all(digits.count(d)%2 != d%2 for d in set(digits))
    def a(n):
        start = 0 if n == 1 else 10**(n-1)
        return sum(1 for i in range(start, 10**n) if isA353007(i))
    print([a(n) for n in range(1, 7)]) # Michael S. Branicky, May 06 2022
Showing 1-9 of 9 results.