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.

A161849 a(n) = A052369(n) mod A056608(n).

This page as a plain text file.
%I A161849 #13 Oct 15 2023 11:21:17
%S A161849 0,1,0,0,1,1,1,2,0,1,1,1,1,1,0,1,0,1,1,0,2,1,2,1,1,1,1,1,1,2,1,1,0,1,
%T A161849 2,1,1,1,1,1,1,1,1,1,0,3,1,1,2,1,1,1,2,1,4,1,1,0,1,1,2,1,2,1,1,6,1,1,
%U A161849 1,4,1,1,2,1,1,1,1,1,1,1,1,1,1,3,1,1,1,3,1,0,1,2,1,0,1,0,1,1,1,5,1,2,1,1,1
%N A161849 a(n) = A052369(n) mod A056608(n).
%C A161849 (Largest prime divisor) modulo (smallest prime divisor) of n-th composite number.
%e A161849 a(1) = 0 = 2 mod 2;
%e A161849 a(2) = 1 = 3 mod 2;
%e A161849 a(3) = 0 = 2 mod 2;
%e A161849 a(4) = 0 = 3 mod 3;
%e A161849 a(5) = 1 = 5 mod 2.
%p A161849 A002808 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) : fi; od: fi; end:
%p A161849 A006530 := proc(n) local u: if n=1 then 1 else u:= numtheory[factorset](n): max(seq(u[j], j=1..nops(u))) end if end:
%p A161849 A020639 := proc(n) local u: if n=1 then 1 else u:= numtheory[factorset](n): min(seq(u[j], j=1..nops(u))) end if end:
%p A161849 A052369 := proc(n) A006530(A002808(n)) ; end:
%p A161849 A056608 := proc(n) A020639(A002808(n)) ; end:
%p A161849 A161849 := proc(n) A052369(n) mod A056608(n) ; end: seq(A161849(n),n=1..120) ; # _R. J. Mathar_, Jun 23 2009
%t A161849 Composite[n_] := FixedPoint[n + PrimePi[#] + 1&, n + PrimePi[n] + 1];
%t A161849 a[n_] := With[{f = FactorInteger[Composite[n]]}, f[[-1, 1]]~Mod~f[[1, 1]]];
%t A161849 Table[a[n], {n, 1, 105}] (* _Jean-François Alcover_, Oct 15 2023 *)
%o A161849 (Magma) [ D[ #D] mod D[1]: n in [2..140] | not IsPrime(n) where D is PrimeDivisors(n) ]; // _Klaus Brockhaus_, Jun 24 2009
%Y A161849 Cf. A052369, A056608, A002808.
%Y A161849 Cf. A161850, A161986. - _Klaus Brockhaus_, Jun 24 2009
%K A161849 nonn
%O A161849 1,8
%A A161849 _Juri-Stepan Gerasimov_, Jun 20 2009
%E A161849 a(102) corrected by _R. J. Mathar_, Jun 23 2009