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

A285110 a(n) = A001222(A285323(n)).

Original entry on oeis.org

0, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1
Offset: 0

Views

Author

Antti Karttunen, Apr 19 2017

Keywords

Comments

The sequence is completely determined by the positions of two least significant 1-bits of n: After initial zero, if n is a power of two (only one 1-bit present) or if prime(1+A285099(n)) > prime(1+A007814(n))^2, a(n) = 2, otherwise a(n) = 1.

Crossrefs

Programs

  • Python
    from operator import mul
    from sympy import prime, primefactors
    from functools import reduce
    def a001222(n): return 0 if n<2 else a001222(n//min(primefactors(n))) + 1
    def a019565(n): return reduce(mul, (prime(i+1) for i, v in enumerate(bin(n)[:1:-1]) if v == '1')) if n > 0 else 1 # This function from Chai Wah Wu
    def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
    def a065642(n):
        if n==1: return 1
        r=a007947(n)
        n += r
        while a007947(n)!=r:
            n+=r
        return n
    def a285323(n): return a065642(a065642(a019565(n)))//a019565(n)
    def a(n): return a001222(a285323(n))
    print([a(n) for n in range(121)]) # Indranil Ghosh, Apr 20 2017
  • Scheme
    (define (A285110 n) (A001222 (A285323 n)))
    (define (A285110 n) (cond ((zero? n) n) ((or (= 1 (A000120 n)) (> (A000040 (+ 1 (A285099 n))) (A000290 (A000040 (+ 1 (A007814 n)))))) 2) (else 1)))
    

Formula

a(n) = A001222(A285323(n)).

A285327 Row 3 of A285325: a(n) = A048675(A065642(A065642(A019565(n)))).

Original entry on oeis.org

0, 3, 6, 5, 12, 7, 10, 9, 24, 11, 18, 13, 20, 15, 18, 17, 48, 19, 22, 21, 36, 23, 26, 25, 40, 27, 34, 29, 36, 31, 34, 33, 96, 35, 38, 37, 68, 39, 42, 41, 72, 43, 50, 45, 52, 47, 50, 49, 80, 51, 54, 53, 68, 55, 58, 57, 72, 59, 66, 61, 68, 63, 66, 65, 192, 67, 70, 69, 132, 71, 74, 73, 136, 75, 82, 77, 84, 79, 82, 81, 144, 83, 86, 85, 100, 87, 90, 89
Offset: 0

Views

Author

Antti Karttunen, Apr 19 2017

Keywords

Crossrefs

Row 3 of A285325 (after the initial zero).

Programs

Formula

Showing 1-2 of 2 results.