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.

A276094 a(n) = n modulo A002110(A257993(n)), a(0) = 0.

This page as a plain text file.
%I A276094 #17 May 07 2021 09:10:37
%S A276094 0,1,2,1,4,1,6,1,2,1,4,1,12,1,2,1,4,1,18,1,2,1,4,1,24,1,2,1,4,1,30,1,
%T A276094 2,1,4,1,6,1,2,1,4,1,12,1,2,1,4,1,18,1,2,1,4,1,24,1,2,1,4,1,60,1,2,1,
%U A276094 4,1,6,1,2,1,4,1,12,1,2,1,4,1,18,1,2,1,4,1,24,1,2,1,4,1,90,1,2,1,4,1,6,1,2,1,4,1,12,1,2,1,4,1,18,1
%N A276094 a(n) = n modulo A002110(A257993(n)), a(0) = 0.
%H A276094 Antti Karttunen, <a href="/A276094/b276094.txt">Table of n, a(n) for n = 0..2310</a>
%F A276094 a(0) = 0, and for n >= 1, a(n) = n modulo A002110(A257993(n)).
%F A276094 or a(n) = A276088(n) * A002110(A276084(n)).
%F A276094 Other identities. For all n >= 0:
%F A276094 a(n) = n - A276093(n).
%t A276094 {0}~Join~Table[k = 1; While[! CoprimeQ[Prime@ k, n], k++]; Mod[n, Product[Prime@ i, {i, k}]], {n, 79}] (* _Michael De Vlieger_, Jun 22 2017 *)
%o A276094 (Scheme, two versions)
%o A276094 (define (A276094 n) (if (zero? n) n (let loop ((n n) (i 1) (pr 1)) (let* ((p (A000040 i)) (d (modulo n p))) (if (not (zero? d)) (* d pr) (loop (/ (- n d) p) (+ 1 i) (* pr p)))))))
%o A276094 (define (A276094 n) (if (zero? n) n (modulo n (A002110 (A257993 n)))))
%o A276094 (Python)
%o A276094 from sympy import nextprime, primepi, primorial
%o A276094 def a053669(n):
%o A276094     p = 2
%o A276094     while True:
%o A276094         if n%p: return p
%o A276094         else: p=nextprime(p)
%o A276094 def a257993(n): return primepi(a053669(n))
%o A276094 def a002110(n): return 1 if n<1 else primorial(n)
%o A276094 def a(n): return 0 if n==0 else n%a002110(a257993(n))
%o A276094 print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jun 22 2017
%Y A276094 Cf. A000040, A002110, A257993, A276084, A276088, A276093.
%K A276094 nonn,base
%O A276094 0,3
%A A276094 _Antti Karttunen_, Aug 22 2016