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).

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Comments

The scatter plot has unusual "rays".

Crossrefs

Programs

  • Mathematica
    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 *)
  • Python
    from sympy import divisors
    from sympy.ntheory.factor_ import core
    def a007947(n): return max(i for i in divisors(n) if core(i) == i)
    def a079277(n):
        k=n - 1
        while True:
            if a007947(k*n) == a007947(n): return k
            else: k-=1
    def a(n): return 1 if n<2 else n - a079277(n)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 26 2017
  • Scheme
    (define (A285699 n) (if (= 1 n) n (- n (A079277 n))))
    

Formula

a(1) = 1; for n > 1, a(n) = n - A079277(n).
Other identities. For all n >= 1:
a(A285710(n)) = A000010(A285710(n)). [A285710 gives all such matches.]