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.

A064273 Permutation of nonnegative integers: a(n) = A013928(A019565(n)).

This page as a plain text file.
%I A064273 #36 Feb 23 2025 02:42:13
%S A064273 0,1,2,4,3,6,10,18,5,9,13,27,22,43,64,128,7,14,20,40,33,68,100,202,47,
%T A064273 93,143,282,232,469,702,1404,8,16,25,48,39,79,119,235,56,110,167,333,
%U A064273 278,553,832,1660,88,175,260,520,437,872,1303,2609,608,1216,1826,3649
%N A064273 Permutation of nonnegative integers: a(n) = A013928(A019565(n)).
%C A064273 From _Antti Karttunen_, Aug 24 2014: (Start)
%C A064273 The original name of the sequence was: "Inverse of sequence A048672 considered as a permutation of the nonnegative integers".
%C A064273 However, the real inverse to A048672 is A246353(n) (= a(n)+1), satisfying A246353(A048672(n)) = n for all n. This sequence subtracts one from the terms of A246353 so as to obtain a permutation of nonnegative integers (bijection [0..] --> [0..]).
%C A064273 Sequence is obtained when the range of A019565 is compacted so that it becomes surjective, thus the logarithmic scatter plots look very similar. (Same applies to A246353.) Compare also to the plot of A005940.
%C A064273 (End)
%H A064273 Antti Karttunen, <a href="/A064273/b064273.txt">Table of n, a(n) for n = 0..478</a>
%H A064273 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A064273 From _Antti Karttunen_, Aug 24 2014: (Start)
%F A064273 a(n) = A013928(A019565(n)).
%F A064273 a(n) = A246353(n) - 1.
%F A064273 (End)
%o A064273 (PARI)
%o A064273 allocatemem(234567890);
%o A064273 default(primelimit, 2^22)
%o A064273 uplim_for_13928 = 13123111;
%o A064273 v013928 = vector(uplim_for_13928); A013928(n) = v013928[n];
%o A064273 v013928[1]=0; n=1; while((n < uplim_for_13928), if(issquarefree(n), v013928[n+1] = v013928[n]+1, v013928[n+1] = v013928[n]); n++);
%o A064273 A019565(n) = {factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ _M. F. Hasler_
%o A064273 A064273(n) = A013928(A019565(n));
%o A064273 for(n=0, 478, write("b064273.txt", n, " ", A064273(n))); \\ _Antti Karttunen_, Aug 23 2014
%o A064273 (Scheme) (define (A064273 n) (let loop ((n n) (i 1) (p 1)) (cond ((zero? n) (- (A013928 (+ 1 p)) 1)) ((odd? n) (loop (/ (- n 1) 2) (+ 1 i) (* p (A000040 i)))) (else (loop (/ n 2) (+ 1 i) p))))) ;; _Antti Karttunen_, Aug 23 2014
%o A064273 (Python)
%o A064273 from math import prod, isqrt
%o A064273 from sympy import prime, mobius
%o A064273 def A064273(n):
%o A064273     m = prod(prime(i) for i,j in enumerate(bin(n)[-1:1:-1],1) if j=='1')
%o A064273     return int(sum(mobius(k)*(m//k**2) for k in range(1, isqrt(m)+1))-1) # _Chai Wah Wu_, Feb 23 2025
%Y A064273 One less than A246353.
%Y A064273 Cf. A000040, A005940, A013928, A019565, A048672.
%K A064273 easy,nonn
%O A064273 0,3
%A A064273 _Howard A. Landman_, Sep 23 2001
%E A064273 More terms from _Carl R. White_, Apr 19 2006
%E A064273 Name changed by _Antti Karttunen_, Aug 23 2014