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-10 of 12 results. Next

A247509 Number of preprimes (A156759, n>1) such that the smallest prime divisor equals prime(n).

Original entry on oeis.org

3, 3, 2, 4, 2, 3, 2, 2, 3, 2, 4, 3, 2, 2, 3, 3, 2, 4, 3, 2, 3, 2, 2, 4, 3, 2, 3, 2, 2, 5, 2, 3, 2, 4, 2, 3, 3, 2, 3, 3, 2, 5, 2, 3, 2, 3, 5, 3, 2, 2, 3, 2, 3, 3, 3, 3, 2, 4, 3, 2, 2, 5, 3, 2, 2, 3, 2, 4, 2, 2, 2, 3, 3, 3, 2, 2, 3, 2, 2, 3, 2, 4, 2, 3, 2, 2, 4
Offset: 1

Views

Author

Vladimir Shevelev, Sep 18 2014

Keywords

Examples

			For n=2, using the formula, we have a(2)=pi(25/3)-1=3.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 3;a[n_] := PrimePi[Prime[n + 1]^2 / Prime[n]] - n + 1; Table[a[n], {n, 1, 87}] (* Indranil Ghosh, Mar 09 2017 *)
  • PARI
    for (n=1, 87, print1(if(n==1, 3, primepi(prime(n + 1)^2 / prime(n)) - n + 1),", ")) \\ Indranil Ghosh, Mar 09 2017

Formula

For n>1, a(n) = pi(prime(n+1)^2/prime(n))-n +1, where pi(x) is the prime counting function (cf. A000720). - Vladimir Shevelev, Sep 28 2014

Extensions

More terms from Peter J. C. Moses, Sep 18 2014

A247393 Numbers n such that the second maximal prime <= sqrt(n) is the least prime divisor of n.

Original entry on oeis.org

10, 12, 14, 16, 18, 20, 22, 24, 27, 33, 39, 45, 55, 65, 85, 95, 115, 133, 161, 187, 209, 253, 299, 391, 493, 527, 551, 589, 703, 779, 817, 851, 943, 1073, 1189, 1247, 1363, 1457, 1643, 1739, 1927, 2173, 2279, 2537, 2623, 2867, 3149, 3337, 3431, 3551, 3953
Offset: 1

Views

Author

Vladimir Shevelev, Sep 16 2014

Keywords

Comments

These numbers we call "preprimes" of the second kind in contrast to A156759 for n>=2, for which the maximal prime <= sqrt(n) is the least prime divisor of n. Terms of A156759 (n>=2) we call "preprimes" (cf. comment there).

Examples

			a(1)=10. Indeed, in interval [2,sqrt(10)] we have two primes: 2 and 3. Maximal from them 3, the second maximal is 2, and 2=lpf(10).
		

Crossrefs

Cf. A156759.

