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

A038623 Smallest prime p such that p/pi(p)>=n.

Original entry on oeis.org

2, 2, 37, 127, 347, 1087, 3109, 8419, 24317, 64553, 175211, 480881, 1304707, 3523901, 9558533, 25874843, 70115473, 189961529, 514272533, 1394193607, 3779851091, 10246935679, 27788566133, 75370121191, 204475052401, 554805820711, 1505578023841, 4086199302113
Offset: 1

Views

Author

Keywords

Examples

			pi(37)=12 and a(3)=37 is the smallest prime >= 3*12.
		

Crossrefs

Essentially the same as A062743,A038607.
a(n) = prime(A038624(n)).

Programs

  • Mathematica
    Prime[Join[{k = 1}, Table[While[Prime[k]/k < n, k++]; k, {n, 2, 18}]]] (* Jayanta Basu, Jul 10 2013 *)
  • PARI
    k=n=1; forprime(p=2,, while(p/k>=n, print1(p", "); n++); k++) \\ Charles R Greathouse IV, Oct 15 2016

Formula

a(n) = exp(n + 1 + o(1)). - Charles R Greathouse IV, Oct 15 2016

Extensions

Edited by N. J. A. Sloane, Jun 30 2008 at the suggestion of R. J. Mathar
a(24)-a(28) from David W. Wilson, Apr 25 2017
a(29)-a(50) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Sep 01 2018

A038606 Least k such that k-th prime > n * k.

Original entry on oeis.org

1, 5, 12, 31, 69, 181, 443, 1052, 2701, 6455, 15928, 40073, 100362, 251707, 637235, 1617175, 4124437, 10553415, 27066974, 69709680, 179992909, 465769803, 1208198526, 3140421716, 8179002096, 21338685407, 55762149030, 145935689361, 382465573483, 1003652347100
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net) 1998 Jul

Keywords

Comments

Log(a(n)) =~ -1.295 + 0.964312n. - Robert G. Wilson v, Jan 25 2002
Numbers n such that prime(n) (mod n) begins the next cycle of terms in A004648. Generally prime(i) (mod i) exceeds prime(i-1) (mod i-1) but there are numerous times where for a short run prime(i) (mod i) is minimally less than its predecessor. Here n is substantially less. See Labos's graph.
A090973(a(n)) = n+1. [From Reinhard Zumkeller, Aug 16 2009]
With offset 2: Index j of prime p(j) such that ceiling[p(j)/j]=n is first satisfied. a(n) = A062742(n) = A038624(n) for n >= 3. [From Jaroslav Krizek, Dec 13 2009]

Crossrefs

Programs

  • Maple
    A038606 := proc(n)
        for k from 1 do
            if ithprime(k)> n*k then
                return k;
            end if;
        end do:
    end proc: # R. J. Mathar, Aug 24 2013
  • Mathematica
    k = 1; Do[ While[ Floor[ Prime[k]/k] < n, k++ ]; Print[k]; k++, {n, 1, 30} ]
  • PARI
    k=1;n=1;forprime(p=3,4e9,if(p/n++>k,print1(n", ");k++)) \\ Charles R Greathouse IV, Sep 06 2011

Formula

a(n) = pi(A038607(n)) = A000720(A038607(n)).

Extensions

Edited by Robert G. Wilson v, Jan 25 2002
a(21)=179992909 corrected by Ray Chandler, Dec 01 2004
a(29)-a(30) from Charles R Greathouse IV, Sep 06 2011
a(31)-a(50) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Sep 01 2018

A062743 Smallest prime prime(m) such that floor(prime(m)/m) = n.

Original entry on oeis.org

3, 2, 37, 127, 347, 1087, 3109, 8419, 24317, 64553, 175211, 480881, 1304707, 3523901, 9558533, 25874843, 70115473, 189961529, 514272533, 1394193607, 3779851091, 10246935679, 27788566133, 75370121191, 204475052401
Offset: 1

Views

Author

Labos Elemer, Jul 12 2001

Keywords

Comments

a(n+1)/a(n) -> e as n -> infinity, as do the m's.

Crossrefs

Essentially the same as A038623.

Programs

  • Mathematica
    Do[ k = 1; While[ Floor[ Prime[m]/ m] != n, m++ ]; Print[Prime[k] ], {n, 1, 27} ]

Formula

A062742(n) = pi(a(n)).

Extensions

More terms from Robert G. Wilson v, Jul 13 2001
a(27) from Farideh Firoozbakht, Sep 12 2005
Corrected by T. D. Noe, Nov 14 2006
a(30)-a(50) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Sep 01 2018

A100478 Pentanacci pi function: a(1)=a(2)=a(3)=a(4)=a(5)=1; for n>5, a(n) = pi(Sum_{j=1..5} a(n-j)) where pi = A000720.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 4, 4, 6, 7, 9, 10, 11, 14, 15, 17, 19, 21, 23, 24, 27, 30, 30, 32, 34, 36, 37, 39, 40, 42, 44, 46, 47, 47, 48, 50, 51, 53, 53, 54, 55, 56, 58, 58, 60, 61, 62, 62, 62, 63, 63, 64, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66
Offset: 1

Views

Author

Jonathan Vos Post, Nov 22 2004

Keywords

Comments

