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.

A115392 First appearance of n-th prime as prime factor in list of semiprimes.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 12, 14, 16, 21, 22, 25, 27, 29, 33, 35, 38, 41, 45, 47, 50, 52, 55, 58, 62, 64, 67, 70, 73, 76, 82, 84, 87, 88, 93, 96, 100, 104, 107, 111, 113, 115, 120, 121, 124, 126, 133, 137, 141, 142, 143, 147, 149, 155, 158, 162, 168, 169, 174, 176, 178, 183
Offset: 1

Views

Author

Zak Seidov, Mar 08 2006

Keywords

Comments

The positions of even semiprimes in A001358. - Juri-Stepan Gerasimov, Apr 11 2010

Examples

			a(5)=8 because 5th prime, 11, first appeared as a prime factor in 8th semiprime 22=2*11;
a(6)=10 because 6th prime, 13, first appeared as a prime factor in 10th semiprime 26=2*13.
		

Crossrefs

Programs

  • Mathematica
    sp = Select[Range[4,20000],2 == PrimeOmega[#]&]; Table[Position[Mod[sp, Prime[k]],0][[1,1]],{k,1000}] (* For first 1000 terms. - Zak Seidov, Jun 27 2017 *)
  • PARI
    first(n) = my(l = List([4,1]), u = 2*prime(n), res = vector(n), t=0); forprime(p = 2, t++; sqrt(2*prime(n)), forprime(q = p+1, u\p, listput(l, [p*q, t]));  listsort(l); for(i=1, #l, if(res[l[i][3]]==0, res[l[i][3]] = i)) \\ David A. Corneth, Jun 28 2017
    
  • Python
    from math import isqrt
    from sympy import primepi, prime, primerange
    def A115392(n): return int(-((t:=primepi(s:=isqrt(a:=prime(n)<<1)))*(t-1)>>1)+sum(primepi(a//p) for p in primerange(s+1))) # Chai Wah Wu, Apr 03 2025

Formula

A001358(a(n)) = 2*A000040(n) - Zak Seidov, Jun 27 2017

Extensions

Edited by Zak Seidov, Jun 27 2017