Programs

  • Mathematica
    Select[Range[4000], Prime[PrimePi[Sqrt[#]]-1] == FactorInteger[#][[1,1]] &] (* Indranil Ghosh, Mar 08 2017 *)
  • PARI
    select(n->prime(primepi(sqrtint(n))-1)==factor(n)[1, 1], vector(10^4, x, x+8)) \\ Jens Kruse Andersen, Sep 17 2014

Formula

lpf(a(n)) = prime(pi(sqrt(a(n)))-1), where pi(n) = A000720(n).

Extensions

More terms from Peter J. C. Moses, Sep 16 2014
a(52..10000) from Jens Kruse Andersen, Sep 17 2014

A247394 Numbers n for which the third maximal prime <= sqrt(n) is the least prime divisor of n.

Original entry on oeis.org

26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 51, 57, 63, 69, 75, 81, 87, 93, 99, 105, 111, 117, 125, 145, 155, 203, 217, 259, 287, 319, 341, 377, 403, 481, 629, 697, 731, 799, 893, 989, 1081, 1219, 1357, 1537, 1829, 1961, 2183, 2419, 2501, 2747, 2881, 3053
Offset: 1

Views

Author

Vladimir Shevelev, Sep 16 2014

Keywords

Comments

These numbers we call "preprimes" of the third kind in contrast to A156759 for n>=2, for which the maximal prime <= sqrt(n) is the least prime divisor of n; and to A247393 for which the second maximal prime <= sqrt(n) is the least prime divisor of n.

Crossrefs

Programs

  • Mathematica
    Select[Range[4000], Prime[PrimePi[Sqrt[#]]-2] == FactorInteger[#][[1,1]] &] (* Indranil Ghosh, Mar 08 2017 *)
  • PARI
    select(n->prime(primepi(sqrtint(n))-2)==factor(n)[1, 1], vector(10^4, x, x+24)) \\ Jens Kruse Andersen, Sep 17 2014

Formula

lpf(a(n)) = prime(pi(isqrt(a(n)))-2), with pi(n) = A000720(n), lpf(n) = A020639(n) and isqrt(n) = A000196(n).

Extensions

Terms up to a(54) from Peter J. C. Moses, Sep 16 2014

A247395 The smallest numbers of every class in a classification of positive numbers (see comment).

Original entry on oeis.org

1, 2, 4, 10, 26, 50, 122, 170, 290, 362, 530, 842, 962, 1370, 1682, 1850, 2210, 2810, 3482, 3722, 4490, 5042, 5330, 6242, 6890, 7922, 9410, 10202, 10610, 11450, 11882, 12770, 16130, 17162, 18770, 19322, 22202, 22802, 24650, 26570, 27890, 29930, 32042, 32762
Offset: 0

Views

Author

Vladimir Shevelev, Sep 16 2014

Keywords

Comments

Consider a classification of the positive numbers with classes {1}, A000040 (primes), A156759 (n>=2) (preprimes, or preprimes of the first kind), A247393 (preprimes of the second kind), A247394 (preprimes of the third kind), etc.
Then a(0)=1, a(1)=2; for n>=3, a(n) is the smallest number which is a preprime of the (n-1)st kind.

Crossrefs

Programs

Formula

For n>=3, a(n) = (prime(n-1))^2 + 1.

Extensions

More terms from Peter J. C. Moses, Sep 16 2014

A247396 Number of even numbers in classes of classification of the positive numbers defined in comment in A247395.

Original entry on oeis.org

0, 1, 3, 8, 12, 36, 24, 60, 36, 84, 156, 60, 204, 156, 84, 180, 300, 336, 120, 384, 276, 144, 456, 324, 516, 744, 396, 204, 420, 216, 444, 1680, 516, 804, 276, 1440, 300, 924, 960, 660, 1020, 1056, 360, 1860, 384, 780, 396, 2460, 2604, 900, 456, 924, 1416, 480
Offset: 0

Views

Author

Vladimir Shevelev, Sep 16 2014

Keywords

Comments

In the classification every class contains no more than a finite number of numbers with a given least prime divisor.

Examples

			a(6) = (prime(6)^2 - prime(5)^2)/2 = (13^2 - 11^2)/2 = 24. - _Indranil Ghosh_, Mar 08 2017
		

Crossrefs

Programs

  • Maple
    A247396:=n->(ithprime(n)^2 - ithprime(n-1)^2)/2: 0,1,3,seq(A247396(n), n=3..100); # Wesley Ivan Hurt, Apr 18 2017
  • Mathematica
    a[0] = 0; a[1] = 1; a[2] = 3; a[n_] := (Prime[n]^2 - Prime[n - 1]^2) / 2; Table[a[n], {n, 0, 53}] (* Indranil Ghosh, Mar 08 2017 *)
  • PARI
    for(n=0, 53, print1(if(n>2, (prime(n)^2 - prime(n - 1)^2)/2, if(n<2, n, 3)),", ")) \\ Indranil Ghosh, Mar 08 2017

Formula

For n>=3, a(n) = (prime(n)^2 - prime(n-1)^2)/2.

Extensions

More terms from Peter J. C. Moses, Sep 17 2014

A247510 Number of preprimes of the second kind (A247393) with the smallest prime divisor equals prime(n).

Original entry on oeis.org

8, 4, 5, 2, 3, 1, 3, 5, 2, 4, 2, 1, 2, 3, 4, 1, 3, 1, 1, 2, 1, 2, 6, 3, 2, 3, 1, 1, 4, 2, 2, 0, 3, 1, 2, 2, 1, 3, 2, 0, 4, 0, 2, 0, 2, 5, 2, 1, 2, 2, 0, 3, 3, 2, 3, 1, 3, 0, 0, 1, 5, 0, 1, 1, 4, 3, 4, 1, 2, 2, 3, 2, 2, 1, 2, 3, 1, 3, 4, 2, 4, 1, 2, 1, 2, 4, 1
Offset: 1

Views

Author

Vladimir Shevelev, Sep 18 2014

Keywords

Crossrefs

Extensions

More terms from Peter J. C. Moses, Sep 18 2014

A247511 Number of preprimes of the third kind (A247394) with the smallest prime divisor equals prime(n).

Original entry on oeis.org

12, 12, 3, 4, 2, 3, 4, 1, 4, 1, 1, 2, 3, 4, 1, 4, 2, 1, 2, 2, 4, 5, 0, 0, 1, 0, 0, 5, 3, 2, 2, 5, 1, 2, 2, 2, 2, 2, 1, 4, 0, 1, 0, 4, 6, 2, 0, 2, 2, 1, 4, 2, 3, 3, 1, 2, 1, 1, 2, 5, 1, 1, 0, 4, 2, 4, 1, 1, 1, 3, 2, 2, 1, 2, 2, 1, 2, 3, 1, 3, 0, 2, 1, 3, 3, 1
Offset: 1

Views

Author

Vladimir Shevelev, Sep 18 2014

Keywords

Crossrefs

Extensions

More terms from Peter J. C. Moses, Sep 18 2014

A247606 Number of non-semiprimes among "preprimes" of the n-th kind (defined in comment in A247395).

Original entry on oeis.org

1, 7, 15, 36, 31, 62, 59, 111, 161, 113, 224, 175, 155, 258, 370, 358, 240, 436, 346, 297, 557, 504, 691, 806, 477, 367, 554, 489, 938, 1743, 786, 959, 725, 1526, 669, 1215, 1207, 1022, 1359, 1286, 958, 1947, 773, 1206, 1328, 3078, 2740, 1165, 915, 1459, 1787
Offset: 1

Views

Author

Vladimir Shevelev, Sep 22 2014

Keywords

Comments

One can prove that non-semiprimes we can find among preprimes of the n-th kind only with the smallest prime divisor 2,3,...,prime(n), where n=1 corresponds to A156759, n=2 corresponds to A247393, n=3 corresponds to A247394, etc. For example, for n=1, only among even numbers of A156759; for n=2 - only among even numbers and numbers with the smallest prime divisor 3 of A247393, etc. Thus, for every n>=1, among preprimes of the n-th kind almost all numbers are semiprimes.

Crossrefs

Extensions

More terms from Peter J. C. Moses, Sep 22 2014

A158846 Primes which are removed with the algorithm of A156284, starting the selection with the interval (2^4, 2^5).

Original entry on oeis.org

19, 29, 41, 47, 53, 59, 61, 97, 149, 167, 173, 233, 239, 251, 271, 283, 313, 331, 349, 373, 409, 433, 439, 499, 509, 521, 557, 563, 593, 641, 677, 743, 761, 797, 827, 887, 911, 941, 953, 1013, 1019, 1021, 1039, 1051, 1129, 1171, 1237, 1279, 1291
Offset: 1

Views

Author

Vladimir Shevelev, Mar 28 2009

Keywords

Comments

We iteratively scan integer intervals (2^(m-1)..2^m), first the one with m=5, then m=6, m=7, etc., and start with the set S={3,5,7,11,...} of all odd primes. For each prime p = 2^m-k, 2^(m-1) < p < 2^m, p is removed from S if k is in S. Basically, all the upper primes of primes pairs are removed when the prime pair sums to a power of 2 which are larger than 2^4. The sequence shows all p that are removed from S at any stage m.
Powers 2^m, m >= 5, are not expressible as sums of two primes which are not in the sequence.

Crossrefs

Programs

  • Maple
    A158846 := proc()
            local mmax,prrem,m,prm,pi,p,q ;
            mmax := 12 ; prrem := {} ;
            for m from 5 to mmax do
                    prm := {} ;
                    for pi from 1 do
                            k := ithprime(pi) ;
                            p := 2^m-k ;
                            if p <= 2^(m-1) then  break; end if;
                            if isprime(p) and not k in prrem then prm := prm union {p} ;
                            end if ;
                    end do:
                    prrem := prrem union prm ;
            end do: print( sort(prrem)) ; return ;
    end proc:
    A158846() ; # R. J. Mathar, Dec 07 2010

A247834 Maximal non-semiprime number which is a "preprime" of the n-th kind (defined in comment in A247395).

Original entry on oeis.org

8, 45, 125, 343, 325, 833, 1331, 1573, 2197, 2057, 3211, 3289, 4913, 4901, 6859, 6647, 8303, 10051, 10469, 11191, 12167, 15341, 16399, 17081, 18259, 22103, 24389, 26071, 29791, 27347, 31117, 35557, 36163, 36859, 39401, 42439, 50653, 50933, 52111, 56129, 56699
Offset: 1

Views

Author

Vladimir Shevelev, Sep 24 2014

Keywords

Comments

Conjecture: the sequence contains all cubes of primes, except for 3^3 (cf. A030078).
Prime(n)^3 is in the sequence iff the interval [prime(n)^(3/2), prime(n)*sqrt(prime(n+1))] contains a prime.
A simple algorithm for finding the position k=k(n) for which a(k) = prime(n)^3 is given in A247835 (see formula and example there).
Conjecture: every term has the form a(n)= p*q*r, where p<=q<=r are primes.

Crossrefs

Extensions

More terms from Peter J. C. Moses, Sep 24 2014
Showing 1-10 of 12 results. Next