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

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

A068901 Least number that when added to the n-th prime gives a multiple of n.

Original entry on oeis.org

0, 1, 1, 1, 4, 5, 4, 5, 4, 1, 2, 11, 11, 13, 13, 11, 9, 11, 9, 9, 11, 9, 9, 7, 3, 3, 5, 5, 7, 7, 28, 29, 28, 31, 26, 29, 28, 27, 28, 27, 26, 29, 24, 27, 28, 31, 24, 17, 18, 21, 22, 21, 24, 19, 18, 17, 16, 19, 18, 19, 22, 17, 8, 9, 12, 13, 4, 3, 67, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 05 2002

Keywords

Crossrefs

Cf. A090973. - Reinhard Zumkeller, Aug 16 2009

Programs

  • Haskell
    a068901 n = head $
       filter ((== 0) . (`mod` fromIntegral n) . (+ a000040 n)) $ [0..]
    -- Reinhard Zumkeller, Feb 18 2012
  • Mathematica
    f[n_] := Module[{p=Prime[n]}, n*Ceiling[p/n]-p]; Array[f,100]  (* Harvey P. Dale, Apr 06 2011 *)

Formula

a(n) = Min_{k | n divides (prime(n)+k)}.
a(n) = A068902(n) - A000040(n).
a(n) = n*ceiling(prime(n)/n) - prime(n). - Vladeta Jovovic, Apr 06 2003
Showing 1-2 of 2 results.