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.

A352546 Numbers having more even than odd digits when written in base 10.

Original entry on oeis.org

0, 2, 4, 6, 8, 20, 22, 24, 26, 28, 40, 42, 44, 46, 48, 60, 62, 64, 66, 68, 80, 82, 84, 86, 88, 100, 102, 104, 106, 108, 120, 122, 124, 126, 128, 140, 142, 144, 146, 148, 160, 162, 164, 166, 168, 180, 182, 184, 186, 188, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 212
Offset: 1

Views

Author

M. F. Hasler, Jul 03 2022

Keywords

Crossrefs

Cf. A072603 (same in base 2).
Cf. A117076 (subsequence of primes).
Cf. A352547 (numbers having more odd than even decimal digits).

Programs

  • Mathematica
    A352546Q[k_] := Length[#] > 2*Count[#, _?OddQ] & [IntegerDigits[k]];
    Select[Range[0, 300], A352546Q] (* Paolo Xausa, Nov 28 2024 *)
  • PARI
    select( {is_A352546(n)=vecsum(n=digits(n)%2)*2<#n+!n}, [0..222])
    
  • Python
    def ok(n): return len(s:=str(n)) < 2*sum(1 for c in s if c in "02468")
    print([k for k in range(213) if ok(k)]) # Michael S. Branicky, Jul 03 2022

A355275 Numbers having more odd than even digits when written in base 3.

Original entry on oeis.org

1, 4, 10, 12, 13, 14, 16, 22, 31, 37, 39, 40, 41, 43, 49, 67, 85, 91, 93, 94, 95, 97, 103, 109, 111, 112, 113, 115, 117, 118, 119, 120, 121, 122, 123, 124, 125, 127, 129, 130, 131, 133, 139, 145, 147, 148, 149, 151, 157, 175, 193, 199, 201, 202, 203, 205, 211, 229, 256, 274, 280, 282, 283, 284, 286, 292
Offset: 1

Views

Author

M. F. Hasler, Jul 03 2022

Keywords

Comments

If k is a term, then so is 3*k+1. - Robert Israel, Mar 04 2024

Crossrefs

Cf. A072600 (same in base 2), A352547 (same in base 10).

Programs

  • Maple
    filter:= proc(n) local L;
      L:= convert(n,base,3);
      numboccur(1,L) > nops(L)/2
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Mar 04 2024
  • PARI
    select( {is_A355275(n)=vecsum(n=digits(n,3)%2)*2>#n}, [0..299])
    
  • Python
    from sympy.ntheory import digits
    def ok(n):
        d = digits(n, 3)[1:]
        return len(d) < 2*sum(1 for di in d if di%2)
    print([k for k in range(293) if ok(k)]) # Michael S. Branicky, Jul 03 2022

A355504 Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, among the decimal digits of n and a(n) (counted with multiplicity) there are as many even digits as odd digits.

Original entry on oeis.org

1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 10, 20, 12, 22, 14, 24, 16, 26, 18, 28, 11, 21, 13, 23, 15, 25, 17, 27, 19, 29, 30, 40, 32, 42, 34, 44, 36, 46, 38, 48, 31, 41, 33, 43, 35, 45, 37, 47, 39, 49, 50, 60, 52, 62, 54, 64, 56, 66, 58, 68, 51, 61, 53, 63, 55, 65, 57, 67
Offset: 0

Views

Author

Rémy Sigrist, Jul 05 2022

Keywords

Comments

Leading zeros for positive integers are ignored.
This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			Some terms alongside the corresponding even and odd digits are:
    n    a(n)  even   odd
    ---  ----  -----  -----
      0     1      0      1
      1     0      0      1
      2     3      2      3
      3     2      2      3
      4     5      4      5
      5     4      4      5
      6     7      6      7
      7     6      6      7
      8     9      8      9
      9     8      8      9
     10    10     00     11
     11    20     20     11
     12    12     22     11
     13    22     22     13
     14    14     44     11
    ...   ...    ...    ...
     90    90     00     99
     91  1000    000    911
     92    92     22     99
     93  1002    002    931
     94    94     44     99
     95  1004    004    951
     96    96     66     99
     97  1006    006    971
     98    98     88     99
     99  1008    008    991
    100   101    000    111
		

Crossrefs

Cf. A227870 (fixed points), A352546, A352547, A352760.

Programs

  • PARI
    See Links section.

Formula

a(n) = n iff n belongs to A227870.
a(n) belongs to A352546 iff n belongs to A352547 and vice versa.

A360181 Numbers k such that the number of odd digits in k! is greater than or equal to the number of even digits.

Original entry on oeis.org

0, 1, 11, 29, 36, 193, 281
Offset: 1

Views

Author

Zhining Yang, Jan 28 2023

Keywords

Comments

If it exists, a(8) > 100000.

Examples

			11 is a term since 11! = 39916800, and the numbers of odd and even digits are both 4.
29 is a term since 29!=8841761993739701954543616000000, and the numbers of odd and even digits are 16 and 15 respectively.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 500],
     Count[IntegerDigits[#!], _?OddQ] >=
       Count[IntegerDigits[#!], _?EvenQ] &]
  • Python
    from sympy import factorial as f
    def ok(n):
        s=str(f(n))
        return(sum(1 for k in s if k in '02468')<=sum(1 for k in s if k in '13579'))
    print([n for n in range(501) if ok(n)])
    
  • Python
    from math import factorial
    from itertools import count, islice
    def A360181_gen(startvalue=0): # generator of terms >= startvalue
        f = factorial(m:=max(startvalue,0))
        for k in count(m):
            if len(s:=str(f)) <= sum(1 for d in s if d in {'1','3','5','7','9'})<<1:
                yield k
            f *= k+1
    A360181_list = list(islice(A360181_gen(),7)) # Chai Wah Wu, May 10 2023
Showing 1-4 of 4 results.