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.

Previous Showing 11-20 of 57 results. Next

A004649 a(n) = prime(n) mod (n-1).

Original entry on oeis.org

0, 1, 1, 3, 3, 5, 5, 7, 2, 1, 4, 5, 4, 5, 8, 11, 10, 13, 14, 13, 16, 17, 20, 1, 1, 25, 26, 25, 26, 7, 7, 9, 7, 13, 11, 13, 15, 15, 17, 19, 17, 23, 21, 21, 19, 27, 35, 35, 33, 33, 35, 33, 39, 41, 43, 45, 43, 45, 45, 43, 49, 59, 59, 57, 57, 1, 2, 7, 4, 3, 4, 7, 8
Offset: 2

Views

Author

N. J. A. Sloane, Daniel Wild (wild(AT)edumath.u-strasbg.fr)

Keywords

Crossrefs

Programs

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

A065133 Remainder when n-th prime is divided by the number of primes not exceeding n.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 3, 3, 1, 1, 2, 5, 1, 5, 5, 3, 5, 3, 7, 1, 7, 2, 8, 7, 2, 4, 8, 9, 3, 6, 10, 5, 7, 6, 8, 1, 7, 11, 5, 10, 12, 9, 11, 1, 3, 1, 13, 2, 4, 8, 14, 1, 11, 1, 7, 13, 15, 5, 9, 13, 5, 1, 5, 7, 11, 8, 14, 5, 7, 13, 19, 10, 16, 1, 5, 11, 19, 5, 13, 1, 3, 17, 19, 2, 6, 12, 20, 5, 7, 11, 23
Offset: 2

Views

Author

Labos Elemer, Oct 15 2001

Keywords

Examples

			n = 2: pi(2) = 1, prime(2) = 3, 3 mod 1 = 0, the first term = a(2);
n = 100: pi(100) = 25, prime(100) = 541, 541 mod 25 = 16 = a(100). [corrected by _Jon E. Schoenfield_, Jun 18 2018]
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[Prime[n],PrimePi[n]],{n,2,100}] (* Harvey P. Dale, Nov 28 2013 *)
  • PARI
    { for (n=2, 1000, write("b065133.txt", n, " ", prime(n)%primepi(n)) ) } \\ Harry J. Smith, Oct 11 2009

Formula

a(n) = prime(n) mod pi(n) = A000040(n) mod A000720(n), n > 1.

A065864 Remainder when n is divided by the number of nonprimes not exceeding n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 0, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21
Offset: 1

Views

Author

Labos Elemer, Nov 26 2001

Keywords

