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.

A277195 Permutation of nonnegative integers: a(n) = A022290(A277010(n)).

This page as a plain text file.
%I A277195 #10 Aug 31 2024 14:45:53
%S A277195 0,1,2,3,4,5,6,8,13,9,7,21,34,10,14,55,22,89,12,144,15,35,11,233,56,
%T A277195 23,377,17,610,90,987,36,1597,16,57,145,2584,4181,234,24,25,6765,91,
%U A277195 19,10946,17711,378,18,38,28657,611,46368,37,988,146,75025,26,235,1598,58,121393,196418,59,317811,20,2585,514229,832040,27,379,1346269,93,92
%N A277195 Permutation of nonnegative integers: a(n) = A022290(A277010(n)).
%C A277195 Note the indexing: domain starts from 1, but the range includes also 0.
%H A277195 Antti Karttunen, <a href="/A277195/b277195.txt">Table of n, a(n) for n = 1..1024</a>
%H A277195 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A277195 a(n) = A022290(A277010(n)) = A022290(A156552(A005117(n))).
%o A277195 (Scheme) (define (A277195 n) (A022290 (A277010 n)))
%o A277195 (Python)
%o A277195 from math import isqrt
%o A277195 from sympy import fibonacci, mobius, primepi, factorint
%o A277195 def A277195(n):
%o A277195     def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
%o A277195     def bisection(f,kmin=0,kmax=1):
%o A277195         while f(kmax) > kmax: kmax <<= 1
%o A277195         while kmax-kmin > 1:
%o A277195             kmid = kmax+kmin>>1
%o A277195             if f(kmid) <= kmid:
%o A277195                 kmax = kmid
%o A277195             else:
%o A277195                 kmin = kmid
%o A277195         return kmax
%o A277195     return sum(fibonacci(primepi(p)+i) for i, p in enumerate(factorint(bisection(f), multiple=True),1)) # _Chai Wah Wu_, Aug 31 2024
%Y A277195 Inverse: A277196.
%Y A277195 Cf. A005117, A022290, A156552, A277010.
%K A277195 nonn
%O A277195 1,3
%A A277195 _Antti Karttunen_, Oct 07 2016