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.

A036668 Hati numbers: of form 2^i*3^j*k, i+j even, (k,6)=1.

Original entry on oeis.org

1, 4, 5, 6, 7, 9, 11, 13, 16, 17, 19, 20, 23, 24, 25, 28, 29, 30, 31, 35, 36, 37, 41, 42, 43, 44, 45, 47, 49, 52, 53, 54, 55, 59, 61, 63, 64, 65, 66, 67, 68, 71, 73, 76, 77, 78, 79, 80, 81, 83, 85, 89, 91, 92, 95, 96, 97, 99, 100, 101, 102, 103, 107
Offset: 1

Views

Author

N. J. A. Sloane, Antreas P. Hatzipolakis (xpolakis(AT)hol.gr)

Keywords

Comments

If n appears then 2n and 3n do not. - Benoit Cloitre, Jun 13 2002
Closed under multiplication. Each term is a product of a unique subset of {6} U A050376 \ {2,3}. - Peter Munn, Sep 14 2019

Crossrefs

Cf. A003159, A007310, A014601, A036667, A050376, A052330, A325424 (complement), A325498 (first differences), A373136 (characteristic function).
Positions of 0's in A182582.
Subsequences: A084087, A339690, A352272, A352273.

Programs

  • Maple
    N:= 1000: # to get all terms up to N
    A:= {seq(2^i,i=0..ilog2(N))}:
    Ae,Ao:= selectremove(issqr,A):
    Be:= map(t -> seq(t*9^j, j=0 .. floor(log[9](N/t))),Ae):
    Bo:= map(t -> seq(t*3*9^j,j=0..floor(log[9](N/(3*t)))),Ao):
    B:= Be union Bo:
    C1:= map(t -> seq(t*(6*i+1),i=0..floor((N/t -1)/6)),B):
    C2:= map(t -> seq(t*(6*i+5),i=0..floor((N/t - 5)/6)),B):
    A036668:= C1 union C2; # Robert Israel, May 09 2014
  • Mathematica
    a = {1}; Do[AppendTo[a, NestWhile[# + 1 &, Last[a] + 1,
    Apply[Or, Map[MemberQ[a, #] &, Select[Flatten[{#/3, #/2}],
    IntegerQ]]] &]], {150}]; a  (* A036668 *)
    (* Peter J. C. Moses, Apr 23 2019 *)
  • PARI
    twos(n) = {local(r,m);r=0;m=n;while(m%2==0,m=m/2;r++);r}
    threes(n) = {local(r,m);r=0;m=n;while(m%3==0,m=m/3;r++);r}
    isA036668(n) = (twos(n)+threes(n))%2==0 \\ Michael B. Porter, Mar 16 2010
    
  • PARI
    is(n)=(valuation(n,2)+valuation(n,3))%2==0 \\ Charles R Greathouse IV, Sep 10 2015
    
  • PARI
    list(lim)=my(v=List(),N);for(n=0,logint(lim\=1,3),N=if(n%2,2*3^n,3^n); while(N<=lim, forstep(k=N,lim,[4*N,2*N], listput(v,k)); N<<=2)); Set(v) \\ Charles R Greathouse IV, Sep 10 2015
    
  • Python
    from itertools import count
    def A036668(n):
        def f(x):
            c = n+x
            for i in range(x.bit_length()+1):
                i2 = 1<x:
                        break
                    m = x//k
                    c -= (m-1)//6+(m-5)//6+2
            return c
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Jan 28 2025

Formula

a(n) = 12/7 * n + O(log^2 n). - Charles R Greathouse IV, Sep 10 2015
{a(n)} = A052330({A014601(n)}), where {a(n)} denotes the set of integers in the sequence. - Peter Munn, Sep 14 2019

Extensions

Offset changed by Chai Wah Wu, Jan 28 2025