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.

A100493 a(n) = n + n-th semiprime.

Original entry on oeis.org

5, 8, 12, 14, 19, 21, 28, 30, 34, 36, 44, 46, 48, 52, 54, 62, 66, 69, 74, 77, 79, 84, 88, 93, 99, 103, 109, 113, 115, 117, 122, 125, 127, 129, 141, 147, 152, 156, 158, 161, 163, 165, 172, 177, 179, 187, 189, 191, 194, 196, 206, 210, 212, 215, 221, 225, 234, 236
Offset: 1

Views

Author

Jonathan Vos Post, Nov 20 2004

Keywords

Comments

This is the semiprime analog of A014688.

Examples

			a(7) = 7 + semiprime(7) = 7 + 21 = 28.
		

Crossrefs

Programs

  • Magma
    m:=300;
    A001222:=[n eq 1 select 0 else (&+[p[2]: p in Factorization(n)]): n in [1..4*m]];
    A001358:=[n: n in [1..4*m] | A001222[n] eq 2];
    A100493:= func< n | n + A001358[n] >;
    [A100493(n): n in [1..m]]; // G. C. Greubel, Apr 04 2023
    
  • Maple
    N:= 1000: # to use semiprimes <= N
    Primes:= select(isprime, [2,seq(i,i=3..N,2)]):
    Semiprimes:= sort(convert(select(`<=`,{seq(seq(Primes[i]*Primes[j],i=1..j),j=1..nops(Primes))},N),list)):
    seq(i+Semiprimes[i],i=1..nops(Semiprimes)); # Robert Israel, Dec 20 2015
  • Mathematica
    m=300;
    A001358:= A001358= Select[Range[5*m], PrimeOmega[#]==2 &];
    A100493[n_]:= n + A001358[[n]];
    Table[A100493[n], {n, m}] (* G. C. Greubel, Apr 04 2023 *)
  • PARI
    lista(n)= my(s=0); vector(n, i, while(2!=bigomega(s++), ); i+s); \\ Ruud H.G. van Tol, Mar 10 2025
  • SageMath
    from sympy import primeomega
    b=[n for n in (1..1000) if primeomega(n)==2]
    [n+b[n-1] for n in range(1,301)] # G. C. Greubel, Apr 04 2023
    

Formula

a(n) = n + A001358(n).
a(n) ~ n log n / log log n. [Charles R Greathouse IV, Dec 28 2011]

Extensions

Edited, corrected and extended by Ray Chandler, Nov 26 2004