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.

A351567 The second least significant nonzero digit in the primorial base expansion of n, or 0 if there is no such digit.

This page as a plain text file.
%I A351567 #13 Mar 13 2024 01:51:06
%S A351567 0,0,0,1,0,2,0,1,1,1,1,2,0,2,2,1,2,2,0,3,3,1,3,2,0,4,4,1,4,2,0,1,1,1,
%T A351567 1,2,1,1,1,1,1,2,1,2,2,1,2,2,1,3,3,1,3,2,1,4,4,1,4,2,0,2,2,1,2,2,2,1,
%U A351567 1,1,1,2,2,2,2,1,2,2,2,3,3,1,3,2,2,4,4,1,4,2,0,3,3,1,3,2,3,1,1,1,1,2,3,2,2,1
%N A351567 The second least significant nonzero digit in the primorial base expansion of n, or 0 if there is no such digit.
%H A351567 Antti Karttunen, <a href="/A351567/b351567.txt">Table of n, a(n) for n = 0..60060</a>
%H A351567 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>.
%F A351567 a(n) = A351563(A276086(n)).
%F A351567 For all n, a(n) < A351566(n).
%t A351567 a[n_] := Module[{k = n, p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, If[r > 0, AppendTo[s, r]]; p = NextPrime[p]]; i = Position[s, _?(# > 0 &)] // Flatten; If[Length[s] < 2, 0, s[[2]]]]; Array[a, 100, 0] (* _Amiram Eldar_, Mar 13 2024 *)
%o A351567 (PARI)
%o A351567 A351563(n) = if(1>=omega(n), 0, (factor(n))[2,2]);
%o A351567 A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
%o A351567 A351567(n) = A351563(A276086(n));
%Y A351567 Cf. A060735 (gives the positions of zeros after a(0)=0).
%Y A351567 Cf. A049345, A276086, A351563, A351566.
%K A351567 nonn,base
%O A351567 0,6
%A A351567 _Antti Karttunen_, Apr 01 2022