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-3 of 3 results.

A128301 Indices of squares (of primes) in the semiprimes.

Original entry on oeis.org

1, 3, 9, 17, 40, 56, 90, 114, 164, 253, 289, 404, 484, 533, 634, 783, 973, 1031, 1233, 1373, 1452, 1683, 1842, 2112, 2483, 2676, 2779, 2995, 3108, 3320, 4124, 4384, 4775, 4926, 5593, 5741, 6172, 6644, 6962, 7448, 7955, 8108, 8978, 9147, 9512, 9697, 10842
Offset: 1

Views

Author

Rick L. Shepherd, Feb 25 2007

Keywords

Comments

A001358(a(n)) = A001248(n) = A000040(n)^2.
Numbers n with property that tau(semiprime(n)) is not semiprime. - Juri-Stepan Gerasimov, Oct 15 2010

Examples

			a(4) = 17 as 49 = 7^2 = prime(4)^2, the fourth square in the semiprimes, is the seventeenth semiprime.
		

Crossrefs

Programs

  • Mathematica
    With[{sp=Select[Range[50000],PrimeOmega[#]==2&]},Flatten[Table[ Position[ sp,Prime[ n]^2],{n,Floor[Sqrt[Length[sp]]]}]]] (* Harvey P. Dale, Nov 17 2014 *)
  • PARI
    a(n)=my(s=0,i=0); n=prime(n)^2; forprime(p=2, sqrt(n), s+=primepi(n\p); i++); s - i * (i-1)/2
    \\ Charles R Greathouse IV, Apr 21 2011
    
  • Perl
    -MMath::Pari=factorint,PARI -wle 'my $c = 0; my $s = PARI 1; while (1) { ++$s; my($sp, $si) = @{factorint($s)}; next if @$sp > 2; next if $si->[0] + (@$si > 1 ? $si->[1] : 0) != 2; ++$c; print "$s => $c" if @$sp == 1}' # Hugo van der Sanden, Sep 25 2007
    
  • Python
    from math import isqrt
    from sympy import prime, primepi
    def A128301(n):
        m = prime(n)**2
        return int(sum(primepi(m//prime(k))-k+1 for k in range(1,n+1))) # Chai Wah Wu, Jul 23 2024

A128303 Indices of squares (of semiprimes) in the 4-almost primes.

Original entry on oeis.org

1, 3, 8, 12, 24, 29, 59, 66, 90, 97, 162, 172, 187, 224, 234, 335, 385, 412, 489, 531, 551, 630, 692, 791, 921, 997, 1128, 1223, 1256, 1285, 1420, 1484, 1518, 1549, 1937, 2146, 2315, 2441, 2483, 2556, 2606, 2651, 2915, 3124, 3175, 3542, 3587, 3645, 3751, 3800
Offset: 1

Views

Author

Rick L. Shepherd, Mar 04 2007

Keywords

Examples

			a(5) = 24 as 196 = 14^2 = semiprime(5)^2, the 5th square in the 4-almost primes, is the 24th 4-almost prime.
		

Crossrefs

Programs

Formula

A014613(a(n)) = A074985(n) = A001358(n)^2.

A376479 Array read by antidiagonals: T(n,k) is the index of prime(k)^n in the numbers with n prime factors, counted with multiplicity.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 9, 5, 1, 5, 17, 30, 8, 1, 6, 40, 82, 90, 14, 1, 7, 56, 328, 385, 269, 23, 1, 8, 90, 551, 2556, 1688, 788, 39, 1, 9, 114, 1243, 5138, 18452, 7089, 2249, 64, 1, 10, 164, 1763, 15590, 44329, 126096, 28893, 6340, 103, 1, 11, 253, 3112, 24646, 179313, 361249, 827901, 115180, 17526
Offset: 1

Views

Author

Robert Israel, Sep 24 2024

Keywords

Comments

T(n,k) is the number of numbers j with n prime factors, counted with multiplicity, such that j <= prime(k)^n.

Examples

			T(2,3) = 9 because the third prime is 5 and 5^2 = 25 is the 9th semiprime.
		

Crossrefs

Cf. A001222, A078843 (second column), A078844 (third column), A078845 (fourth column), A078846 (fifth column), A128301 (second row), A128302 (third row), A128304 (fourth row).

Programs

  • Maple
    T:= Matrix(12,12):
    with(priqueue);
    for m from 1 to 12 do
      initialize(pq);
      insert([-2^m, [2$m]],pq);
      k:= 0:
      for count from 1 do
        t:= extract(pq);
        w:= t[2];
        if nops(convert(w,set))=1 then
          k:= k+1;
          T[m,k]:= count;
          if m+k = 13 then break fi;
        fi;
        p:= nextprime(w[-1]);
        for i from m to 1 by -1 while w[i] = w[m] do
          insert([t[1]*(p/w[-1])^(m+1-i),[op(w[1..i-1]),p$(m+1-i)]],pq);
    od od od:
    seq(seq(T[i,s-i],i=1..s-1),s=2..13)
Showing 1-3 of 3 results.