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.

A174869 a(n) is 0 if n is a power of 2, otherwise the smallest k > 0 such that A006530(n+k) < A006530(n).

This page as a plain text file.
%I A174869 #16 Apr 06 2021 21:17:41
%S A174869 0,0,1,0,1,2,1,0,7,2,1,4,1,1,1,0,1,14,1,4,3,2,1,8,2,1,5,2,1,2,1,0,2,1,
%T A174869 1,28,1,1,1,8,1,3,1,1,3,2,1,16,1,4,1,2,1,10,1,4,3,2,1,4,1,1,1,0,1,4,1,
%U A174869 2,1,2,1,56,1,1,6,1,3,2,1,1,47,2,1,6,3,1,1,2,1,6,5,3,2,1,1,32,1,2,1,8,1,2,1
%N A174869 a(n) is 0 if n is a power of 2, otherwise the smallest k > 0 such that A006530(n+k) < A006530(n).
%C A174869 a(n)=1 if the index n is an odd prime.
%H A174869 Antti Karttunen, <a href="/A174869/b174869.txt">Table of n, a(n) for n = 1..8192</a>
%H A174869 Antti Karttunen, <a href="/A174869/a174869.txt">Data supplement: n, a(n) computed for n = 1..65537</a>
%p A174869 A006530 := proc(n) option remember; if n = 1 then 1; else max(op(numtheory[factorset](n)) ) ; end if; end proc:
%p A174869 A174869 := proc(n) if n <= 2 then 0; else gpf := A006530(n) ; if gpf = 2 then 0; else for k from 1 do if A006530(n+k) < gpf then return k; end if; end do: end if; end if; end proc:
%p A174869 seq(A174869(n),n=1..120) ; # _R. J. Mathar_, Aug 10 2010
%t A174869 Block[{s = Array[FactorInteger[#][[-1, 1]] &, 120]}, Array[If[IntegerQ@ Log2[#], 0, Block[{k = 1, n = s[[#]]}, While[n <= s[[# + k]], k++; If[# + k > Length[s], AppendTo[s, FactorInteger[# + k][[-1, 1]] ]] ]; k]] &, 102, 2]] (* _Michael De Vlieger_, Apr 06 2021 *)
%o A174869 (PARI)
%o A174869 A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
%o A174869 A174869(n) = if(!bitand(n,n-1), 0, my(gpf=A006530(n)); for(k=1,oo,if(A006530(n+k)<gpf,return(k)))); \\ _Antti Karttunen_, Apr 06 2021
%Y A174869 Cf. A006530, A103667, A023503, A023509, A174857, A020639, A002618, A036689.
%K A174869 nonn
%O A174869 1,6
%A A174869 _Vladimir Shevelev_, Mar 31 2010
%E A174869 More terms from _R. J. Mathar_, Aug 10 2010