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.

A276331 a(0) = 0 and for n >= 1, a(n) = n minus the largest term of A001563 that divides n.

This page as a plain text file.
%I A276331 #8 Aug 31 2016 20:55:39
%S A276331 0,0,1,2,0,4,5,6,4,8,9,10,8,12,13,14,12,16,0,18,16,20,21,22,20,24,25,
%T A276331 26,24,28,29,30,28,32,33,34,18,36,37,38,36,40,41,42,40,44,45,46,44,48,
%U A276331 49,50,48,52,36,54,52,56,57,58,56,60,61,62,60,64,65,66,64,68,69,70,54,72,73,74,72,76,77,78,76,80,81,82,80
%N A276331 a(0) = 0 and for n >= 1, a(n) = n minus the largest term of A001563 that divides n.
%H A276331 Antti Karttunen, <a href="/A276331/b276331.txt">Table of n, a(n) for n = 0..4320</a>
%F A276331 a(n) = n - A276330(n).
%t A276331 f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[n - # #! &[Length@ TakeWhile[Reverse@ f@ n, # == 0 &] + 1], {n, 84}] (* _Michael De Vlieger_, Aug 31 2016 *)
%o A276331 (Scheme) (define (A276331 n) (- n (A276330 n)))
%Y A276331 Cf. A001563, A276330, A276332.
%K A276331 nonn
%O A276331 0,4
%A A276331 _Antti Karttunen_, Aug 30 2016