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.

A289838 a(n) = A289815(n) * A289816(n).

Original entry on oeis.org

1, 2, 2, 3, 6, 6, 3, 6, 6, 4, 10, 10, 12, 30, 30, 12, 30, 30, 4, 10, 10, 12, 30, 30, 12, 30, 30, 5, 14, 14, 15, 42, 42, 15, 42, 42, 20, 70, 70, 60, 210, 210, 60, 210, 210, 20, 70, 70, 60, 210, 210, 60, 210, 210, 5, 14, 14, 15, 42, 42, 15, 42, 42, 20, 70, 70
Offset: 0

Views

Author

Rémy Sigrist, Jul 13 2017

Keywords

Comments

Each number k > 0 appears 2^omega(k) times (where omega = A001221).
a(A004488(n)) = a(n) for any n >= 0.
The number of distinct prime factors of a(n) equals the number of nonzero digits in the ternary representation of n.

Examples

			a(42) = A289815(42) * A289816(42) = 20 * 3 = 60.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v=1);
           for (o=2, oo,
               if (n==0, return (v));
               if (gcd(v, o)==1 && omega(o)==1,
                   if (n % 3, v *= o);
                   n \= 3;
               );
           );}
    
  • Python
    from sympy import gcd, primefactors
    def omega(n): return 0 if n==1 else len(primefactors(n))
    def a(n):
        v, o = 1, 2
        while True:
            if n==0: return v
            if gcd(v, o)==1 and omega(o)==1:
                if n%3: v*=o
                n //= 3
            o+=1
    print([a(n) for n in range(101)]) # Indranil Ghosh, Aug 02 2017