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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Jun 20 2009

Keywords

Comments

(Largest prime divisor) modulo (smallest prime divisor) of n-th composite number.

Examples

			a(1) = 0 = 2 mod 2;
a(2) = 1 = 3 mod 2;
a(3) = 0 = 2 mod 2;
a(4) = 0 = 3 mod 3;
a(5) = 1 = 5 mod 2.
		

Crossrefs

Programs

  • Magma
    [ D[ #D] mod D[1]: n in [2..140] | not IsPrime(n) where D is PrimeDivisors(n) ]; // Klaus Brockhaus, Jun 24 2009
  • Maple
    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:
    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:
    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:
    A052369 := proc(n) A006530(A002808(n)) ; end:
    A056608 := proc(n) A020639(A002808(n)) ; end:
    A161849 := proc(n) A052369(n) mod A056608(n) ; end: seq(A161849(n),n=1..120) ; # R. J. Mathar, Jun 23 2009
  • Mathematica
    Composite[n_] := FixedPoint[n + PrimePi[#] + 1&, n + PrimePi[n] + 1];
    a[n_] := With[{f = FactorInteger[Composite[n]]}, f[[-1, 1]]~Mod~f[[1, 1]]];
    Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Oct 15 2023 *)

Extensions

a(102) corrected by R. J. Mathar, Jun 23 2009

A161986 a(n) = k+r where k is composite(n) and r is (largest prime divisor of k) mod (smallest prime divisor of k).

Original entry on oeis.org

4, 7, 8, 9, 11, 13, 15, 17, 16, 19, 21, 22, 23, 25, 25, 27, 27, 29, 31, 32, 35, 35, 37, 37, 39, 40, 41, 43, 45, 47, 47, 49, 49, 51, 53, 53, 55, 56, 57, 58, 59, 61, 63, 64, 64, 68, 67, 69, 71, 71, 73, 75, 77, 77, 81, 79, 81, 81, 83, 85, 87, 87, 89, 89, 91, 97, 93, 94, 95, 99, 97
Offset: 1

Views

Author

Klaus Brockhaus, Jun 23 2009

Keywords

Comments

Auxiliary sequence for A161850, which is the subsequence consisting of all terms that are prime.
a(n) = A002808(n)+A161849(n).

Examples

			n = 1: composite(1) = 4; (largest prime divisor of 4) = (smallest prime divisor 4) = 2; 2 mod 2 = 0. Hence a(1) = 4+0 = 4.
n = 5: composite(5) = 10; (largest prime divisor of 10) = 5; (smallest prime divisor 10) = 2; 5 mod 2 = 1. Hence a(5) = 10+1 = 11.
		

Crossrefs

Cf. A161850, A002808 (composite numbers), A052369 (largest prime factor of n-th composite), A056608 (smallest divisor of n-th composite), A161849 (A052369(n) mod A056608(n)).

Programs

  • Magma
    [ n + D[ #D] mod D[1]: n in [2..100] | not IsPrime(n) where D is PrimeDivisors(n) ];
    
  • PARI
    genit(maxx=1000)={ctr=0;arr=List();forcomposite(k=4,+oo,v=factor(k)[,1];r=v[#v]%v[1];ctr+=1;if(ctr>=maxx,break);listput(arr,k+r));arr} \\ Bill McEachen, Nov 17 2021
Showing 1-2 of 2 results.