Examples

			For n=100, pi(100)=25, so a(100) = 100 mod (100-25) = 25.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[n, n - PrimePi@ n], {n, 78}] (* or *)
    Table[Mod[n, Count[Range@ n, k_ /; ! PrimeQ@ k]], {n, 78}] (* Michael De Vlieger, Jan 01 2017 *)
  • PARI
    { for (n = 1, 1000, a=n%(n - primepi(n)); write("b065864.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 02 2009

Formula

a(n) = n mod (n-pi(n)) = n mod (n-A000720(n)) = n mod A062298(n).

A069547 a(n) = n^2 mod n-th prime.

Original entry on oeis.org

1, 1, 4, 2, 3, 10, 15, 7, 12, 13, 28, 33, 5, 24, 37, 44, 53, 19, 26, 45, 3, 10, 31, 42, 43, 70, 8, 35, 78, 109, 72, 107, 130, 44, 33, 88, 113, 140, 18, 43, 70, 135, 130, 6, 55, 126, 99, 74, 131, 210, 38, 75, 158, 155, 198, 243, 21, 112, 157, 228, 42, 35, 285, 53, 156, 235
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 17 2002

Keywords

Comments

What is the origin of pattern at n~(6-7)*10^3 (see link to figure)? - Zak Seidov, Nov 22 2011

Crossrefs

Programs

  • Mathematica
    Table[ PowerMod[n, 2, Prime[n]], {n, 1, 70}]
  • PARI
    vector(100, n, n^2 % prime(n)) \\ Michel Marcus, Jun 01 2015

Extensions

Edited and extended by Robert G. Wilson v, Apr 22 2002

A072609 Changing of parity of remainder A072608(n) from alternation [..010101..] to steadily 1-range [...1111..]. AC-range corresponds to 0, while DC-range labeled by 1.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Labos Elemer, Jun 24 2002

Keywords

Examples

			Take n = 11,12,13,14: A004648[n]=9,1,2,1. Parity A072608(n) = 1,1,0,1. So ..11.. transforms into 01 between n = 11 and n = 12: a(11) = 1, a(12)=0. With increasing n, A072609(n) changes from ..0000.. into ...1111. reflected by this sequence. by a range consisting only of 1-s. This secondary alternation also goes on.
		

Crossrefs

Programs

  • Mathematica
    mm[x_] := Mod[Mod[Prime[x], x], 2] Table[mm[w]*mm[w+1], {w, 1, 256}]
    Times@@@Partition[Table[Mod[Mod[Prime[n],n],2],{n,110}],2,1] (* Harvey P. Dale, Dec 21 2014 *)

Formula

a(n)=Mod[A004648(n), 2]*Mod[A004648(n+1), 2]= A072608(n)*A072608(n+1)

A072610 Values of transition of A072608(n) from alternating behavior (0,1,0,1,..) into steadily-1 (1,1,1,..) behavior or changing back. Expressing in terms of A072609(n): at n values it switches from steadily 0 into steadily 1 successive values or back.

Original entry on oeis.org

3, 11, 29, 67, 69, 71, 179, 181, 189, 441, 1059, 2699, 6453, 6459, 6471, 15927, 40071, 40083, 40121, 100363, 251705, 251707, 251709, 251721, 251723, 251735, 251737, 251741, 251761, 637233, 637235, 637319, 637321, 637323, 637325, 637329, 637333
Offset: 1

Views

Author

Labos Elemer, Jun 24 2002

Keywords

Comments

Values of n such that A072609(n) != A072609(n+1).
Switching zones appear in clusters of n. Remainder A004648 either drops or starts to increase at these values of n.

Examples

			At n=637330...637370 the change of remainder A004648 is as follows: {..637323, 4, 13, 4, 637333, 637327, 637335, 637323, 637319, 637325, 637321, 4, 11, 4, 7, 34, 29, 26, 17, 44, 43, 46, 41, 38, 49, 52, 49, 44, 37, 28, 37..}
		

Crossrefs

Programs

  • Mathematica
    mm[x_] := Mod[Mod[Prime[x], x], 2];
    pm[x_] := mm[x]*mm[x+1];
    Do[s1=pm[n]; s2=pm[n+1]; If[ !Equal[s1, s2], Print[n]], {n, 10^9}]

A116677 Numbers k such that prime(k) == 12 (mod k).

Original entry on oeis.org

1, 91, 4124467, 27067043, 27067229, 27067261, 27067523, 1208198857, 8179002137, 8179002191
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A004648, A023143 - A023152, A116657, A116658, A116659: prime(n) == m (mod n), m=1..14.
Cf. A116678.

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == 12, Print[n]], {n, 10^9}]
  • Sage
    def A116677(max) :
        terms = []
        p = 2
        for n in range(1, max+1) :
            if (p - 12) % n == 0 : terms.append(n)
            p = next_prime(p)
        return terms
    # Eric M. Schmidt, Feb 05 2013

Extensions

First term inserted by Eric M. Schmidt, Feb 05 2013

A116657 Numbers k such that prime(k) == 11 (mod k).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 20, 38, 39, 82, 190, 192, 444, 2702, 40079, 40156, 251719, 251725, 251733, 251740, 251788, 637322, 637342, 10553424, 10553571, 10553575, 10553646, 10553824, 27066990, 69709708, 69709870, 69709881, 69709941, 179992918, 179993010
Offset: 1

Views

Author

Zak Seidov, Feb 21 2006

Keywords

Comments

Starting with a(7), positions of 11 in A004648. - corrected by Eric M. Schmidt, Feb 05 2013

Crossrefs

Cf. A004648; A023143 - A023152, A116657, A116677, A116658, A116659: prime(n) == m (mod n), m=1..14.

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == 11, Print[n]], {n, 10^9}] (* Robert G. Wilson v, Feb 22 2006 *)
  • Sage
    def A116657(max) :
        terms = []
        p = 2
        for n in range(1, max+1) :
            if (p - 11) % n == 0 : terms.append(n)
            p = next_prime(p)
        return terms
    # Eric M. Schmidt, Feb 05 2013

Extensions

a(17)-a(35) from Robert G. Wilson v, Feb 22 2006
First six terms inserted by Eric M. Schmidt, Feb 05 2013

A116658 Numbers k such that prime(k) == 13 (mod k).

Original entry on oeis.org

1, 2, 6, 12, 22, 40, 42, 84, 86, 90, 193, 2712, 16056, 16058, 40077, 40123, 40124, 40125, 251720, 251766, 251769, 251787, 637332, 10553432, 10553435, 10553501, 10553568, 10553817, 10553826, 27067042, 27067132, 69709722, 179993160, 465769803
Offset: 1

Views

Author

Zak Seidov, Feb 21 2006

Keywords

Comments

Starting with a(5), positions of 13 in A004648. - corrected by Eric M. Schmidt, Feb 05 2013

Crossrefs

Cf. A004648; A023143 - A023152, A116657, A116677, A116658, A116659: prime(n) == m (mod n), m=1..14.

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == 13, Print[n]], {n, 10^9}] (* Robert G. Wilson v, Feb 22 2006 *)
  • Sage
    def A116658(max) :
        terms = []
        p = 2
        for n in range(1, max+1) :
            if (p - 13) % n == 0 : terms.append(n)
            p = next_prime(p)
        return terms
    # Eric M. Schmidt, Feb 05 2013

Extensions

a(24)-a(34) from Robert G. Wilson v, Feb 22 2006
First four terms inserted by Eric M. Schmidt, Feb 05 2013
Previous Showing 11-20 of 57 results. Next