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.

A387413 The length of binary expansion of n minus the length of the maximal common prefix of the binary expansions of n and A003961(n), where A003961 is fully multiplicative with a(p) = nextprime(p).

This page as a plain text file.
%I A387413 #13 Sep 01 2025 16:57:19
%S A387413 0,1,1,0,2,1,2,3,3,0,3,3,3,3,3,3,2,0,3,4,4,3,4,4,1,2,3,3,2,3,4,5,1,5,
%T A387413 3,5,4,3,4,3,2,2,3,5,3,3,5,2,4,5,5,5,4,5,5,5,0,5,3,5,5,4,5,5,6,6,3,5,
%U A387413 4,6,4,5,3,6,6,6,4,6,5,5,5,5,4,6,5,5,5,4,6,5,3,5,1,5,4,6,3,6,6,4,2,6,4,5,4
%N A387413 The length of binary expansion of n minus the length of the maximal common prefix of the binary expansions of n and A003961(n), where A003961 is fully multiplicative with a(p) = nextprime(p).
%H A387413 Antti Karttunen, <a href="/A387413/b387413.txt">Table of n, a(n) for n = 1..65537</a>
%H A387413 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>.
%H A387413 <a href="/index/Pri#prime_indices">Index entries for sequences related to prime indices in the factorization of n</a>.
%F A387413 a(n) = (1+A000523(n)) - A387412(n).
%o A387413 (PARI)
%o A387413 A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
%o A387413 A387413(n) = { my(a=binary(n), b=binary(A003961(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(#a-(i-1))); i++); (0); };
%Y A387413 Cf. A000523, A003961, A387412, A387414 (positions of 0's).
%Y A387413 Cf. also A387423.
%K A387413 nonn,new
%O A387413 1,5
%A A387413 _Antti Karttunen_, Sep 01 2025