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.

A046666 a(n) = n - (smallest prime dividing n).

This page as a plain text file.
%I A046666 #27 Dec 16 2017 05:33:13
%S A046666 0,0,2,0,4,0,6,6,8,0,10,0,12,12,14,0,16,0,18,18,20,0,22,20,24,24,26,0,
%T A046666 28,0,30,30,32,30,34,0,36,36,38,0,40,0,42,42,44,0,46,42,48,48,50,0,52,
%U A046666 50,54,54,56,0,58,0,60,60,62,60,64,0,66,66,68,0,70,0
%N A046666 a(n) = n - (smallest prime dividing n).
%C A046666 From _Reinhard Zumkeller_, Jul 08 2010: (Start)
%C A046666 a(n)=0 iff n is not composite;
%C A046666 for composite n: a(n) = max(m: m < n and gcd(m,n) > 1). (End)
%H A046666 Antti Karttunen, <a href="/A046666/b046666.txt">Table of n, a(n) for n = 2..16385</a>
%F A046666 a(n) = n - A020639(n). - _Michel Marcus_, Jan 07 2015
%p A046666 with(numtheory):
%p A046666 a:= n-> n-min(factorset(n)[]):
%p A046666 seq(a(n), n=2..100);  # _Alois P. Heinz_, Jan 07 2015
%t A046666 Table[n-First@(First/@FactorInteger[n]),{n,2,200}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 08 2011 *)
%o A046666 (PARI) a(n) = n - factor(n)[1,1]; \\ _Michel Marcus_, Jan 07 2015
%Y A046666 Cf. A020639, A061228.
%K A046666 nonn
%O A046666 2,3
%A A046666 _N. J. A. Sloane_