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.

A285699 a(1) = 1; for n > 1, a(n) = n - A079277(n).

This page as a plain text file.
%I A285699 #24 Apr 30 2021 06:06:24
%S A285699 1,1,2,2,4,2,6,4,6,2,10,3,12,6,6,8,16,2,18,4,12,6,22,6,20,10,18,12,28,
%T A285699 3,30,16,6,2,10,4,36,6,12,8,40,6,42,12,18,14,46,12,42,10,24,20,52,6,
%U A285699 30,7,30,26,58,6,60,30,14,32,40,2,66,4,42,6,70,8,72,10,30,12,28,6,78,16,54,18,82,3,60,22,6,24,88,9,42,28,12,30,70,15,96,34,18,20
%N A285699 a(1) = 1; for n > 1, a(n) = n - A079277(n).
%C A285699 The scatter plot has unusual "rays".
%H A285699 Antti Karttunen, <a href="/A285699/b285699.txt">Table of n, a(n) for n = 1..10000</a>
%F A285699 a(1) = 1; for n > 1, a(n) = n - A079277(n).
%F A285699 Other identities. For all n >= 1:
%F A285699 a(A285710(n)) = A000010(A285710(n)). [A285710 gives all such matches.]
%t A285699 Table[n - If[n <= 2, n - 1, Module[{k = n - 2, e = Floor@ Log2@ n}, While[PowerMod[n, e, k] != 0, k--]; k]], {n, 100}] (* _Michael De Vlieger_, Apr 26 2017 *)
%o A285699 (Scheme) (define (A285699 n) (if (= 1 n) n (- n (A079277 n))))
%o A285699 (Python)
%o A285699 from sympy import divisors
%o A285699 from sympy.ntheory.factor_ import core
%o A285699 def a007947(n): return max(i for i in divisors(n) if core(i) == i)
%o A285699 def a079277(n):
%o A285699     k=n - 1
%o A285699     while True:
%o A285699         if a007947(k*n) == a007947(n): return k
%o A285699         else: k-=1
%o A285699 def a(n): return 1 if n<2 else n - a079277(n)
%o A285699 print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Apr 26 2017
%Y A285699 Cf. A000010, A079277, A285710.
%K A285699 nonn,look
%O A285699 1,3
%A A285699 _Antti Karttunen_, Apr 26 2017