Starting with other values of a(1), a(2), a(3), a(4), a(5) what behaviors are possible? Does the sequence always stick at a single integer after some point, or can it go into a loop, or is there a third pattern?
a(n) is equal to 66 for 54 <= n <= 10^7. - G. C. Greubel, Apr 06 2023

Examples

			a(6) = pi(a(1)+a(2)+a(3)+a(4)+a(5)) = pi(1+1+1+1+1) = pi(5) = 3.
a(7) = pi(a(2)+a(3)+a(4)+a(5)+a(6)) = pi(1+1+1+1+3) = pi(7) = 4.
a(8) = pi(a(3)+a(4)+a(5)+a(6)+a(7)) = pi(1+1+1+3+4) = pi(10) = 4.
a(9) = pi(a(4)+a(5)+a(6)+a(7)+a(8)) = pi(1+1+3+4+4) = pi(13) = 6.
a(10) = pi(a(5)+a(6)+a(7)+a(8)+a(9)) = pi(1+3+4+4+6) = pi(18) = 7.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:= a[n]= If[n<6,1,PrimePi[Sum[a[n-j], {j,5}]]];
    Table[a[n], {n,80}] (* Robert G. Wilson v, Dec 03 2004 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A100478
        if (n<6): return 1
        else: return prime_pi(sum(a(n-j) for j in range(1,6)))
    [a(n) for n in range(1, 81)] # G. C. Greubel, Apr 06 2023

Formula

a(n) = pi(a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5)) with a(1) = a(2) = a(3) = a(4) = a(5) = 1.

Extensions

Edited and extended by Robert G. Wilson v, Dec 03 2004

A245071 a(n) = 12n - prime(n).

Original entry on oeis.org

10, 21, 31, 41, 49, 59, 67, 77, 85, 91, 101, 107, 115, 125, 133, 139, 145, 155, 161, 169, 179, 185, 193, 199, 203, 211, 221, 229, 239, 247, 245, 253, 259, 269, 271, 281, 287, 293, 301, 307, 313, 323, 325, 335, 343, 353, 353, 353, 361, 371, 379, 385, 395, 397, 403, 409, 415, 425
Offset: 1

Views

Author

Freimut Marschner, Jul 21 2014

Keywords

Comments

Prime(n) > n for n > 0. Let prime(n) = k*n with k as an even integer constant, for example, k = 12; then a(n) = k*n - prime(n) is a sequence of odd integers that are positive as long as k*n > prime(n). This is the case up to a(40072) = 11. If k*n < prime(n) then a(n) < 0, a(40073) = -5 up to a(40083) = -5. From a(40084) = 5 up to a(40121) = 5, a(n) > 0 again, but a(n) < 0 for n >= 40122. For k = 12 the table shows this result compared with floor(prime(n)/n) and (prime(n) mod n) <= (prime(n+1) mod (n+1)) for n >= 1. Observations:
(1) If k > floor(prime(n)/n) then a(n) is positive.
(2) If k <= floor(prime(n)/n) and (prime(n) mod n) < (prime(n+1) mod (n+1)) and n > 1 then a(n) is negative.
(3) If k <= floor(prime(n)/n) and (prime(n) mod n) > (prime(n+1) mod (n+1)) then a(n) is positive.
.
n prime(n) floor(prime(n)/n) (prime(n) mod n) a(n)
40072 480853 12 5 11
40073 480881 12 23 -5
40083 481001 11 40079 -5
40084 481003 11 40074 5
40121 481447 12 5 5
40122 481469 12 13 -5

Examples

			a(3) = 12*3 - prime(3) = 36 - 5 = 31.
		

Crossrefs

A000040 (prime(n)), A038605 (floor(prime(n)/n)), A004648 (prime(n) mod n), A038606 (Least k such that k-th prime > n * k), A038607 (the smallest prime number k such that k > n*pi(k)), A102281 (the largest number m such that m = pi(n*m)).

Programs

  • Mathematica
    Table[12n - Prime[n], {n, 60}] (* Alonso del Arte, Jul 27 2014 *)
  • PARI
    vector(133, n, 12*n-prime(n) )

Formula

a(n) = 12*n - prime(n).

A111360 Integers k such that sigma(k) + prime(k) is divisible by k.

Original entry on oeis.org

1, 2, 3, 9, 21, 129, 5663, 40087, 184971, 246901, 251737, 1610143, 3098384123, 19819945093, 21323898091, 123112069843, 130057547087
Offset: 1

Views

Author

Ray G. Opao, Nov 07 2005

Keywords

Comments

a(18) > 10^13, if it exists. - Giovanni Resta, Jan 05 2020

Examples

			The divisors of 21 are 1,3,7,21 and the 21st prime is 73. 1+3+7+21+73 = 105, which is divisible by 21.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^8], Mod[Prime[ # ] + Plus @@ Divisors[ # ], # ] == 0 &] (* Ray Chandler, Jan 24 2006 *)
  • PARI
    p=2; for(n=1,100000000, if( (sigma(n)+p) % n == 0, print(n) ) ; p=nextprime(p+1) ; ) \\ R. J. Mathar, Feb 11 2008

Extensions

a(13)-a(15) from Donovan Johnson, Apr 22 2008
New name from Michel Marcus, Dec 10 2019
a(16)-a(17) from Giovanni Resta, Dec 12 2019
Showing 1-6 of 6 results.