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

A382744 If k appears, 5*k does not.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84
Offset: 1

Views

Author

Jan Snellman, Apr 04 2025

Keywords

Comments

Also: numbers with an even number of 5's in their prime factorization.
Natural density 5/6.

Examples

			5 is removed since 5 = 5*1, 10 is removed, 15 is removed, 20 is removed, but 25 remains.
		

Crossrefs

Programs

  • Maple
    select(t -> padic:-ordp(t,5)::even, [$1..100]); # Robert Israel, Apr 04 2025
  • Mathematica
    Select[Range[100], EvenQ[IntegerExponent[#, 5]] &] (* Amiram Eldar, Apr 04 2025 *)
  • Python
    def ok(n):
        c = 0
        while n and n%5 == 0: n //= 5; c += 1
        return c&1 == 0
    print([k for k in range(1, 82) if ok(k)]) # Michael S. Branicky, Apr 04 2025
    
  • Python
    from sympy import integer_log
    def A382744(n):
        def f(x): return n+x-sum((k:=x//5**m)-k//5 for m in range(0,integer_log(x,5)[0]+1,2))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Apr 10 2025
  • SageMath
    [ for  in range(1,100) if (valuation(_,5) % 2) == 0]
    

Formula

a(n) ~ (6/5)*n.

A382746 If k appears, 8*k does not.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79
Offset: 1

Views

Author

Jan Snellman, Apr 04 2025

Keywords

Comments

Also: integers of the form 2^m*r, r odd, m congruent to 0, 1, 2 mod 6.
The asymptotic density of this sequence is 8/9. - Amiram Eldar, May 31 2025

Examples

			8, 16, ... , 56 are removed, but 8*8 = 64 remains.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Mod[IntegerExponent[#, 2], 6] < 3 &] (* Amiram Eldar, Apr 04 2025 *)
  • PARI
    isok(k) = valuation(k, 2) % 6 < 3; \\ Amiram Eldar, May 31 2025
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None, typed=True)
    def in_sieve(n, S):
        if n == 1:
            return True
        elif n in S:
            return False
        else:
            L = [s for s in S if (n % s) == 0]
            return all(not in_sieve(n/ell, S) for ell in L )
    def nth_in_sieve(n, S):
        if n == 1:
            return 1
        else:
            i, m = 1, 1
            while i < n:
                m = m+1
                if in_sieve(m, S):
                    i = i+1
        return m
    def a(n):
        return nth_in_sieve(n, tuple([8]))
    
  • Python
    def A382746(n):
        def f(x): return n+x-sum((x>>m)+1>>1 for m in range(x.bit_length()+1) if m%6<3)
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Apr 10 2025
    
  • Sage
    [ for  in range(1,100) if (valuation(_,2) % 6) < 3]
    

A382750 If k appears, 9*k does not.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81
Offset: 1

Views

Author

Jan Snellman, May 09 2025

Keywords

Comments

Integers k with val(k, 9) even, where val(k, 9) is the 9-adic valuation of k.
Natural density 9/10.
Differs from A168183: 81 for example is not in A168183 but in this sequence. - R. J. Mathar, May 26 2025

Examples

			18 = 9*2 is not a term because 2 is a term.
162 = 9*18 is a term since 18 is not a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Mod[IntegerExponent[#, 3], 4] < 2 &] (* Amiram Eldar, May 12 2025 *)
  • Python
    from sympy import integer_log
    def A382750(n):
        def f(x): return n+x-sum((k:=x//9**m)-k//9 for m in range(0,integer_log(x,9)[0]+1,2))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, May 24 2025
  • SageMath
    [ for  in range(1,100+1) if (valuation(_,3) % 4) < 2 ]
    
Showing 1-3 of 3 results.