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.

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

This page as a plain text file.
%I A285110 #16 May 09 2021 09:51:31
%S A285110 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,
%T A285110 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,
%U A285110 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
%N A285110 a(n) = A001222(A285323(n)).
%C A285110 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.
%H A285110 Antti Karttunen, <a href="/A285110/b285110.txt">Table of n, a(n) for n = 0..8192</a>
%F A285110 a(n) = A001222(A285323(n)).
%o A285110 (Scheme)
%o A285110 (define (A285110 n) (A001222 (A285323 n)))
%o A285110 (define (A285110 n) (cond ((zero? n) n) ((or (= 1 (A000120 n)) (> (A000040 (+ 1 (A285099 n))) (A000290 (A000040 (+ 1 (A007814 n)))))) 2) (else 1)))
%o A285110 (Python)
%o A285110 from operator import mul
%o A285110 from sympy import prime, primefactors
%o A285110 from functools import reduce
%o A285110 def a001222(n): return 0 if n<2 else a001222(n//min(primefactors(n))) + 1
%o A285110 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_
%o A285110 def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
%o A285110 def a065642(n):
%o A285110     if n==1: return 1
%o A285110     r=a007947(n)
%o A285110     n += r
%o A285110     while a007947(n)!=r:
%o A285110         n+=r
%o A285110     return n
%o A285110 def a285323(n): return a065642(a065642(a019565(n)))//a019565(n)
%o A285110 def a(n): return a001222(a285323(n))
%o A285110 print([a(n) for n in range(121)]) # _Indranil Ghosh_, Apr 20 2017
%Y A285110 Cf. A000040, A000290, A001222, A007814, A285099, A285323, A285324.
%K A285110 nonn
%O A285110 0,2
%A A285110 _Antti Karttunen_, Apr 19 2017