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.

A163830 The n-th composite minus the product of the indices of the primes in its prime factorization.

Original entry on oeis.org

3, 4, 7, 5, 7, 10, 10, 9, 15, 14, 17, 13, 17, 22, 16, 20, 19, 24, 24, 31, 23, 27, 23, 32, 30, 27, 37, 34, 39, 33, 37, 46, 33, 41, 37, 46, 46, 40, 52, 41, 48, 54, 51, 47, 63, 47, 56, 61, 51, 58, 68, 62, 57, 68, 57, 66, 77, 65, 69, 76, 64, 72, 67, 83, 78, 67, 83, 71, 79, 71, 94
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 05 2009

Keywords

Comments

The product of the indices of the primes (counted with multiplicity) is represented by A003963. An intermediate sequence m-A003963(m) = 0, 1, 1, 3, 2, 4, 3, 7, 5, 7, 6, ... at m=1, 2, 3, ... is defined and evaluated where m=A002808(n) is composite.

Examples

			At n=1, A002808(1) = 4 and A003963(4)=1, so a(1) = 4 - 1 = 3.
At n=2, A002808(2) = 6 and A003963(6)=2, so a(2) = 6 - 2 = 4.
At n=3, A002808(3) = 8 and A003963(8)=1, so a(3) = 8 - 1 = 7.
		

Crossrefs

Programs

  • Maple
    A002808 := proc(n) local a; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; end if; end do; end if; end proc:
    A163829 := proc(n) local c; c := A002808(n) ; pfs := ifactors(c)[2] ; mul( numtheory[pi](op(1,p))^op(2,p), p=pfs) ; end:
    A163830 := proc(n) A002808(n)-A163829(n) ; end: seq(A163830(n),n=1..100) ; # R. J. Mathar, Aug 08 2009
  • Mathematica
    With[{nn=100},#-Times@@(PrimePi/@Flatten[Table[#[[1]],{#[[2]]}]&/@ FactorInteger[#]])&/@Complement[Range[2,nn],Prime[Range[ PrimePi[ nn]]]]](* Harvey P. Dale, Mar 29 2012 *)

Formula

a(n) = A002808(n) - A003963(A002808(n)).

Extensions

Edited by R. J. Mathar, Jul 08 2009

A163831 a(n) is the n-th composite minus the sum of the indices of the primes in its prime factorization.

Original entry on oeis.org

2, 3, 5, 5, 6, 8, 9, 10, 12, 13, 15, 15, 16, 19, 19, 19, 21, 22, 24, 27, 26, 26, 28, 30, 29, 31, 34, 35, 37, 38, 36, 42, 41, 43, 42, 44, 47, 47, 49, 47, 47, 53, 50, 55, 58, 56, 58, 59, 58, 62, 65, 61, 67, 66, 68, 69, 73, 73, 68, 76, 75, 71, 75, 80, 82, 81, 81, 80, 78, 84, 89, 89, 90, 92
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 05 2009

Keywords

Comments

For the n-th composite c(n) = A002808(n), determine its canonical factorization c(n) = Product_{j} prime(j)^e_j; then A163515(n) = Sum_{j} e_j*j; a(n) = c(n) - A163515(n).

Examples

			A002808(1) = 4 = prime(1)*prime(1), so a(1) = 4 - (1+1) = 2.
A002808(2) = 6 = prime(1)*prime(2), so a(2) = 6 - (1+2) = 3.
A002808(3) = 8 = prime(1)*prime(1)*prime(1), so a(3) = 8 - (1+1+1) = 5.
		

Crossrefs

Programs

  • Maple
    A002808 := proc(n) local a; if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; end if; end do; end if; end proc:
    A163515 := proc(n) local c; c := A002808(n) ; pfs := ifactors(c)[2] ; add( op(2,p)*numtheory[pi](op(1,p)), p=pfs) ; end:
    A163831 := proc(n) A002808(n)-A163515(n) ; end: seq(A163831(n),n=1..100) ; # R. J. Mathar, Aug 05 2009
  • Mathematica
    cmsi[n_]:=n-Total[(PrimePi/@(Flatten[Table[#[[1]],#[[2]]]&/@ FactorInteger[ n]]))]; cmsi/@Select[Range[100],CompositeQ] (* Harvey P. Dale, Dec 15 2021 *)

Formula

a(n) = A002808(n) - A163515(n).

Extensions

Edited and corrected by R. J. Mathar, Aug 05 2009
Showing 1-2 of 2 results.