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.

A080732 Smallest distance from n to a prime power (as defined in A246655).

This page as a plain text file.
%I A080732 #19 Mar 24 2018 13:18:50
%S A080732 1,0,0,0,0,1,0,0,0,1,0,1,0,1,1,0,0,1,0,1,2,1,0,1,0,1,0,1,0,1,0,0,1,2,
%T A080732 2,1,0,1,2,1,0,1,0,1,2,1,0,1,0,1,2,1,0,1,2,3,2,1,0,1,0,1,1,0,1,1,0,1,
%U A080732 2,1,0,1,0,1,2,3,2,1,0,1,0,1,0,1,2,3,2
%N A080732 Smallest distance from n to a prime power (as defined in A246655).
%C A080732 a(n)=min (abs(n-k) : where k runs through the prime powers)
%H A080732 T. D. Noe, <a href="/A080732/b080732.txt">Table of n, a(n) for n = 1..10000</a>
%t A080732 nn = 100; pp = Select[Range[2, Prime[1 + PrimePi[nn]]], Length[FactorInteger[#]] == 1 &]; Table[Min[Abs[n - pp]], {n, nn}] (* _T. D. Noe_, Mar 14 2012 *)
%Y A080732 Cf. A051699, A246547, A301295.
%Y A080732 There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. - _N. J. A. Sloane_, Mar 24 2018
%K A080732 nonn
%O A080732 1,21
%A A080732 _Benoit Cloitre_, Mar 08 2003